Skip to content

Commit 8d1bdf5

Browse files
Git workflow to automatically change api files
Signed-off-by: Hanwen <[email protected]>
1 parent 0756440 commit 8d1bdf5

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,37 @@ jobs:
191191
- name: Verify Generation of API client
192192
run: |
193193
git diff --exit-code --quiet -- api/client/src/ ':!api/client/src/.openapi-generator/FILES'
194+
generate-api-model:
195+
permissions:
196+
contents: write
197+
pull-requests: write
198+
name: API Model Generation
199+
runs-on: ubuntu-latest
200+
steps:
201+
- uses: actions/checkout@v2
202+
- uses: actions/setup-java@v1
203+
with:
204+
java-version: 11
205+
- run: |
206+
sudo npm install -g redoc-cli
207+
sudo snap install yq
208+
- working-directory: api
209+
run: ./gradlew buildSmithyModel
210+
- working-directory: api
211+
run: ./gradlew generatePythonClient
212+
- working-directory: api
213+
run: ./gradlew generatePythonServer
214+
- run: cp -Rf api/generated/python-server/pcluster cli/src
215+
- name: Commit change
216+
uses: stefanzweifel/git-auto-commit-action@v5
217+
with:
218+
commit_message: 'update api'
219+
194220
validate-external-slurmdbd-template:
195221
permissions:
196222
contents: write
197223
pull-requests: write
198-
name: External SlurmDBD Template Validation
224+
name: External SlurmDBD Template Generation
199225
runs-on: ubuntu-latest
200226
steps:
201227
- uses: actions/checkout@v2
@@ -211,7 +237,7 @@ jobs:
211237
run: |
212238
cdk synth --no-version-reporting
213239
cp cdk.out/ExternalSlurmdbdStack.template.json external-slurmdbd.json
214-
- name: Create a Pull Request
240+
- name: Commit change
215241
uses: stefanzweifel/git-auto-commit-action@v5
216242
with:
217243
commit_message: 'update slurmdbd'

cloudformation/external-slurmdbd/resources/user_data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ DEVICE_NAME=$(ls /sys/class/net | grep e)
5353
# Configure AWS CLI using the expected overrides, if any.
5454
[ -f /etc/profile.d/aws-cli-default-config.sh ] && . /etc/profile.d/aws-cli-default-config.sh
5555

56-
aws ec2 assign-private-ip-addressess --region "${AWS::Region}" --network-interface-id "${!ENI_ID}" --private-ip-addresses ${PrivateIp} --allow-reassignment
56+
aws ec2 assign-private-ip-addresses --region "${AWS::Region}" --network-interface-id "${!ENI_ID}" --private-ip-addresses ${PrivateIp} --allow-reassignment
5757

5858
wait_for_private_ip_assignment || echo "Assignment of private IP ${PrivateIp} was not successful."
5959

0 commit comments

Comments
 (0)