diff --git a/.github/workflows/adapter-release.yml b/.github/workflows/adapter-release.yml index f5ee67c34..378c92374 100644 --- a/.github/workflows/adapter-release.yml +++ b/.github/workflows/adapter-release.yml @@ -85,7 +85,7 @@ jobs: cd apk-repo/adapter ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/adapter ./gradlew docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true diff --git a/.github/workflows/admin-domain-service-release.yml b/.github/workflows/admin-domain-service-release.yml deleted file mode 100644 index 5debd956f..000000000 --- a/.github/workflows/admin-domain-service-release.yml +++ /dev/null @@ -1,133 +0,0 @@ -name: Release Admin-domain-service. -on: - workflow_call: - inputs: - aks_deployment: - required: true - type: boolean - description: "Deploy to AKS" - secrets: - APK_BOT_TOKEN: - required: true - APK_BOT_USER: - required: true - APK_BOT_EMAIL: - required: true - DOCKER_ORGANIZATION: - required: true - AZURE_ACR_NAME: - required: true - AZURE_CREDENTIALS: - required: true - - workflow_dispatch: - inputs: - release_version: - required: true - type: string - description: "Release Version" - next_version: - type: string - description: "Next Development Version" - pull_request_target: - types: - - closed - paths: - - '**/admin/admin-domain-service/**' - - '**/common-bal-libs/**' - branches: - - 'main' -env: - GH_TOKEN: ${{ secrets.APK_BOT_TOKEN }} -concurrency: - group: admin-domain-service-${{ github.event.number || github.run_id }} - cancel-in-progress: true -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - name: Cache Ballerina. - uses: actions/cache@v3 - id: cache - with: - path: "ballerina-dist/*.deb" - key: "ballerina-2201.8.0" - - name: Download Ballerina distribution. - shell: sh - run: | - mkdir -p ballerina-dist - wget 'https://dist.ballerina.io/downloads/2201.8.0/ballerina-2201.8.0-swan-lake-linux-x64.deb' -P ballerina-dist - if: steps.cache.outputs.cache-hit != 'true' - - name: Install Ballerina distribution. - shell: sh - run: "sudo dpkg -i ballerina-dist/ballerina-2201.8.0-swan-lake-linux-x64.deb" - - name: Verify Ballerina Version - shell: sh - run: "bal -v" - - name: Checkout apk-repo - uses: actions/checkout@v3 - with: - fetch-depth: "0" - path: apk-repo - token: ${{ secrets.APK_BOT_TOKEN }} - - name: Set release username and email - shell: sh - run: | - git config --global user.name ${{ secrets.APK_BOT_USER }} - git config --global user.email ${{ secrets.APK_BOT_EMAIL }} - - name: checkout pull request and merge. - shell: sh - if: github.event_name == 'pull_request_target' && contains(github.event.label.name, 'trigger-action') - run: | - cd apk-repo - gh pr checkout ${{ github.event.number }} -b pr-${{ github.event.number }} - git checkout pr-${{ github.event.number }} - git merge origin/main - - - name: build common bal libs - run: | - cd apk-repo/common-bal-libs - ./gradlew build - - name: Run Gradle build - if: github.event_name == 'workflow_dispatch' && github.event.inputs.release_version != '' && github.event.inputs.next_version != '' - shell: sh - run: | - cd apk-repo - git checkout -b admin-domain-service-1.x - git push origin admin-domain-service-1.x - cd admin/admin-domain-service - ./gradlew release -Prelease.useAutomaticVersion=true -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Prelease.releaseVersion=${{ github.event.inputs.release_version }} -Prelease.newVersion=${{ github.event.inputs.next_version }} -PmultiArch=true -PreleaseBranch=admin-domain-service-1.x - ./gradlew :ballerina:commit_toml_files - git push origin admin-domain-service-1.x - - name: Run Gradle Build - run: | - cd apk-repo/admin/admin-domain-service - ./gradlew build - - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true - run: | - cd apk-repo/admin/admin-domain-service - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=${{ github.sha }} -PmultiArch=true - - name: Login to azure. - if: ${{inputs.aks_deployment}} - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - name: Push Docker images to aks. - if: ${{inputs.aks_deployment}} - run: | - az acr login -n ${{ secrets.AZURE_ACR_NAME }} - cd apk-repo/admin/admin-domain-service - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pimage_version=${{ github.sha }} -PmultiArch=true - - name: run codecov - uses: codecov/codecov-action@v3 - with: - verbose: true # optional (default = false) - directory: apk-repo/admin/admin-domain-service - flags: admin-domain-service diff --git a/.github/workflows/backoffice-release.yml b/.github/workflows/backoffice-release.yml deleted file mode 100644 index 741f238eb..000000000 --- a/.github/workflows/backoffice-release.yml +++ /dev/null @@ -1,134 +0,0 @@ -name: Release Backoffice-domain-service. -on: - workflow_call: - inputs: - aks_deployment: - required: true - type: boolean - description: "Deploy to AKS" - secrets: - APK_BOT_TOKEN: - required: true - APK_BOT_USER: - required: true - APK_BOT_EMAIL: - required: true - DOCKER_ORGANIZATION: - required: true - AZURE_ACR_NAME: - required: true - AZURE_CREDENTIALS: - required: true - - workflow_dispatch: - inputs: - release_version: - required: true - type: string - description: "Release Version" - next_version: - type: string - description: "Next Development Version" - pull_request_target: - types: - - closed - paths: - - '**/backoffice/backoffice-domain-service/**' - - '**/common-bal-libs/**' - branches: - - 'main' -env: - GH_TOKEN: ${{ secrets.APK_BOT_TOKEN }} -concurrency: - group: backoffice-${{ github.event.number || github.run_id }} - cancel-in-progress: true -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - name: Cache Ballerina. - uses: actions/cache@v3 - id: cache - with: - path: "ballerina-dist/*.deb" - key: "ballerina-2201.8.0" - - name: Download Ballerina distribution. - shell: sh - run: | - mkdir -p ballerina-dist - wget 'https://dist.ballerina.io/downloads/2201.8.0/ballerina-2201.8.0-swan-lake-linux-x64.deb' -P ballerina-dist - if: steps.cache.outputs.cache-hit != 'true' - - name: Install Ballerina distribution. - shell: sh - run: "sudo dpkg -i ballerina-dist/ballerina-2201.8.0-swan-lake-linux-x64.deb" - - name: Verify Ballerina Version - shell: sh - run: "bal -v" - - name: Checkout apk-repo - uses: actions/checkout@v3 - with: - fetch-depth: "0" - path: apk-repo - token: ${{ secrets.APK_BOT_TOKEN }} - - name: Set release username and email - shell: sh - run: | - git config --global user.name ${{ secrets.APK_BOT_USER }} - git config --global user.email ${{ secrets.APK_BOT_EMAIL }} - - name: checkout pull request and merge. - shell: sh - if: github.event_name == 'pull_request_target' && contains(github.event.label.name, 'trigger-action') - run: | - cd apk-repo - gh pr checkout ${{ github.event.number }} -b pr-${{ github.event.number }} - git checkout pr-${{ github.event.number }} - git merge origin/main - - - name: build common bal libs - run: | - cd apk-repo/common-bal-libs - ./gradlew build - - name: Run Gradle build - if: github.event_name == 'workflow_dispatch' && github.event.inputs.release_version != '' && github.event.inputs.next_version != '' - shell: sh - run: | - cd apk-repo - git checkout -b backoffice-domain-service-1.x - git push origin backoffice-domain-service-1.x - cd backoffice/backoffice-domain-service - ./gradlew release -Prelease.useAutomaticVersion=true -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Prelease.releaseVersion=${{ github.event.inputs.release_version }} -Prelease.newVersion=${{ github.event.inputs.next_version }} -PmultiArch=true -PreleaseBranch=backoffice-domain-service-1.x - ./gradlew :ballerina:commit_toml_files - git push origin backoffice-domain-service-1.x - - name: Run Gradle Build - run: | - cd apk-repo/backoffice/backoffice-domain-service - ./gradlew build - - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true - run: | - cd apk-repo/backoffice/backoffice-domain-service - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=${{ github.sha }} -PmultiArch=true - - name: Login to azure. - if: ${{inputs.aks_deployment}} - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - name: Push Docker images to aks. - if: ${{inputs.aks_deployment}} - run: | - az acr login -n ${{ secrets.AZURE_ACR_NAME }} - cd apk-repo/backoffice/backoffice-domain-service - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pimage_version=${{ github.sha }} -PmultiArch=true - - name: run codecov - uses: codecov/codecov-action@v3 - with: - verbose: true # optional (default = false) - directory: apk-repo/backoffice/backoffice-domain-service - flags: backoffice-domain-service - diff --git a/.github/workflows/common-controller-release.yml b/.github/workflows/common-controller-release.yml index 3ca9b7bfb..0cea4bbc2 100644 --- a/.github/workflows/common-controller-release.yml +++ b/.github/workflows/common-controller-release.yml @@ -85,7 +85,7 @@ jobs: cd apk-repo/common-controller ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/common-controller ./gradlew docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true diff --git a/.github/workflows/config-deployer-release.yml b/.github/workflows/config-deployer-release.yml index 63c478abc..c2fc30068 100644 --- a/.github/workflows/config-deployer-release.yml +++ b/.github/workflows/config-deployer-release.yml @@ -109,7 +109,7 @@ jobs: cd apk-repo/runtime/config-deployer-service ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/runtime/config-deployer-service ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true diff --git a/.github/workflows/devportal-domain-service-release.yml b/.github/workflows/devportal-domain-service-release.yml deleted file mode 100644 index 42f79eac1..000000000 --- a/.github/workflows/devportal-domain-service-release.yml +++ /dev/null @@ -1,134 +0,0 @@ -name: Release Devportal-domain-service. -on: - workflow_call: - inputs: - aks_deployment: - required: true - type: boolean - description: "Deploy to AKS" - secrets: - APK_BOT_TOKEN: - required: true - APK_BOT_USER: - required: true - APK_BOT_EMAIL: - required: true - DOCKER_ORGANIZATION: - required: true - AZURE_ACR_NAME: - required: true - AZURE_CREDENTIALS: - required: true - - workflow_dispatch: - inputs: - release_version: - required: true - type: string - description: "Release Version" - next_version: - type: string - description: "Next Development Version" - pull_request_target: - types: - - closed - paths: - - '**/devportal/devportal-domain-service/**' - - '**/common-bal-libs/**' - branches: - - 'main' -env: - GH_TOKEN: ${{ secrets.APK_BOT_TOKEN }} -concurrency: - group: devportal-domain-service-${{ github.event.number || github.run_id }} - cancel-in-progress: true -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - name: Cache Ballerina. - uses: actions/cache@v3 - id: cache - with: - path: "ballerina-dist/*.deb" - key: "ballerina-2201.8.0" - - name: Download Ballerina distribution. - shell: sh - run: | - mkdir -p ballerina-dist - wget 'https://dist.ballerina.io/downloads/2201.8.0/ballerina-2201.8.0-swan-lake-linux-x64.deb' -P ballerina-dist - if: steps.cache.outputs.cache-hit != 'true' - - name: Install Ballerina distribution. - shell: sh - run: "sudo dpkg -i ballerina-dist/ballerina-2201.8.0-swan-lake-linux-x64.deb" - - name: Verify Ballerina Version - shell: sh - run: "bal -v" - - name: Checkout apk-repo - uses: actions/checkout@v3 - with: - fetch-depth: "0" - path: apk-repo - token: ${{ secrets.APK_BOT_TOKEN }} - - name: Set release username and email - shell: sh - run: | - git config --global user.name ${{ secrets.APK_BOT_USER }} - git config --global user.email ${{ secrets.APK_BOT_EMAIL }} - - name: checkout pull request and merge. - shell: sh - if: github.event_name == 'pull_request_target' && contains(github.event.label.name, 'trigger-action') - run: | - cd apk-repo - gh pr checkout ${{ github.event.number }} -b pr-${{ github.event.number }} - git checkout pr-${{ github.event.number }} - git merge origin/main - - - name: build common bal libs - run: | - cd apk-repo/common-bal-libs - ./gradlew build - - name: Run Gradle build - if: github.event_name == 'workflow_dispatch' && github.event.inputs.release_version != '' && github.event.inputs.next_version != '' - shell: sh - run: | - cd apk-repo - git checkout -b devportal-domain-service-1.x - git push origin devportal-domain-service-1.x - cd devportal/devportal-domain-service - ./gradlew release -Prelease.useAutomaticVersion=true -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Prelease.releaseVersion=${{ github.event.inputs.release_version }} -Prelease.newVersion=${{ github.event.inputs.next_version }} -PmultiArch=true -PreleaseBranch=devportal-domain-service-1.x - ./gradlew :ballerina:commit_toml_files - git push origin devportal-domain-service-1.x - - name: Run Gradle Build - run: | - cd apk-repo/devportal/devportal-domain-service - ./gradlew build - - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true - run: | - cd apk-repo/devportal/devportal-domain-service - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=${{ github.sha }} -PmultiArch=true - - name: Login to azure. - if: ${{inputs.aks_deployment}} - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - name: Push Docker images to aks. - if: ${{inputs.aks_deployment}} - run: | - az acr login -n ${{ secrets.AZURE_ACR_NAME }} - cd apk-repo/devportal/devportal-domain-service - ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pimage_version=${{ github.sha }} -PmultiArch=true - - name: run codecov - uses: codecov/codecov-action@v3 - with: - verbose: true # optional (default = false) - directory: apk-repo/devportal/devportal-domain-service - flags: devportal-domain-service - diff --git a/.github/workflows/enforcer-release.yml b/.github/workflows/enforcer-release.yml index 39fec8275..1e92911d9 100644 --- a/.github/workflows/enforcer-release.yml +++ b/.github/workflows/enforcer-release.yml @@ -85,7 +85,7 @@ jobs: cd apk-repo/gateway/enforcer ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/gateway/enforcer ./gradlew docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true diff --git a/.github/workflows/idp-domain-service-release.yml b/.github/workflows/idp-domain-service-release.yml index 8b5b03f3d..d278f1f9b 100644 --- a/.github/workflows/idp-domain-service-release.yml +++ b/.github/workflows/idp-domain-service-release.yml @@ -103,7 +103,7 @@ jobs: cd apk-repo/idp/idp-domain-service ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/idp/idp-domain-service ./gradlew docker:docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true diff --git a/.github/workflows/idp-ui-release.yml b/.github/workflows/idp-ui-release.yml index f897c4412..f6ac26dd1 100644 --- a/.github/workflows/idp-ui-release.yml +++ b/.github/workflows/idp-ui-release.yml @@ -79,7 +79,7 @@ jobs: cd apk-repo/idp/idp-ui ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/idp/idp-ui ./gradlew docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true diff --git a/.github/workflows/management-server-release.yml b/.github/workflows/management-server-release.yml index 934d84f74..afd4ae446 100644 --- a/.github/workflows/management-server-release.yml +++ b/.github/workflows/management-server-release.yml @@ -87,7 +87,7 @@ jobs: cd apk-repo/management-server ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/management-server ./gradlew docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true diff --git a/.github/workflows/ratelimiter-release.yml b/.github/workflows/ratelimiter-release.yml index 59d8dc584..1aeee2e66 100644 --- a/.github/workflows/ratelimiter-release.yml +++ b/.github/workflows/ratelimiter-release.yml @@ -85,7 +85,7 @@ jobs: cd apk-repo/ratelimiter ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/ratelimiter ./gradlew docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true diff --git a/.github/workflows/router-release.yml b/.github/workflows/router-release.yml index eea1092c6..b5d1ef061 100644 --- a/.github/workflows/router-release.yml +++ b/.github/workflows/router-release.yml @@ -79,7 +79,7 @@ jobs: cd apk-repo/gateway/router ./gradlew build - name: Run Gradle Build - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request_target.merged == true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true run: | cd apk-repo/gateway/router ./gradlew docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true