From aefd1f94eb0bd8b0b24f97c94f8cae59ec5f5d43 Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sat, 28 Mar 2026 23:58:19 +0700 Subject: [PATCH 01/11] new CI --- .github/workflows/ci.yml | 112 ++++++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fdae7d..3645c78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,52 +1,76 @@ name: CI on: + workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'info' + type: choice + options: + - info + - warning + - debug + git-ref: + description: Git Ref (Optional) + required: false + push: + branches: + - master + - main + - '**-rc' + - production + - 'production-hotfix' + - 'v*' pull_request: - branches: [master] - types: [opened, synchronize, reopened] + branches: + - master permissions: - checks: write + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout jobs: - run-lint: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - uses: actions/setup-node@v3 - with: - node-version: 20.10.0 - - - name: Install dependencies - run: | - npm install -g yarn - yarn install --frozen-lockfile --non-interactive - - - name: Lint - run: | - yarn lint - - run-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - uses: actions/setup-node@v3 - with: - node-version: 20.10.0 - - - name: Install dependencies - run: | - npm install -g yarn - yarn install --frozen-lockfile --non-interactive - - - name: Test - run: | - yarn test + lint-test: + if: ${{ github.event_name == 'pull_request' }} + name: Quality Assurance + uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@master + with: + node-version: '20.10.0' + secrets: inherit + + build-push-image: + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + name: Build and Push image to ECR + uses: kobiton/deployment/.github/workflows/ci.yaml@master + with: + git-ref: ${{ github.event.inputs.git-ref }} + repo-name: 'appium-script-generator' + secrets: inherit + + # --- Feature-per-Release: Build, push, and deploy on PR --- + + detect-target-env: + if: ${{ github.event_name == 'pull_request' }} + uses: kobiton/deployment/.github/workflows/detect-target-env.yaml@master + secrets: inherit + + sonar: + if: ${{ github.event_name == 'pull_request' }} + name: SonarCloud + uses: kobiton/deployment/.github/workflows/sonar.yaml@master + with: + node-version: '20.10.0' + secrets: inherit + + build-push-image-pr: + needs: [lint-test, sonar, detect-target-env] + if: ${{ github.event_name == 'pull_request' }} + name: Build and Push image to ECR (PR) + uses: kobiton/deployment/.github/workflows/ci.yaml@master + with: + repo-name: 'appium-script-generator' + sandbox-env: ${{ needs.detect-target-env.outputs.environment }} + branch-name: ${{ github.head_ref }} + secrets: inherit From fc06bd0fe0608fdfdc8155b2737f98b8761419c9 Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 00:08:15 +0700 Subject: [PATCH 02/11] new CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3645c78..9bd03c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ on: pull_request: branches: - master + - main permissions: id-token: write # This is required for requesting the JWT From 67bbd3749f06c288466fe96bb13d54fa8aed945e Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 00:26:33 +0700 Subject: [PATCH 03/11] new CI --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bd03c9..8026334 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,9 @@ on: - main permissions: - id-token: write # This is required for requesting the JWT - contents: read # This is required for actions/checkout + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + pull-requests: write # Required by sonar workflow for PR decoration jobs: lint-test: From 5310f5060493979d3c7267aadce201be399303af Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 06:21:37 +0700 Subject: [PATCH 04/11] new CI --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8026334..79fc07b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: lint-test: if: ${{ github.event_name == 'pull_request' }} name: Quality Assurance - uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@master + uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@KOB-52442 with: node-version: '20.10.0' secrets: inherit @@ -45,7 +45,7 @@ jobs: build-push-image: if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} name: Build and Push image to ECR - uses: kobiton/deployment/.github/workflows/ci.yaml@master + uses: kobiton/deployment/.github/workflows/ci.yaml@KOB-52442 with: git-ref: ${{ github.event.inputs.git-ref }} repo-name: 'appium-script-generator' @@ -55,13 +55,13 @@ jobs: detect-target-env: if: ${{ github.event_name == 'pull_request' }} - uses: kobiton/deployment/.github/workflows/detect-target-env.yaml@master + uses: kobiton/deployment/.github/workflows/detect-target-env.yaml@KOB-52442 secrets: inherit sonar: if: ${{ github.event_name == 'pull_request' }} name: SonarCloud - uses: kobiton/deployment/.github/workflows/sonar.yaml@master + uses: kobiton/deployment/.github/workflows/sonar.yaml@KOB-52442 with: node-version: '20.10.0' secrets: inherit @@ -70,7 +70,7 @@ jobs: needs: [lint-test, sonar, detect-target-env] if: ${{ github.event_name == 'pull_request' }} name: Build and Push image to ECR (PR) - uses: kobiton/deployment/.github/workflows/ci.yaml@master + uses: kobiton/deployment/.github/workflows/ci.yaml@KOB-52442 with: repo-name: 'appium-script-generator' sandbox-env: ${{ needs.detect-target-env.outputs.environment }} From 94174df2d025f467c666f0e94d059bb412a922b2 Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 06:34:07 +0700 Subject: [PATCH 05/11] new CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79fc07b..a2da270 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: build-push-image: if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} name: Build and Push image to ECR - uses: kobiton/deployment/.github/workflows/ci.yaml@KOB-52442 + uses: kobiton/deployment/.github/workflows/ci.yaml@master with: git-ref: ${{ github.event.inputs.git-ref }} repo-name: 'appium-script-generator' From ea6abefe3e627bdcfa91c2ae2afa09ab770ee12e Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 06:37:03 +0700 Subject: [PATCH 06/11] new CI --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2da270..c91ba7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,8 @@ jobs: name: Quality Assurance uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@KOB-52442 with: - node-version: '20.10.0' + node-version: '22.13.1' + sync-submodule: 'true' secrets: inherit build-push-image: From 6a24d7c26224b6e8930ffba5b294a986854d7955 Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 16:34:14 +0700 Subject: [PATCH 07/11] new CI --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c91ba7f..3c25218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,8 @@ jobs: secrets: inherit build-push-image-pr: - needs: [lint-test, sonar, detect-target-env] + # needs: [lint-test, sonar, detect-target-env] + needs: [detect-target-env] if: ${{ github.event_name == 'pull_request' }} name: Build and Push image to ECR (PR) uses: kobiton/deployment/.github/workflows/ci.yaml@KOB-52442 From 662ef5e4347ddba15e4fcbb4ba52c8db7c783c54 Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 16:36:39 +0700 Subject: [PATCH 08/11] new CI --- .github/workflows/ci.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c25218..adbfaa9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,14 +34,14 @@ permissions: pull-requests: write # Required by sonar workflow for PR decoration jobs: - lint-test: - if: ${{ github.event_name == 'pull_request' }} - name: Quality Assurance - uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@KOB-52442 - with: - node-version: '22.13.1' - sync-submodule: 'true' - secrets: inherit + # lint-test: + # if: ${{ github.event_name == 'pull_request' }} + # name: Quality Assurance + # uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@KOB-52442 + # with: + # node-version: '22.13.1' + # sync-submodule: 'true' + # secrets: inherit build-push-image: if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} @@ -59,13 +59,13 @@ jobs: uses: kobiton/deployment/.github/workflows/detect-target-env.yaml@KOB-52442 secrets: inherit - sonar: - if: ${{ github.event_name == 'pull_request' }} - name: SonarCloud - uses: kobiton/deployment/.github/workflows/sonar.yaml@KOB-52442 - with: - node-version: '20.10.0' - secrets: inherit + # sonar: + # if: ${{ github.event_name == 'pull_request' }} + # name: SonarCloud + # uses: kobiton/deployment/.github/workflows/sonar.yaml@KOB-52442 + # with: + # node-version: '20.10.0' + # secrets: inherit build-push-image-pr: # needs: [lint-test, sonar, detect-target-env] From 6c654bfb6273a97173ffea9f70b8db947dc0e1b7 Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 16:44:10 +0700 Subject: [PATCH 09/11] new CI --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adbfaa9..dc47257 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,8 @@ jobs: name: Build and Push image to ECR (PR) uses: kobiton/deployment/.github/workflows/ci.yaml@KOB-52442 with: - repo-name: 'appium-script-generator' + repo-name: appium-script-generator + sync-submodule: 'true' sandbox-env: ${{ needs.detect-target-env.outputs.environment }} branch-name: ${{ github.head_ref }} secrets: inherit From 61bf418e23b9b34578792359d82ad8fe403ded9a Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Sun, 29 Mar 2026 17:07:21 +0700 Subject: [PATCH 10/11] new CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc47257..2e8e161 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: # lint-test: # if: ${{ github.event_name == 'pull_request' }} # name: Quality Assurance - # uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@KOB-52442 + # uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@master # with: # node-version: '22.13.1' # sync-submodule: 'true' @@ -62,7 +62,7 @@ jobs: # sonar: # if: ${{ github.event_name == 'pull_request' }} # name: SonarCloud - # uses: kobiton/deployment/.github/workflows/sonar.yaml@KOB-52442 + # uses: kobiton/deployment/.github/workflows/sonar.yaml@master # with: # node-version: '20.10.0' # secrets: inherit From 6b279008f81aa37b2b6c6b6a482565328e981942 Mon Sep 17 00:00:00 2001 From: duchnguyen <38968649+duchnguyen@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:12:17 +0700 Subject: [PATCH 11/11] New CI for feature per release --- .github/workflows/ci.yml | 31 +++++++++++-------------------- .github/workflows/sonar.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/sonar.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e8e161..b4eaebb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,14 +34,14 @@ permissions: pull-requests: write # Required by sonar workflow for PR decoration jobs: - # lint-test: - # if: ${{ github.event_name == 'pull_request' }} - # name: Quality Assurance - # uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@master - # with: - # node-version: '22.13.1' - # sync-submodule: 'true' - # secrets: inherit + lint-test: + if: ${{ github.event_name == 'pull_request' }} + name: Quality Assurance + uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@master + with: + node-version: '22.13.1' + sync-submodule: 'true' + secrets: inherit build-push-image: if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} @@ -56,23 +56,14 @@ jobs: detect-target-env: if: ${{ github.event_name == 'pull_request' }} - uses: kobiton/deployment/.github/workflows/detect-target-env.yaml@KOB-52442 + uses: kobiton/deployment/.github/workflows/detect-target-env.yaml@master secrets: inherit - # sonar: - # if: ${{ github.event_name == 'pull_request' }} - # name: SonarCloud - # uses: kobiton/deployment/.github/workflows/sonar.yaml@master - # with: - # node-version: '20.10.0' - # secrets: inherit - build-push-image-pr: - # needs: [lint-test, sonar, detect-target-env] - needs: [detect-target-env] + needs: [lint-test, detect-target-env] if: ${{ github.event_name == 'pull_request' }} name: Build and Push image to ECR (PR) - uses: kobiton/deployment/.github/workflows/ci.yaml@KOB-52442 + uses: kobiton/deployment/.github/workflows/ci.yaml@master with: repo-name: appium-script-generator sync-submodule: 'true' diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 0000000..685acae --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,33 @@ +name: SonarQube + +on: + workflow_dispatch: + inputs: + git-ref: + description: Git Ref (Optional) + required: false + schedule: + # Trigger at 09:30pm every Friday ICT + - cron: "30 2 * * 5" + + push: + branches: + - 'master' + - 'main' + + pull_request: + branches: + - 'master' + - 'main' + +jobs: + build: + if: github.event.repository.owner.login == 'kobiton' + name: Scans + uses: kobiton/deployment/.github/workflows/sonar.yaml@master + with: + repo-name: appium-script-generator + git-ref: ${{ github.event.inputs.git-ref }} + sonar-project-key: kobiton-appium-script-generator + node-version: '20.10.0' + secrets: inherit