File tree Expand file tree Collapse file tree 4 files changed +46
-23
lines changed Expand file tree Collapse file tree 4 files changed +46
-23
lines changed Original file line number Diff line number Diff line change 66 - ' base'
77
88jobs :
9- docker :
9+ baseimagebuild :
1010 runs-on : ubuntu-latest
1111 steps :
1212 - name : Checkout
Original file line number Diff line number Diff line change 1+ name : image
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+
7+ jobs :
8+ image_build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v3
13+ - name : Login to Quay
14+ uses : docker/login-action@v1
15+ with :
16+ registry : quay.io/sustainable_computing_io
17+ username : ${{ secrets.BOT_NAME }}
18+ password : ${{ secrets.BOT_TOKEN }}
19+ - name : make container
20+ run : make
21+ - name : push to quay
22+ run : podman push quay.io/sustainable_computing_io/kepler:latest
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ name: Integration test
22
33on :
44 pull_request :
5- push :
6- branches : [ main ]
75
86jobs :
97 integration_test :
3230 env :
3331 CLUSTER_PROVIDER : ${{matrix.kube_provider}}
3432 CTR_CMD : docker
35-
36- - name : Login to Quay
37- if : github.event_name == 'push'
38- uses : docker/login-action@v1
39- with :
40- registry : quay.io/sustainable_computing_io
41- username : ${{ secrets.BOT_NAME }}
42- password : ${{ secrets.BOT_TOKEN }}
43-
44- - name : make container
45- if : github.event_name == 'push'
46- run : make
47-
48- - name : push to quay
49- if : github.event_name == 'push'
50- run : podman push quay.io/sustainable_computing_io/kepler:latest
Original file line number Diff line number Diff line change @@ -31,10 +31,29 @@ function main() {
3131
3232 # Ignore errors because some clusters might not have prometheus operator
3333 kubectl apply -f ${MANIFESTS_OUT_DIR} || true
34- kubectl rollout status daemonset kepler-exporter -n kepler --timeout 60s
35-
36- echo " Check the logs of the kepler-exporter with:"
37- echo " kubectl -n kepler logs daemonset.apps/kepler-exporter"
34+
35+ # round for 3 times and each for 60s
36+ # check if the rollout status is running
37+ deploy_status=1
38+ for i in 1 2 3
39+ do
40+ echo " check deployment status for round $i "
41+ kubectl rollout status daemonset kepler-exporter -n kepler --timeout 60s
42+ # check rollout status
43+ if [ $? -eq 0 ]
44+ then
45+ deploy_status=0
46+ break
47+ fi
48+ done
49+ # if deployment in error
50+ if test $[deploy_status] -eq 1
51+ then
52+ echo " Check the status of the kepler-exporter"
53+ kubectl -n kepler describe daemonset.apps/kepler-exporter
54+ echo " Check the logs of the kepler-exporter"
55+ kubectl -n kepler logs daemonset.apps/kepler-exporter
56+ fi
3857}
3958
4059main " $@ "
You can’t perform that action at this time.
0 commit comments