Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Commit 8af8ea3

Browse files
authored
Merge pull request #283 from Azure/s-tuli/ipause
Update the workflow bikes.yml to use the Azure/k8s-bake and Azure/k8s-deploy GitHub actions
2 parents 911f21b + 98c75e2 commit 8af8ea3

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed

.github/workflows/bikes.yml

+18-24
Original file line numberDiff line numberDiff line change
@@ -61,33 +61,27 @@ jobs:
6161
release=$(echo ${release//[!0-9a-zA-Z]/-} | tr '[:upper:]' '[:lower:]' | sed -e 's/^-/z/' -e 's/-$/z/')
6262
echo ::set-output name=result::$release
6363
64-
- name: Install Helm for client
65-
id: install-helm-client
66-
run: |
67-
set -e
68-
clientversion=$(helm version --client --short | cut -d' ' -f2 | cut -d'+' -f1 | head -c 2 | tail -c 1)
69-
if [ "$clientversion" == 3]; then
70-
echo The client is already using Helm 3
71-
echo ::set-output name=helm::helm
72-
else
73-
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
74-
chmod 700 get_helm.sh
75-
./get_helm.sh --version v3.0.1
76-
echo ::set-output name=helm::helm
77-
fi
78-
79-
- name: Helm Upgrade PR
80-
run: |
81-
${{steps.install-helm-client.outputs.helm}} upgrade \
82-
--install ${{steps.generate-release-name.outputs.result}} samples/BikeSharingApp/Bikes/charts/bikes \
83-
--namespace ${{steps.generate-child-space-name.outputs.result}} \
84-
--set image.repository=${{ secrets.CONTAINER_REGISTRY }}/bikes \
85-
--set image.tag=$GITHUB_SHA \
86-
--set imagePullSecrets[0].name=${{ secrets.IMAGE_PULL_SECRET }}
64+
- uses: azure/k8s-bake@v1
65+
with:
66+
renderEngine: 'helm2'
67+
helmChart: './samples/BikeSharingApp/Bikes/charts/bikes/'
68+
releaseName: ${{steps.generate-release-name.outputs.result}}
69+
overrides: |
70+
image.repository:${{ secrets.CONTAINER_REGISTRY }}/bikes
71+
image.tag:${{ github.sha }}
72+
id: bake
73+
74+
# Deploy app to AKS
75+
- uses: azure/k8s-deploy@v1
76+
with:
77+
manifests: ${{ steps.bake.outputs.manifestsBundle }}
78+
namespace: ${{steps.generate-child-space-name.outputs.result}}
79+
imagepullsecrets: |
80+
${{ secrets.IMAGE_PULL_SECRET }}
8781
8882
- uses: azure/dev-spaces/actions/add-review-url@Releases/v2
8983
with:
9084
repo-token: ${{ secrets.GITHUB_TOKEN }}
9185
host: ${{ secrets.HOST }}
9286
child-space: ${{steps.generate-child-space-name.outputs.result}}
93-
protocol: 'http'
87+
protocol: 'http'

0 commit comments

Comments
 (0)