fix: Separated out workflows (#8434)

* Separated out workflows

* Separated out workflows

* Update .github/workflows/ok-to-test.yml

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
This commit is contained in:
Nidhi 2021-10-12 16:26:18 +05:30 committed by GitHub
parent c0e945f0a3
commit 692e62b4dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 99 additions and 23 deletions

84
.github/workflows/README.md vendored Normal file
View File

@ -0,0 +1,84 @@
The following list describes all the workflows that are configured to run in this repository:
## Release process related Actions
1. [Build RTS Workflow](#build-rts-workflow)
2. [Appsmith Client Build Workflow](#appsmith-client-build-workflow)
3. [Appsmith External Integration Test Workflow](#appsmith-external-integration-test-workflow)
4. [Appsmith Github Release Workflow](#appsmith-github-release-workflow)
5. [Ok To Test](#ok-to-test)
6. [Appsmith Server Workflow](#appsmith-server-workflow)
7. [Test, build and push Docker Image](#test-build-and-push-docker-image)
## Utility Actions
1. [Mark stale issues and pull requests](#mark-stale-issues-and-pull-requests)
2. [Label PRs based on title](#label-prs-based-on-title)
3. [Release Drafter](#release-drafter)
4. [Remove old artifacts](#remove-old-artifacts)
5. [Sync Community workflow](#sync-community-workflow)
6. [Potential Duplicate Issues](#potential-duplicate-issues)
7. [Mastermind Labeler Workflow](#mastermind-labeler-workflow)
#### Build RTS Workflow
_Workflow file: [build-rts.yml](build-rts.yml)_
Triggered on every commit to the rts folder. This workflow is responsible for building the RTS Node server. There are dummy steps for ui-tests and packaging. **(Comment: Useless right now because it does not have ui-test-result)**
#### Appsmith Client Build Workflow
_Workflow file: [client-build.yml](client-build.yml)_
Triggered on every commit to the client folder. This workflow is responsible for building & unit-testing the client side.
#### Appsmith Server Workflow
_Workflow file: [server.yml](server.yml)_
Triggered on every commit to the server folder. This workflow is responsible for building & unit-testing the Java server codebase.
#### Appsmith External Integration Test Workflow
_Workflow file: [external-client-test.yml](external-client-test.yml)_
Triggered only by the ok to test command dispatch. This workflow is responsible for building, unit-testing, integration testing and packaging both server and client code base. **(Comment: Notably not RTS)**
#### Appsmith Github Release Workflow
_Workflow file: [github-release.yml](github-release.yml)_
Triggered on `release` event on Github. This workflow is responsible for building client, server and RTS binaries and packaging them to the latest as well as the relevant release tag on Docker.
#### Ok To Test
_Workflow file: [ok-to-test.yml](ok-to-test.yml)_
Triggered by PR comments. This workflow triggers a repository dispatch for the [Appsmith External Integration Test Workflow](#appsmith-external-integration-test-workflow).
#### Test, build and push Docker Image
_Workflow file: [test-build-docker-image.yml](test-build-docker-image.yml)_
Triggered by PR reviews and push to release or master. This workflow is responsible for building client, server and RTS binaries and packaging them to fata container as well as the older separate containers.
#### Mark stale issues and pull requests
_Workflow file: [stale.yml](stale.yml)_
#### Label PRs based on title
_Workflow file: [pr-labeler.yml](pr-labeler.yml)_
#### Release Drafter
_Workflow file: [release-drafter.yml](release-drafter.yml)_
#### Remove old artifacts
_Workflow file: [remove-old-artifacts.yml](remove-old-artifacts.yml)_
#### Sync Community workflow
_Workflow file: [sync-community-repo.yml](sync-community-repo.yml)_
#### Potential Duplicate Issues
_Workflow file: [duplicate-issue-detector.yml](duplicate-issue-detector.yml)_
#### Mastermind Labeler Workflow
_Workflow file: [mastermind-labeler.yml](mastermind-labeler.yml)_

View File

@ -1,4 +1,4 @@
# This workflow is responsible for building, testing & packaging the Java server codebase # This workflow is responsible for building, testing & packaging the RTS Node server.
name: Build RTS Workflow name: Build RTS Workflow
on: on:

View File

@ -1,10 +1,10 @@
name: Appsmith Github Release Workflow name: Appsmith Github Release Workflow
# This workflow builds Docker images for server and client, and then pushes them to Docher Hub. # This workflow builds Docker images for server and client, and then pushes them to Docker Hub.
# The docker-tag with which this push happens in the release tag (e.g., v1.2.3 etc.). # The docker-tag with which this push happens is the release tag (e.g., v1.2.3 etc.).
# In addition to the above tag, unless the git-tag matches `*beta*`, we also push to the `latest` docker-tag. # In addition to the above tag, unless the git-tag matches `*beta*`, we also push to the `latest` docker-tag.
# This workflow does NOT run tests. # This workflow does NOT run tests.
# This workflow is automatically triggered when a relese is created on GitHub. # This workflow is automatically triggered when a release is created on GitHub.
on: on:
# Ref: <https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#release>. # Ref: <https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#release>.
@ -80,11 +80,11 @@ jobs:
- name: Create the bundle - name: Create the bundle
env: env:
REACT_APP_ENVIRONMENT: 'PRODUCTION' REACT_APP_ENVIRONMENT: "PRODUCTION"
REACT_APP_FUSIONCHARTS_LICENSE_KEY: '${{ secrets.APPSMITH_FUSIONCHARTS_LICENSE_KEY }}' REACT_APP_FUSIONCHARTS_LICENSE_KEY: "${{ secrets.APPSMITH_FUSIONCHARTS_LICENSE_KEY }}"
REACT_APP_SEGMENT_CE_KEY: '${{ secrets.APPSMITH_SEGMENT_CE_KEY }}' REACT_APP_SEGMENT_CE_KEY: "${{ secrets.APPSMITH_SEGMENT_CE_KEY }}"
REACT_APP_VERSION_ID: '${{ needs.prelude.outputs.tag }}' REACT_APP_VERSION_ID: "${{ needs.prelude.outputs.tag }}"
REACT_APP_INTERCOM_APP_ID: '${{ secrets.APPSMITH_INTERCOM_ID }}' REACT_APP_INTERCOM_APP_ID: "${{ secrets.APPSMITH_INTERCOM_ID }}"
run: | run: |
REACT_APP_VERSION_RELEASE_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \ REACT_APP_VERSION_RELEASE_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
yarn build yarn build

View File

@ -2,8 +2,8 @@ name: Appsmith External Integration Test Workflow
on: on:
# This workflow is only triggered by the ok to test command dispatch # This workflow is only triggered by the ok to test command dispatch
repository_dispatch: workflow_dispatch:
types: [ok-to-test-command] # types: [ok-to-test-command]
jobs: jobs:
server-build: server-build:

View File

@ -26,7 +26,8 @@ jobs:
with: with:
token: ${{ env.TOKEN }} # GitHub App installation access token token: ${{ env.TOKEN }} # GitHub App installation access token
reaction-token: ${{ secrets.GITHUB_TOKEN }} reaction-token: ${{ secrets.GITHUB_TOKEN }}
dispatch-type: workflow
issue-type: pull-request issue-type: pull-request
commands: ok-to-test commands: integration-tests
named-args: true named-args: true
permission: write permission: write

View File

@ -4,15 +4,6 @@ on:
# This line enables manual triggering of this workflow. # This line enables manual triggering of this workflow.
workflow_dispatch: workflow_dispatch:
pull_request_review:
types: [submitted]
branches: [release, master]
paths:
- "app/client/**"
- "app/server/**"
- "app/rts/**"
- "!app/client/cypress/manual_TestSuite/**"
# trigger for pushes to release and master # trigger for pushes to release and master
push: push:
branches: [release, release-frozen, master] branches: [release, release-frozen, master]
@ -530,8 +521,8 @@ 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)) &&
github.ref == 'refs/heads/release') github.ref == 'refs/heads/release')
#if: (success() && github.ref == 'refs/heads/master') || github.ref == 'refs/heads/release' #if: (success() && github.ref == 'refs/heads/master') || github.ref == 'refs/heads/release'
steps: steps:
# 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