File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 # TKE region
4949 tke_region : ${{ secrets.QCLOUD_TKE_REGION }}
5050 # TKE cluster id
51- cluster_id : ${{ secrets.QCLOUD_TKE_CLUSTER_ID }}
51+ cluster_id : ${{ secrets.QCLOUD_TKE_CLUSTER_ID }}
52+
53+ # setup kubectl
54+ - uses : azure/setup-kubectl@v1
55+ id : install
5256
5357 - uses : actions/cache@v1
5458 with :
6872 - name : Log into registry
6973 run : echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
7074
71- - name : Push image
75+ - name : Push image and update stateful sets
7276 run : |
7377 IMAGE_ID="${{ secrets.DOCKER_HUB_USERNAME }}/$IMAGE"
7478
8488 echo VERSION=$VERSION
8589 docker tag $IMAGE $IMAGE_ID:$VERSION
8690 docker push $IMAGE_ID:$VERSION
91+ OP='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"IMAGE"}]'
92+ OP=echo $OP | sed -e "s/IMAGE/$IMAGE_ID:$VERSION/g"
93+ kubectl patch statefulset tdos-node --type='json' -p=\'$OP\'
94+
95+
96+
97+
98+
You can’t perform that action at this time.
0 commit comments