ci: add comments for vercel-deploy-preview (#21349)
**/build-deploy-preview env=release**  --------- Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
This commit is contained in:
parent
424d2f6965
commit
47750db727
|
|
@ -22,8 +22,8 @@ jobs:
|
|||
PR: ${{ github.event.client_payload.pull_request.number }}.
|
||||
|
||||
server-build:
|
||||
if: github.event.client_payload.slash_command.args.named.env != 'release'
|
||||
name: server-build
|
||||
if: github.event.client_payload.slash_command.args.named.env != 'release'
|
||||
uses: ./.github/workflows/server-build.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
|
|
@ -48,8 +48,8 @@ jobs:
|
|||
pr: ${{ github.event.client_payload.pull_request.number }}
|
||||
|
||||
vercel-build:
|
||||
name: vercel-build
|
||||
if: github.event.client_payload.slash_command.args.named.env == 'release'
|
||||
name: vercel-local-build
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||
|
|
@ -79,12 +79,23 @@ jobs:
|
|||
run: vercel build --yes --token=${{ secrets.VERCEL_TOKEN }}
|
||||
|
||||
- name: Deploy Project Artifacts to Vercel
|
||||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
|
||||
id: set-dpurl
|
||||
run: |
|
||||
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} >> ~/run_result.txt
|
||||
echo "::set-output name=dpurl::$(cat ~/run_result.txt)"
|
||||
|
||||
- name: vercel-notify
|
||||
uses: peter-evans/create-or-update-comment@v2
|
||||
with:
|
||||
issue-number: ${{ github.event.client_payload.pull_request.number }}
|
||||
body: |
|
||||
Deploy-Preview-URL: ${{ steps.set-dpurl.outputs.dpurl }}
|
||||
|
||||
|
||||
push-image:
|
||||
needs: [client-build, rts-build, server-build]
|
||||
runs-on: ubuntu-latest
|
||||
if: success() && github.event.client_payload.slash_command.args.named.env != 'release'
|
||||
if: success()
|
||||
steps:
|
||||
|
||||
- name: Set up Depot CLI
|
||||
|
|
@ -145,7 +156,7 @@ jobs:
|
|||
run:
|
||||
working-directory: "."
|
||||
|
||||
if: success() && github.event.client_payload.slash_command.args.named.env != 'release'
|
||||
if: success()
|
||||
steps:
|
||||
|
||||
- name: Checkout PR
|
||||
|
|
@ -174,6 +185,9 @@ jobs:
|
|||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
PULL_REQUEST_NUMBER: ${{ github.event.client_payload.pull_request.number }}
|
||||
DB_USERNAME: ${{ secrets.DB_USERNAME }}
|
||||
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
|
||||
DB_URL: ${{ secrets.DB_URL }}
|
||||
run: |
|
||||
echo "environment variables set to deploy the image" $IMAGE_HASH
|
||||
/bin/bash ./scripts/deploy_preview.sh
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export AWS_SESSION_TOKEN=$(echo $sts_output | jq -r '.Credentials''.SessionToken
|
|||
export NAMESPACE=ce"$PULL_REQUEST_NUMBER"
|
||||
export CHARTNAME=ce"$PULL_REQUEST_NUMBER"
|
||||
export SECRET=ce"$PULL_REQUEST_NUMBER"
|
||||
export DBNAME=ce"$PULL_REQUEST_NUMBER"
|
||||
export DOMAINNAME=ce-"$PULL_REQUEST_NUMBER".dp.appsmith.com
|
||||
export HELMCHART="appsmith"
|
||||
export HELMCHART_URL="http://helm.appsmith.com"
|
||||
|
|
@ -64,4 +65,5 @@ helm upgrade -i $CHARTNAME appsmith/appsmith -n $NAMESPACE \
|
|||
--set "ingress.annotations.service\.beta\.kubernetes\.io/aws-load-balancer-ssl-cert=$AWS_RELEASE_CERT" \
|
||||
--set "ingress.hosts[0].host=$DOMAINNAME, ingress.hosts[0].paths[0].path=/, ingress.hosts[0].paths[0].pathType=Prefix" \
|
||||
--set ingress.className="nginx" --set image.pullPolicy="Always" --set autoupdate.enabled="true" --set persistence.size=4Gi \
|
||||
--set applicationConfig.APPSMITH_MONGODB_URI="mongodb+srv://$DB_USERNAME:$DB_PASSWORD@$DB_URL/$DBNAME?retryWrites=true&minPoolSize=1&maxPoolSize=10&maxIdleTimeMS=900000&authSource=admin" \
|
||||
--version $HELMCHART_VERSION
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user