ci: Swap docker for depot (#16658)

Refer to #16020 for details. This PR has been opened since we could not modify the previous PR since it's a contribution by an external contributor.

Co-authored-by: kylegalbraith <kyle.galbraith459@gmail.com>
This commit is contained in:
Arpit Mohan 2022-09-08 22:13:03 +02:00 committed by GitHub
parent 697bdecaa5
commit 121b1eb8e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 175 additions and 347 deletions

View File

@ -190,11 +190,17 @@ jobs:
needs: [prelude, buildClient, buildServer, buildRts] needs: [prelude, buildClient, buildServer, buildRts]
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps: steps:
- name: Checkout the merged commit from PR and base branch - name: Checkout the merged commit from PR and base branch
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Download the client build artifact - name: Download the client build artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
@ -219,12 +225,6 @@ jobs:
name: rts-build-deps name: rts-build-deps
path: app/rts/node_modules/ path: app/rts/node_modules/
- name: Set up QEMU (needed for docker buildx)
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
@ -232,53 +232,87 @@ jobs:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push client image - name: Build and push client image
working-directory: app/client uses: depot/build-push-action@v1
run: | with:
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{needs.prelude.outputs.tag}} . context: app/client
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{needs.prelude.outputs.tag}} push: true
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{needs.prelude.outputs.tag}}
# Only build & tag with latest if the tag doesn't contain beta # Only build & tag with latest if the tag doesn't contain beta
if [[ ! ${{needs.prelude.outputs.tag}} == *"beta"* ]]; then - name: Build and push client image latest
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:latest . if: '!contains(needs.prelude.outputs.tag, "beta")'
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:latest uses: depot/build-push-action@v1
fi with:
context: app/client
push: true
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:latest
- name: Build and push fat image - name: Build and push fat image
run: | uses: depot/build-push-action@v1
tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{needs.prelude.outputs.tag}}" with:
context: .
push: true
platforms: linux/arm64,linux/amd64
build-args: |
APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }}
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{needs.prelude.outputs.tag}}
# Only build & tag with latest if the tag doesn't contain beta # Only build & tag with latest if the tag doesn't contain beta
if [[ ! ${{needs.prelude.outputs.tag}} == *"beta"* ]]; then - name: Build and push fat image latest
tag_args="$tag_args --tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:latest" if: '!contains(needs.prelude.outputs.tag, "beta")'
fi uses: depot/build-push-action@v1
with:
docker buildx build \ context: .
--platform linux/arm64,linux/amd64 \ push: true
--push \ platforms: linux/arm64,linux/amd64
--build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} \ build-args: |
$tag_args \ APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }}
. tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:latest
- name: Build and push server image - name: Build and push server image
working-directory: app/server uses: depot/build-push-action@v1
run: | with:
docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{needs.prelude.outputs.tag}} . context: app/server
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{needs.prelude.outputs.tag}} push: true
build-args: |
APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }}
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{needs.prelude.outputs.tag}}
# Only build & tag with latest if the tag doesn't contain beta # Only build & tag with latest if the tag doesn't contain beta
if [[ ! ${{needs.prelude.outputs.tag}} == *"beta"* ]]; then - name: Build and push server image latest
docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:latest . if: '!contains(needs.prelude.outputs.tag, "beta")'
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:latest uses: depot/build-push-action@v1
fi with:
context: app/server
push: true
platforms: linux/arm64,linux/amd64
build-args: |
APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }}
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:latest
- name: Build and push RTS image - name: Build and push RTS image
working-directory: app/rts uses: depot/build-push-action@v1
run: | with:
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{needs.prelude.outputs.tag}} . context: app/rts
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{needs.prelude.outputs.tag}} push: true
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{needs.prelude.outputs.tag}}
# Only build & tag with latest if the tag doesn't contain beta # Only build & tag with latest if the tag doesn't contain beta
if [[ ! ${{needs.prelude.outputs.tag}} == *"beta"* ]]; then - name: Build and push RTS image latest
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:latest . if: '!contains(needs.prelude.outputs.tag, "beta")'
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:latest uses: depot/build-push-action@v1
fi with:
context: app/rts
push: true
platforms: linux/arm64,linux/amd64
build-args: |
APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }}
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:latest

