ci: make upgrades easy to deploy-previews (#20198)

Make upgrades easy for deploy previews.
This commit is contained in:
Goutham Pratapa 2023-01-30 11:49:22 +05:30 committed by GitHub
parent cd051ac941
commit a8689792dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -95,9 +95,9 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
repository: ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-dp
tags: ${{ github.event.client_payload.pull_request.number }}-ce
tags: ce-${{ github.event.client_payload.pull_request.number }}
outputs:
imageHash: ${{ github.event.client_payload.pull_request.number }}-ce
imageHash: ce-${{ github.event.client_payload.pull_request.number }}
build-deploy-preview:
needs: [push-image]

View File

@ -28,9 +28,10 @@ export AWS_ACCESS_KEY_ID=$(echo $sts_output | jq -r '.Credentials''.AccessKeyId'
export AWS_SECRET_ACCESS_KEY=$(echo $sts_output | jq -r '.Credentials''.SecretAccessKey');\
export AWS_SESSION_TOKEN=$(echo $sts_output | jq -r '.Credentials''.SessionToken');
export NAMESPACE="$PULL_REQUEST_NUMBER"ce
export SECRET="$PULL_REQUEST_NUMBER"ce
export DOMAINNAME="$PULL_REQUEST_NUMBER"-ce.dp.appsmith.com
export NAMESPACE=ce"$PULL_REQUEST_NUMBER"
export CHARTNAME=ce"$PULL_REQUEST_NUMBER"
export SECRET=ce"$PULL_REQUEST_NUMBER"
export DOMAINNAME=ce-"$PULL_REQUEST_NUMBER".dp.appsmith.com
export HELMCHART="appsmith"
export HELMCHART_URL="http://helm.appsmith.com"
export HELMCHART_VERSION="2.0.0"
@ -57,7 +58,7 @@ echo "Add appsmith-ce to helm repo"
AWS_REGION=ap-south-1 helm repo add $HELMCHART $HELMCHART_URL
echo "Deploy appsmith helm chart"
helm install appsmith/appsmith --generate-name -n $NAMESPACE \
helm upgrade -i $CHARTNAME --generate-name -n $NAMESPACE \
--create-namespace --set image.repository=$DOCKER_HUB_ORGANIZATION/appsmith-dp --set image.tag=$IMAGE_HASH \
--set image.pullSecrets=$SECRET --set redis.enabled=false --set mongodb.enabled=false --set ingress.enabled=true \
--set "ingress.annotations.service\.beta\.kubernetes\.io/aws-load-balancer-ssl-cert=$AWS_RELEASE_CERT" \