From 058d90cea0f2892541ee66165935f84f6717c2e1 Mon Sep 17 00:00:00 2001 From: arslanhaiderbuttar <83570904+arslanhaiderbuttar@users.noreply.github.com> Date: Mon, 15 Aug 2022 19:08:30 +0500 Subject: [PATCH] test: Update workflows for upgrade scenarios (#15841) Update workflows for upgrade scenarios --- .../workflows/integration-tests-command.yml | 28 ++++++++++++++++++- .github/workflows/test-build-docker-image.yml | 28 ++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests-command.yml b/.github/workflows/integration-tests-command.yml index dd8cba6f65..9cdaf41c16 100644 --- a/.github/workflows/integration-tests-command.yml +++ b/.github/workflows/integration-tests-command.yml @@ -553,16 +553,41 @@ jobs: run: | docker build -t fatcontainer . - - name: Load docker image + - name: Create folder if: steps.run_result.outputs.run_result != 'success' env: APPSMITH_LICENSE_KEY: ${{ secrets.APPSMITH_LICENSE_KEY }} working-directory: "." run: | mkdir -p fatcontainerlocal/stacks/configuration/ + mkdir -p fatcontainerlocal/oldstack + + - name: Download S3 image + uses: keithweaver/aws-s3-github-action@v1.0.0 + with: + command: cp + source: s3://ci-assets--appsmith/ + destination: /home/runner/work/appsmithArslan/appsmithArslan/fatcontainerlocal/oldstack + aws_access_key_id: ${{ secrets.S3_CI_ASSETS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.S3_CI_ASSETS_SECRET_ACCESS_KEY }} + aws_region: ap-south-1 + flags: --recursive + + - name: Load docker image + if: steps.run_result.outputs.run_result != 'success' + env: + APPSMITH_LICENSE_KEY: ${{ secrets.APPSMITH_LICENSE_KEY }} + working-directory: "." + run: | + mkdir -p ~/git-server/keys + mkdir -p ~/git-server/repos + docker run --name test-event-driver -d -p 2222:22 -p 5001:5001 -p 3306:3306 \ + -p 5432:5432 -p 28017:27017 -p 25:25 -v ~/git-server/keys:/git-server/keys \ + -v ~/git-server/repos:/git-server/repos appsmith/test-event-driver:latest cd fatcontainerlocal docker run -d --name appsmith -p 80:80 -p 9001:9001 \ -v "$PWD/stacks:/appsmith-stacks" -e APPSMITH_LICENSE_KEY=$APPSMITH_LICENSE_KEY \ + -e APPSMITH_CLOUD_SERVICES_BASE_URL=http://host.docker.internal:5001 \ fatcontainer - name: Use Node.js 16.14.0 @@ -1526,3 +1551,4 @@ jobs: # Set status = success - run: echo "::set-output name=run_result::success" > ~/run_result + diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index ff7a72a5e0..21bd8e5a11 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -537,16 +537,41 @@ jobs: run: | docker build -t fatcontainer . - - name: Load docker image + - name: Create folder if: steps.run_result.outputs.run_result != 'success' env: APPSMITH_LICENSE_KEY: ${{ secrets.APPSMITH_LICENSE_KEY }} working-directory: "." run: | mkdir -p fatcontainerlocal/stacks/configuration/ + mkdir -p fatcontainerlocal/oldstack + + - name: Download S3 image + uses: keithweaver/aws-s3-github-action@v1.0.0 + with: + command: cp + source: s3://ci-assets--appsmith/ + destination: /home/runner/work/appsmithArslan/appsmithArslan/fatcontainerlocal/oldstack + aws_access_key_id: ${{ secrets.S3_CI_ASSETS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.S3_CI_ASSETS_SECRET_ACCESS_KEY }} + aws_region: ap-south-1 + flags: --recursive + + - name: Load docker image + if: steps.run_result.outputs.run_result != 'success' + env: + APPSMITH_LICENSE_KEY: ${{ secrets.APPSMITH_LICENSE_KEY }} + working-directory: "." + run: | + mkdir -p ~/git-server/keys + mkdir -p ~/git-server/repos + docker run --name test-event-driver -d -p 2222:22 -p 5001:5001 -p 3306:3306 \ + -p 5432:5432 -p 28017:27017 -p 25:25 -v ~/git-server/keys:/git-server/keys \ + -v ~/git-server/repos:/git-server/repos appsmith/test-event-driver:latest cd fatcontainerlocal docker run -d --name appsmith -p 80:80 -p 9001:9001 \ -v "$PWD/stacks:/appsmith-stacks" -e APPSMITH_LICENSE_KEY=$APPSMITH_LICENSE_KEY \ + -e APPSMITH_CLOUD_SERVICES_BASE_URL=http://host.docker.internal:5001 \ fatcontainer - name: Use Node.js 16.14.0 @@ -1412,3 +1437,4 @@ jobs: docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:nightly . docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${GITHUB_SHA} docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:nightly +