File tree Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 32
32
username : " ${{ env.ACR_LOGIN_USERNAME }}"
33
33
password : " ${{ env.ACR_LOGIN_PASSWORD }}"
34
34
35
- - name : Build & Push :<arch>
35
+ - name : Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}
36
36
uses : docker/build-push-action@v5
37
37
with :
38
38
cache-from : type=gha
42
42
push : true
43
43
build-args : platform=linux/${{ matrix.platform}}
44
44
45
- - name : Build & Push :<arch>-<branch>
45
+ - name : Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-${{ github.ref_name }}
46
46
if : ${{ github.ref != github.repository.default_branch }}
47
47
uses : docker/build-push-action@v5
48
48
with :
53
53
cache-to : type=gha,mode=max
54
54
build-args : platform=linux/${{ matrix.platform}}
55
55
56
- - name : Build & Push :latest
56
+ - name : Build & Push ${{ github.event.repository.name }} :latest
57
57
uses : docker/build-push-action@v5
58
58
if : ${{ matrix.platform == 'amd64' }}
59
59
with :
64
64
push : true
65
65
build-args : platform=linux/amd64
66
66
67
- - name : Build & Push :<arch> -gpu
67
+ - name : Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}} -gpu
68
68
if : ${{ github.ref == github.repository.default_branch && hashFiles('gpu.Dockerflie') != '' }}
69
69
uses : docker/build-push-action@v5
70
70
with :
Original file line number Diff line number Diff line change 22
22
env :
23
23
APPLICATION_STARTUP_MESSAGE : " Application startup complete"
24
24
KUBELOGIN_VERSION : " v0.0.25"
25
+ DOCKERFILE : " ${{ vars.DOCKERFILE }}"
25
26
KUBERNETES_CLUSTER_REPO_NAME : " ${{ vars.KUBERNETES_CLUSTER_REPO_NAME }}"
26
27
KUBERNETES_CLUSTER_NAME : " ${{ vars.KUBERNETES_CLUSTER_NAME }}"
27
28
KUBERNETES_NAMESPACE : " ${{ vars.KUBERNETES_NAMESPACE }}"
77
78
78
79
- name : Generate Deployment
79
80
uses : Azure/k8s-deploy@v5
80
- timeout-minutes : 10
81
+ timeout-minutes : ${{ startsWith(env.DOCKERFILE, 'gpu') && 20 || 5 }}
81
82
with :
82
83
namespace : ${{ env.KUBERNETES_NAMESPACE }}
83
84
manifests : apply.yml
Original file line number Diff line number Diff line change 32
32
username : " ${{ env.ACR_LOGIN_USERNAME }}"
33
33
password : " ${{ env.ACR_LOGIN_PASSWORD }}"
34
34
35
- - name : Build & Push :${{ env.IMAGE_TAG }}
35
+ - name : Build & Push ${{ github.event.repository.name }} :${{ env.IMAGE_TAG }}
36
36
uses : docker/build-push-action@v5
37
37
with :
38
38
cache-from : type=gha
42
42
push : true
43
43
build-args : platform=linux/amd64
44
44
45
- - name : Build & Push :latest
45
+ - name : Build & Push ${{ github.event.repository.name }} :latest
46
46
uses : docker/build-push-action@v5
47
47
with :
48
48
cache-from : type=gha
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ permissions:
16
16
17
17
jobs :
18
18
az-acr-push :
19
- name : " Docker: Build & Push"
19
+ name : " Docker: Build & Push (Test) "
20
20
runs-on : ubuntu-latest
21
21
environment : dev
22
22
env :
35
35
username : " ${{ env.ACR_LOGIN_USERNAME }}"
36
36
password : " ${{ env.ACR_LOGIN_PASSWORD }}"
37
37
38
- - name : Build & Push
38
+ - name : Build & Push ${{ github.event.repository.name }}:test-${{ github.head_ref }}
39
39
uses : docker/build-push-action@v5
40
40
with :
41
41
cache-from : type=gha
Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ while [[ "$LOG_CONTENTS" != *"$APPLICATION_STARTUP_MESSAGE"* ]]; do
28
28
sleep 3
29
29
LOG_CONTENTS=$( kubectl logs deployment/${KUBERNETES_DEPLOYMENT_NAME} \
30
30
|| 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
31
37
done
32
38
33
39
echo " Application startup successful:"
You can’t perform that action at this time.
0 commit comments