View File

@ -29,6 +29,9 @@ jobs:
# Only run if the build step is successful # Only run if the build step is successful
if: success() if: success()
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults: defaults:
run: run:
shell: bash shell: bash
@ -52,6 +55,9 @@ jobs:
- 27017:27017 - 27017:27017
steps: steps:
- name: Set up Depot CLI
uses: depot/setup-action@v1
# Check out merge commit # Check out merge commit
- name: Fork based /ok-to-test checkout - name: Fork based /ok-to-test checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -132,11 +138,14 @@ jobs:
name: rts-build name: rts-build
path: app/rts/dist/ path: app/rts/dist/
- name: Build docker image - name: Build docker image
if: steps.run_result.outputs.run_result != 'success' uses: depot/build-push-action@v1
working-directory: "." with:
run: | context: .
docker build -t fatcontainer . push: false
load: true
tags: |
fatcontainer
- name: Create folder - name: Create folder
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
@ -880,11 +889,9 @@ jobs:
PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }} PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }}
run: echo "$PAYLOAD_CONTEXT" run: echo "$PAYLOAD_CONTEXT"
<<<<<<< HEAD
=======
package: package:
needs: [ui-test, fat-container-test] needs: [ui-test, fat-container-test]
runs-on: buildjet-4vcpu-ubuntu-2004 runs-on: ubuntu-latest
defaults: defaults:
run: run:
working-directory: app/client working-directory: app/client
@ -950,246 +957,11 @@ jobs:
return result; return result;
} }
>>>>>>> 4d609a5b4d5e203c84aba12475a44ac6770eff0d
perf-test: perf-test:
needs: [client-build, server-build, rts-build] needs: [client-build, server-build, rts-build]
# Only run if the build step is successful # Only run if the build step is successful
if: success() if: success()
<<<<<<< HEAD
name: perf-test name: perf-test
uses: ./.github/workflows/perf-test.yml uses: ./.github/workflows/perf-test.yml
with: with:
pr: ${{ github.event.client_payload.pull_request.number }} pr: ${{ github.event.client_payload.pull_request.number }}
=======
runs-on: buildjet-4vcpu-ubuntu-2004
defaults:
run:
working-directory: app/client
shell: bash
# Service containers to run with this job. Required for running tests
services:
# Label used to access the service container
redis:
# Docker Hub image for Redis
image: redis
ports:
# Opens tcp port 6379 on the host and service container
- 6379:6379
mongo:
image: mongo
ports:
- 27017:27017
steps:
# Check out merge commitGIT BRANCH
- name: Fork based /ok-to-test-perf checkout
uses: actions/checkout@v2
with:
ref: "refs/pull/${{ github.event.client_payload.pull_request.number }}/merge"
# Timestamp will be used to create cache key
- id: timestamp
run: echo "::set-output name=timestamp::$(timestamp +'%Y-%m-%dT%H:%M:%S')"
# In case this is second attempt try restoring status of the prior attempt from cache
- name: Restore the previous run result
uses: actions/cache@v2
with:
path: |
~/run_result
key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }}
restore-keys: |
${{ github.run_id }}-${{ github.job }}-
# Fetch prior run result
- name: Get the previous run result
id: run_result
run: cat ~/run_result 2>/dev/null || echo 'default'
# Incase of prior failure run the job
- if: steps.run_result.outputs.run_result != 'success'
run: echo "I'm alive!" && exit 0
# Set status = success
- run: echo "::set-output name=run_result::success" > ~/run_result
- name: Use Node.js 16.14.0
if: steps.run_result.outputs.run_result != 'success'
uses: actions/setup-node@v1
with:
node-version: "16.14.0"
- name: Get yarn cache directory path
if: steps.run_result.outputs.run_result != 'success'
id: yarn-dep-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# Retrieve npm dependencies from cache. After a successful run, these dependencies are cached again
- name: Cache npm dependencies
if: steps.run_result.outputs.run_result != 'success'
id: yarn-dep-cache
uses: actions/cache@v2
env:
cache-name: cache-yarn-dependencies
with:
path: |
${{ steps.yarn-dep-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-dep-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-dep-
# Install all the dependencies
- name: Install dependencies
if: steps.run_result.outputs.run_result != 'success'
run: yarn install --frozen-lockfile
- name: Download the react build artifact
if: steps.run_result.outputs.run_result != 'success'
uses: actions/download-artifact@v2
with:
name: build
path: app/client/build
- name: Download the server build artifact
if: steps.run_result.outputs.run_result != 'success'
uses: actions/download-artifact@v2
with:
name: build
path: app/server/dist
# Start server
- name: start server
if: steps.run_result.outputs.run_result != 'success'
working-directory: app/server
env:
APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools"
APPSMITH_REDIS_URL: "redis://127.0.0.1:6379"
APPSMITH_ENCRYPTION_PASSWORD: "password"
APPSMITH_ENCRYPTION_SALT: "salt"
APPSMITH_IS_SELF_HOSTED: false
APPSMITH_CLOUD_SERVICES_BASE_URL: https://release-cs.appsmith.com
APPSMITH_CLOUD_SERVICES_USERNAME: ""
APPSMITH_CLOUD_SERVICES_PASSWORD: ""
APPSMITH_GIT_ROOT: "./container-volumes/git-storage"
run: |
ls -l
ls -l scripts/
ls -l dist/
# Run the server in the background and redirect logs to a log file
./scripts/start-dev-server.sh &> server-logs.log &
- name: Wait for 30 seconds for server to start
if: steps.run_result.outputs.run_result != 'success'
run: |
sleep 30s
- name: Exit if Server hasnt started
if: steps.run_result.outputs.run_result != 'success'
run: |
if [[ `ps -ef | grep "server-1.0-SNAPSHOT" | grep java |wc -l` == 0 ]]; then
echo "Server Not Started";
exit 1;
else
echo "Server Found";
fi
- name: Installing Yarn serve
if: steps.run_result.outputs.run_result != 'success'
run: |
yarn global add serve
echo "$(yarn global bin)" >> $GITHUB_PATH
- name: Setting up the perf tests
if: steps.run_result.outputs.run_result != 'success'
shell: bash
env:
APPSMITH_SSL_CERTIFICATE: ${{ secrets.APPSMITH_SSL_CERTIFICATE }}
APPSMITH_SSL_KEY: ${{ secrets.APPSMITH_SSL_KEY }}
CYPRESS_URL: ${{ secrets.CYPRESS_URL }}
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }}
CYPRESS_TESTUSERNAME1: ${{ secrets.CYPRESS_TESTUSERNAME1 }}
CYPRESS_TESTPASSWORD1: ${{ secrets.CYPRESS_TESTPASSWORD1 }}
CYPRESS_TESTUSERNAME2: ${{ secrets.CYPRESS_TESTUSERNAME2 }}
CYPRESS_TESTPASSWORD2: ${{ secrets.CYPRESS_TESTPASSWORD1 }}
CYPRESS_S3_ACCESS_KEY: ${{ secrets.CYPRESS_S3_ACCESS_KEY }}
CYPRESS_S3_SECRET_KEY: ${{ secrets.CYPRESS_S3_SECRET_KEY }}
CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_ID: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_ID }}
CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET }}
CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_ID: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_ID }}
CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET }}
APPSMITH_DISABLE_TELEMETRY: true
APPSMITH_GOOGLE_MAPS_API_KEY: ${{ secrets.APPSMITH_GOOGLE_MAPS_API_KEY }}
POSTGRES_PASSWORD: postgres
run: |
./cypress/setup-test.sh
- name: Checkout Performance Infra code
uses: actions/checkout@v3
with:
repository: appsmithorg/performance-infra
token: ${{ secrets.APPSMITH_PERF_INFRA_REPO_PAT }}
ref: main
path: app/client/perf
- name: Installing performance tests dependencies
if: steps.run_result.outputs.run_result != 'success'
working-directory: app/client/perf
shell: bash
run: yarn install --frozen-lockfile
- name: Change test script permissions
if: steps.run_result.outputs.run_result != 'success'
working-directory: app/client/perf
run: chmod +x ./start-test.sh
- name: Run performance tests
if: steps.run_result.outputs.run_result != 'success'
working-directory: app/client/perf
shell: bash
env:
APPSMITH_SSL_CERTIFICATE: ${{ secrets.APPSMITH_SSL_CERTIFICATE }}
APPSMITH_SSL_KEY: ${{ secrets.APPSMITH_SSL_KEY }}
CYPRESS_TESTUSERNAME1: ${{ secrets.CYPRESS_TESTUSERNAME9 }}
CYPRESS_TESTPASSWORD1: ${{ secrets.CYPRESS_TESTPASSWORD9 }}
APPSMITH_PERFORMANCE_DB_CONFIG: ${{ secrets.APPSMITH_PERFORMANCE_DB_CONFIG }}
PERF_GITHUB_PAT: ${{ secrets.APPSMITH_PERF_INFRA_REPO_PAT }}
APPSMITH_DISABLE_TELEMETRY: true
POSTGRES_PASSWORD: postgres
NODE_TLS_REJECT_UNAUTHORIZED: "0"
run: ./start-test.sh
# Restore the previous built bundle if present. If not push the newly built into the cache
- name: Restore the previous bundle
uses: actions/cache@v2
with:
path: |
app/client/perf/traces
key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }}
restore-keys: |
${{ github.run_id }}-${{ github.job }}
- uses: actions/upload-artifact@v2
with:
name: performance-summaries
path: app/client/perf/traces
- name: Read summary file
id: read_summary
uses: andstor/file-reader-action@v1
with:
path: app/client/perf/traces/reports/summary.md
- name: Add a comment with the results on the PR with link to workflow run
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.client_payload.pull_request.number }}
body: |
UI Performance test run logs and artifacts: <https://github.com/appsmithorg/appsmith/actions/runs/${{ github.run_id }}>.
Commit: `${{ github.event.client_payload.slash_command.sha }}`.
Results: ${{ steps.read_summary.outputs.contents }}
# Set status = success
- run: echo "::set-output name=run_result::success" > ~/run_result
>>>>>>> 4d609a5b4d5e203c84aba12475a44ac6770eff0d

