Skip to content

Commit a5e0eb5

Browse files
committed
style: rename steps and jobs
1 parent 86adf42 commit a5e0eb5

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

.github/workflows/az_acr_push.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
username: "${{ env.ACR_LOGIN_USERNAME }}"
3333
password: "${{ env.ACR_LOGIN_PASSWORD }}"
3434

35-
- name: Build & Push :<arch>
35+
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}
3636
uses: docker/build-push-action@v5
3737
with:
3838
cache-from: type=gha
@@ -42,7 +42,7 @@ jobs:
4242
push: true
4343
build-args: platform=linux/${{ matrix.platform}}
4444

45-
- name: Build & Push :<arch>-<branch>
45+
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-${{ github.ref_name }}
4646
if: ${{ github.ref != github.repository.default_branch }}
4747
uses: docker/build-push-action@v5
4848
with:
@@ -53,7 +53,7 @@ jobs:
5353
cache-to: type=gha,mode=max
5454
build-args: platform=linux/${{ matrix.platform}}
5555

56-
- name: Build & Push :latest
56+
- name: Build & Push ${{ github.event.repository.name }}:latest
5757
uses: docker/build-push-action@v5
5858
if: ${{ matrix.platform == 'amd64' }}
5959
with:
@@ -64,7 +64,7 @@ jobs:
6464
push: true
6565
build-args: platform=linux/amd64
6666

67-
- name: Build & Push :<arch>-gpu
67+
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-gpu
6868
if: ${{ github.ref == github.repository.default_branch && hashFiles('gpu.Dockerflie') != '' }}
6969
uses: docker/build-push-action@v5
7070
with:

.github/workflows/k8s_deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
env:
2323
APPLICATION_STARTUP_MESSAGE: "Application startup complete"
2424
KUBELOGIN_VERSION: "v0.0.25"
25+
DOCKERFILE: "${{ vars.DOCKERFILE }}"
2526
KUBERNETES_CLUSTER_REPO_NAME: "${{ vars.KUBERNETES_CLUSTER_REPO_NAME }}"
2627
KUBERNETES_CLUSTER_NAME: "${{ vars.KUBERNETES_CLUSTER_NAME }}"
2728
KUBERNETES_NAMESPACE: "${{ vars.KUBERNETES_NAMESPACE }}"
@@ -77,7 +78,7 @@ jobs:
7778
7879
- name: Generate Deployment
7980
uses: Azure/k8s-deploy@v5
80-
timeout-minutes: 10
81+
timeout-minutes: ${{ startsWith(env.DOCKERFILE, 'gpu') && 20 || 5 }}
8182
with:
8283
namespace: ${{ env.KUBERNETES_NAMESPACE }}
8384
manifests: apply.yml

.github/workflows/k8s_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
username: "${{ env.ACR_LOGIN_USERNAME }}"
3333
password: "${{ env.ACR_LOGIN_PASSWORD }}"
3434

35-
- name: Build & Push :${{ env.IMAGE_TAG }}
35+
- name: Build & Push ${{ github.event.repository.name }}:${{ env.IMAGE_TAG }}
3636
uses: docker/build-push-action@v5
3737
with:
3838
cache-from: type=gha
@@ -42,7 +42,7 @@ jobs:
4242
push: true
4343
build-args: platform=linux/amd64
4444

45-
- name: Build & Push :latest
45+
- name: Build & Push ${{ github.event.repository.name }}:latest
4646
uses: docker/build-push-action@v5
4747
with:
4848
cache-from: type=gha

.github/workflows/k8s_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616

1717
jobs:
1818
az-acr-push:
19-
name: "Docker: Build & Push"
19+
name: "Docker: Build & Push (Test)"
2020
runs-on: ubuntu-latest
2121
environment: dev
2222
env:
@@ -35,7 +35,7 @@ jobs:
3535
username: "${{ env.ACR_LOGIN_USERNAME }}"
3636
password: "${{ env.ACR_LOGIN_PASSWORD }}"
3737

38-
- name: Build & Push
38+
- name: Build & Push ${{ github.event.repository.name }}:test-${{ github.head_ref }}
3939
uses: docker/build-push-action@v5
4040
with:
4141
cache-from: type=gha

k8s/assert_deploy_success.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ while [[ "$LOG_CONTENTS" != *"$APPLICATION_STARTUP_MESSAGE"* ]]; do
2828
sleep 3
2929
LOG_CONTENTS=$(kubectl logs deployment/${KUBERNETES_DEPLOYMENT_NAME} \
3030
|| echo "Waiting for application startuop ...")
31+
32+
if [[ "$LOG_CONTENTS" == *"ERROR"* ]]; then
33+
echo "Application startup failed:"
34+
echo "$LOG_CONTENTS"
35+
exit 1
36+
fi
3137
done
3238

3339
echo "Application startup successful:"

0 commit comments

Comments
 (0)