View File

@ -57,6 +57,9 @@ jobs:
- name: Print the Github event - name: Print the Github event
run: echo ${{ github.event_name }} run: echo ${{ github.event_name }}
- name: Set up Depot CLI
uses: depot/setup-action@v1
# Timestamp will be used to create cache key # Timestamp will be used to create cache key
- id: timestamp - id: timestamp
run: echo "::set-output name=timestamp::$(timestamp +'%Y-%m-%dT%H:%M:%S')" run: echo "::set-output name=timestamp::$(timestamp +'%Y-%m-%dT%H:%M:%S')"

View File

@ -629,6 +629,10 @@ jobs:
github.event.review.state == 'approved' && github.event.review.state == 'approved' &&
github.event.pull_request.head.repo.full_name == github.repository)) github.event.pull_request.head.repo.full_name == github.repository))
runs-on: buildjet-4vcpu-ubuntu-2004 runs-on: buildjet-4vcpu-ubuntu-2004
permissions:
contents: read
id-token: write
defaults: defaults:
run: run:
shell: bash shell: bash
@ -652,6 +656,9 @@ jobs:
- 27017:27017 - 27017:27017
steps: steps:
- name: Set up Depot CLI
uses: depot/setup-action@v1
# Checkout the code # Checkout the code
- name: Checkout the merged commit from PR and base branch - name: Checkout the merged commit from PR and base branch
if: github.event_name == 'pull_request_review' if: github.event_name == 'pull_request_review'
@ -745,9 +752,13 @@ jobs:
- name: Build docker image - name: Build docker image
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
working-directory: "." uses: depot/build-push-action@v1
run: | with:
docker build -t fatcontainer . context: .
push: false
load: true
tags: |
fatcontainer
- name: Create folder - name: Create folder
if: steps.run_result.outputs.run_result != 'success' if: steps.run_result.outputs.run_result != 'success'
@ -1549,12 +1560,6 @@ jobs:
id: vars id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:11}) run: echo ::set-output name=tag::$(echo ${GITHUB_REF:11})
- name: Set up QEMU (needed for docker buildx)
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
@ -1564,45 +1569,48 @@ jobs:
# Build release Docker image and push to Docker Hub # Build release Docker image and push to Docker Hub
- name: Push client release image to Docker Hub - name: Push client release image to Docker Hub
if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
working-directory: app/client uses: depot/build-push-action@v1
run: | with:
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.vars.outputs.tag}} . context: app/client
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.vars.outputs.tag}} push: true
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.vars.outputs.tag}}
# Build master Docker image and push to Docker Hub # Build master Docker image and push to Docker Hub
- name: Push client master image to Docker Hub with commit tag - name: Push client master image to Docker Hub with commit tag
if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
working-directory: app/client uses: depot/build-push-action@v1
run: | with:
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA} . context: app/client
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly . push: true
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA} tags: |
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA}
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly
- name: Build and push release image to Docker Hub - name: Build and push release image to Docker Hub
if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
working-directory: "." uses: depot/build-push-action@v1
run: | with:
tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{steps.vars.outputs.tag}}" context: .
docker buildx build \ push: true
--platform linux/arm64,linux/amd64 \ platforms: linux/arm64,linux/amd64
--push \ build_args: |
--build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }} \ APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }}
$tag_args \ tags: |
. ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{steps.vars.outputs.tag}}
- name: Build and push master image to Docker Hub with commit tag - name: Build and push master image to Docker Hub with commit tag
if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
working-directory: "." uses: depot/build-push-action@v1
run: | with:
tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${GITHUB_SHA}" context: .
tag_args="$tag_args --tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:nightly" push: true
docker buildx build \ platforms: linux/arm64,linux/amd64
--platform linux/arm64,linux/amd64 \ build_args: |
--push \ APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }}
--build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} \ tags: |
$tag_args \ ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${GITHUB_SHA}
. ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:nightly
# - name: Check and push fat image to Docker Hub with commit tag # - name: Check and push fat image to Docker Hub with commit tag
# if: success() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') # if: success() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
@ -1629,35 +1637,45 @@ jobs:
# Build release Docker image and push to Docker Hub # Build release Docker image and push to Docker Hub
- name: Push server release image to Docker Hub - name: Push server release image to Docker Hub
if: success() && github.ref == 'refs/heads/release' if: success() && github.ref == 'refs/heads/release'
working-directory: app/server uses: depot/build-push-action@v1
run: | with:
docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}} . context: app/server
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}} push: true
build_args: |
APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }}
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}}
# Build master Docker image and push to Docker Hub # Build master Docker image and push to Docker Hub
- name: Push server master image to Docker Hub with commit tag - name: Push server master image to Docker Hub with commit tag
if: success() && github.ref == 'refs/heads/master' if: success() && github.ref == 'refs/heads/master'
working-directory: app/server uses: depot/build-push-action@v1
run: | with:
docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${GITHUB_SHA} . context: app/server
docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:nightly . push: true
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${GITHUB_SHA} build_args: |
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:nightly APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }}
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${GITHUB_SHA}
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:nightly
# Build release Docker image and push to Docker Hub # Build release Docker image and push to Docker Hub
- name: Push RTS release image to Docker Hub - name: Push RTS release image to Docker Hub
if: success() && github.ref == 'refs/heads/release' if: success() && github.ref == 'refs/heads/release'
working-directory: app/rts uses: depot/build-push-action@v1
run: | with:
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}} . context: app/rts
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}} push: true
tags: |
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}}
# Build master Docker image and push to Docker Hub # Build master Docker image and push to Docker Hub
- name: Push RTS master image to Docker Hub with commit tag - name: Push RTS master image to Docker Hub with commit tag
if: success() && github.ref == 'refs/heads/master' if: success() && github.ref == 'refs/heads/master'
working-directory: app/rts uses: depot/build-push-action@v1
run: | with:
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${GITHUB_SHA} . context: app/rts
docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:nightly . push: true
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${GITHUB_SHA} tags: |
docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:nightly ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${GITHUB_SHA}
${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:nightly

1
depot.json Normal file
View File

@ -0,0 +1 @@
{"id":"ts81441f91"}