From ac5f92645d9d293282b9196b6c09871142fad049 Mon Sep 17 00:00:00 2001 From: Anthony Mammoliti Date: Mon, 23 Sep 2024 16:56:52 -0400 Subject: [PATCH 1/5] Update CI pipelines --- .../build-and-publish-admin-server.yml | 132 ------------------ .../workflows/build-and-publish-admin-ui.yml | 132 ------------------ .../build-and-publish-server-filter.yml | 132 ------------------ .../workflows/pilot-pipeline-admin-server.yml | 16 +-- .github/workflows/pilot-pipeline-admin-ui.yml | 16 +-- .../pilot-pipeline-server-filter.yml | 16 +-- modules/admin-ui/package.json | 2 +- modules/admin/package.json | 2 +- modules/server-filter/package.json | 2 +- 9 files changed, 27 insertions(+), 423 deletions(-) delete mode 100644 .github/workflows/build-and-publish-admin-server.yml delete mode 100644 .github/workflows/build-and-publish-admin-ui.yml delete mode 100644 .github/workflows/build-and-publish-server-filter.yml diff --git a/.github/workflows/build-and-publish-admin-server.yml b/.github/workflows/build-and-publish-admin-server.yml deleted file mode 100644 index 7ab5ce112..000000000 --- a/.github/workflows/build-and-publish-admin-server.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Build and Publish admin server - -on: - push: - branches: [patched-version] - paths: - - 'modules/admin/**' -jobs: - extract-branch-name: - runs-on: ubuntu-20.04 - outputs: - branch: ${{steps.extract_branch.outputs.branch}} - steps: - - name: Extract Branch Name - id: extract_branch - shell: bash - run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - get-version: - runs-on: ubuntu-20.04 - outputs: - app_version: ${{steps.get-version.outputs.app_version}} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Get Version - id: get-version - shell: bash - run: | - BRANCH=${GITHUB_REF#refs/heads/} - BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' package.json` - if [ $BRANCH == "patched-version" ]; then - echo "app_version=$BASE_VERSION-`git rev-parse --short HEAD`" >> $GITHUB_OUTPUT - else - echo "app_version=$BASE_VERSION" >> $GITHUB_OUTPUT - fi - - build-and-push-docker-image: - needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'patched-version'}} - name: Build admin server Docker image and push to repositories - runs-on: ubuntu-20.04 - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - name: Login to Github Packages - uses: docker/login-action@v2 - with: - registry: pilotdataplatform.azurecr.io - username: ${{ secrets.ACR_CLIENT }} - password: ${{ secrets.ACR_SECRET }} - - name: Docker metadata - id: meta - uses: docker/metadata-action@v4 - with: - # list of Docker images to use as base name for tags - images: | - pilotdataplatform.azurecr.io/arranger/arranger-admin-server - # generate Docker tags based on the following events/attributes - sep-tags: ',' - tags: | - type=raw,prefix=arranger-admin-server-,suffix=,value=${{needs.get-version.outputs.app_version}} -# - name: Image digest -# run: echo ${{ steps.meta.outputs.tags }} - - name: Build image and push to GitHub Container Registry - uses: docker/build-push-action@v4 - with: - # relative path to the place where source code with Dockerfile is located - context: . - # Note: tags has to be all lower-case - tags: ${{ steps.meta.outputs.tags }} - # build on feature branches, push only on main branch - push: ${{ github.event_name != 'pull_request' }} - # Sets the target stage to build - target: arranger-admin-server - - Trigger: - needs: [build-and-push-docker-image, extract-branch-name, get-version] - #if: ${{ (github.event.workflow_run.conclusion == 'success' && needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }} - if: ${{ (needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }} - name: Trigger jenkins job - runs-on: ubuntu-latest - steps: - - name: Set branch-based environment variables - uses: iamtheyammer/branch-env-vars@v1.2.0 - with: - bevOverwrite: true - ENV: | - main:staging - patched-version:dev - CI_EXTERNAL_URL: | - main:https://ci-external.staging.pilot.indocresearch.com - patched-version:https://ci-external.dev.pilot.indocresearch.com - CI_API_TOKEN: | - main:${{ secrets.CI_API_TOKEN_STG }} - patched-version:${{ secrets.CI_API_TOKEN_DEV }} - - name: echo commit sha - # run: full_commit_SHA="${{ github.event.workflow_run.head_sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV - # getting commit_SHA for when this job has been trigger by push (not workflow_run) - run: full_commit_SHA="${{ github.sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV - - name: trigger the jenkins pipeline with curl - run: | - target_release=arranger-admin-server - env=${ENV} - echo "The CI external URL is ${CI_EXTERNAL_URL}" - curl --silent -i -X POST -m 60 -L -o output.txt --user jenkins:${CI_API_TOKEN} ${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/buildWithParameters --data TF_TARGET_ENV=$env --data TARGET_RELEASE=$target_release --data NEW_APP_VERSION="${{needs.get-version.outputs.app_version}}" - location=$(cat output.txt | grep location | cut -d " " -f2 | sed 's/\r//') - link=${location}api/json && echo $link && echo -n "location_link=$link" >> $GITHUB_ENV - - name: getting the json - run: | - sleep 10 - curl --silent -o output.json --user jenkins:${CI_API_TOKEN} -X GET "${{ env.location_link }}" - - name: getting the build number - uses: sergeysova/jq-action@v2 - id: build_number - with: - cmd: | - cd /github/workspace - build_num=$(jq .executable.number output.json -r) - echo $build_num && echo "build_number=$build_num" >> $GITHUB_ENV - - name: getting the result of the pipeline - run: | - timer=0; - timeout=300; - step=5; - echo "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" - result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"') - while [[ "$result" != "SUCCESS" && "$result" != "FAILURE" && $timer -lt $timeout ]]; do result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"') && sleep $step && ((timer=timer+step)) && echo "result=$result in $timer seconds"; done - if [ "$result" != "SUCCESS" ]; then exit 1; fi - diff --git a/.github/workflows/build-and-publish-admin-ui.yml b/.github/workflows/build-and-publish-admin-ui.yml deleted file mode 100644 index 96c00be76..000000000 --- a/.github/workflows/build-and-publish-admin-ui.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Build and Publish admin ui - -on: - push: - branches: [patched-version] - paths: - - 'modules/admin-ui/**' -jobs: - extract-branch-name: - runs-on: ubuntu-20.04 - outputs: - branch: ${{steps.extract_branch.outputs.branch}} - steps: - - name: Extract Branch Name - id: extract_branch - shell: bash - run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - get-version: - runs-on: ubuntu-20.04 - outputs: - app_version: ${{steps.get-version.outputs.app_version}} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Get Version - id: get-version - shell: bash - run: | - BRANCH=${GITHUB_REF#refs/heads/} - BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' package.json` - if [ $BRANCH == "patched-version" ]; then - echo "app_version=$BASE_VERSION-`git rev-parse --short HEAD`" >> $GITHUB_OUTPUT - else - echo "app_version=$BASE_VERSION" >> $GITHUB_OUTPUT - fi - - build-and-push-docker-image: - needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'patched-version'}} - name: Build admin ui Docker image and push to repositories - runs-on: ubuntu-20.04 - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - name: Login to Github Packages - uses: docker/login-action@v2 - with: - registry: pilotdataplatform.azurecr.io - username: ${{ secrets.ACR_CLIENT }} - password: ${{ secrets.ACR_SECRET }} - - name: Docker metadata - id: meta - uses: docker/metadata-action@v4 - with: - # list of Docker images to use as base name for tags - images: | - pilotdataplatform.azurecr.io/arranger/arranger-admin-ui - # generate Docker tags based on the following events/attributes - sep-tags: ',' - tags: | - type=raw,prefix=arranger-admin-ui-,suffix=,value=${{needs.get-version.outputs.app_version}} -# - name: Image digest -# run: echo ${{ steps.meta.outputs.tags }} - - name: Build image and push to GitHub Container Registry - uses: docker/build-push-action@v4 - with: - # relative path to the place where source code with Dockerfile is located - context: . - # Note: tags has to be all lower-case - tags: ${{ steps.meta.outputs.tags }} - # build on feature branches, push only on main branch - push: ${{ github.event_name != 'pull_request' }} - # Sets the target stage to build - target: arranger-admin-ui - - Trigger: - needs: [build-and-push-docker-image, extract-branch-name, get-version] - #if: ${{ (github.event.workflow_run.conclusion == 'success' && needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }} - if: ${{ (needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }} - name: Trigger jenkins job - runs-on: ubuntu-latest - steps: - - name: Set branch-based environment variables - uses: iamtheyammer/branch-env-vars@v1.2.0 - with: - bevOverwrite: true - ENV: | - main:staging - patched-version:dev - CI_EXTERNAL_URL: | - main:https://ci-external.staging.pilot.indocresearch.com - patched-version:https://ci-external.dev.pilot.indocresearch.com - CI_API_TOKEN: | - main:${{ secrets.CI_API_TOKEN_STG }} - patched-version:${{ secrets.CI_API_TOKEN_DEV }} - - name: echo commit sha - # run: full_commit_SHA="${{ github.event.workflow_run.head_sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV - # getting commit_SHA for when this job has been trigger by push (not workflow_run) - run: full_commit_SHA="${{ github.sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV - - name: trigger the jenkins pipeline with curl - run: | - target_release=arranger-admin-ui - env=${ENV} - echo "The CI external URL is ${CI_EXTERNAL_URL}" - curl --silent -i -X POST -m 60 -L -o output.txt --user jenkins:${CI_API_TOKEN} ${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/buildWithParameters --data TF_TARGET_ENV=$env --data TARGET_RELEASE=$target_release --data NEW_APP_VERSION="${{needs.get-version.outputs.app_version}}" - location=$(cat output.txt | grep location | cut -d " " -f2 | sed 's/\r//') - link=${location}api/json && echo $link && echo -n "location_link=$link" >> $GITHUB_ENV - - name: getting the json - run: | - sleep 10 - curl --silent -o output.json --user jenkins:${CI_API_TOKEN} -X GET "${{ env.location_link }}" - - name: getting the build number - uses: sergeysova/jq-action@v2 - id: build_number - with: - cmd: | - cd /github/workspace - build_num=$(jq .executable.number output.json -r) - echo $build_num && echo "build_number=$build_num" >> $GITHUB_ENV - - name: getting the result of the pipeline - run: | - timer=0; - timeout=300; - step=5; - echo "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" - result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"') - while [[ "$result" != "SUCCESS" && "$result" != "FAILURE" && $timer -lt $timeout ]]; do result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"') && sleep $step && ((timer=timer+step)) && echo "result=$result in $timer seconds"; done - if [ "$result" != "SUCCESS" ]; then exit 1; fi - diff --git a/.github/workflows/build-and-publish-server-filter.yml b/.github/workflows/build-and-publish-server-filter.yml deleted file mode 100644 index b0dec9212..000000000 --- a/.github/workflows/build-and-publish-server-filter.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Build and Publish server filter - -on: - push: - branches: [patched-version] - paths: - - 'modules/server-filter/**' -jobs: - extract-branch-name: - runs-on: ubuntu-20.04 - outputs: - branch: ${{steps.extract_branch.outputs.branch}} - steps: - - name: Extract Branch Name - id: extract_branch - shell: bash - run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - get-version: - runs-on: ubuntu-20.04 - outputs: - app_version: ${{steps.get-version.outputs.app_version}} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Get Version - id: get-version - shell: bash - run: | - BRANCH=${GITHUB_REF#refs/heads/} - BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' package.json` - if [ $BRANCH == "patched-version" ]; then - echo "app_version=$BASE_VERSION-`git rev-parse --short HEAD`" >> $GITHUB_OUTPUT - else - echo "app_version=$BASE_VERSION" >> $GITHUB_OUTPUT - fi - - build-and-push-docker-image: - needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'patched-version'}} - name: Build server filter Docker image and push to repositories - runs-on: ubuntu-20.04 - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - name: Login to Github Packages - uses: docker/login-action@v2 - with: - registry: pilotdataplatform.azurecr.io - username: ${{ secrets.ACR_CLIENT }} - password: ${{ secrets.ACR_SECRET }} - - name: Docker metadata - id: meta - uses: docker/metadata-action@v4 - with: - # list of Docker images to use as base name for tags - images: | - pilotdataplatform.azurecr.io/arranger/arranger-server - # generate Docker tags based on the following events/attributes - sep-tags: ',' - tags: | - type=raw,prefix=arranger-server-filter-,suffix=,value=${{needs.get-version.outputs.app_version}} -# - name: Image digest -# run: echo ${{ steps.meta.outputs.tags }} - - name: Build image and push to GitHub Container Registry - uses: docker/build-push-action@v4 - with: - # relative path to the place where source code with Dockerfile is located - context: . - # Note: tags has to be all lower-case - tags: ${{ steps.meta.outputs.tags }} - # build on feature branches, push only on main branch - push: ${{ github.event_name != 'pull_request' }} - # Sets the target stage to build - target: arranger-server - - Trigger: - needs: [build-and-push-docker-image, extract-branch-name, get-version] - #if: ${{ (github.event.workflow_run.conclusion == 'success' && needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }} - if: ${{ (needs.extract-branch-name.outputs.branch == 'patched-version') || (needs.extract-branch-name.outputs.branch == 'main') }} - name: Trigger jenkins job - runs-on: ubuntu-latest - steps: - - name: Set branch-based environment variables - uses: iamtheyammer/branch-env-vars@v1.2.0 - with: - bevOverwrite: true - ENV: | - main:staging - patched-version:dev - CI_EXTERNAL_URL: | - main:https://ci-external.staging.pilot.indocresearch.com - patched-version:https://ci-external.dev.pilot.indocresearch.com - CI_API_TOKEN: | - main:${{ secrets.CI_API_TOKEN_STG }} - patched-version:${{ secrets.CI_API_TOKEN_DEV }} - - name: echo commit sha - # run: full_commit_SHA="${{ github.event.workflow_run.head_sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV - # getting commit_SHA for when this job has been trigger by push (not workflow_run) - run: full_commit_SHA="${{ github.sha }}" && short_commit_SHA=$(echo "${full_commit_SHA:0:7}") && echo "SHA=$short_commit_SHA" >> $GITHUB_ENV - - name: trigger the jenkins pipeline with curl - run: | - target_release=arranger-server-filter - env=${ENV} - echo "The CI external URL is ${CI_EXTERNAL_URL}" - curl --silent -i -X POST -m 60 -L -o output.txt --user jenkins:${CI_API_TOKEN} ${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/buildWithParameters --data TF_TARGET_ENV=$env --data TARGET_RELEASE=$target_release --data NEW_APP_VERSION="${{needs.get-version.outputs.app_version}}" - location=$(cat output.txt | grep location | cut -d " " -f2 | sed 's/\r//') - link=${location}api/json && echo $link && echo -n "location_link=$link" >> $GITHUB_ENV - - name: getting the json - run: | - sleep 10 - curl --silent -o output.json --user jenkins:${CI_API_TOKEN} -X GET "${{ env.location_link }}" - - name: getting the build number - uses: sergeysova/jq-action@v2 - id: build_number - with: - cmd: | - cd /github/workspace - build_num=$(jq .executable.number output.json -r) - echo $build_num && echo "build_number=$build_num" >> $GITHUB_ENV - - name: getting the result of the pipeline - run: | - timer=0; - timeout=300; - step=5; - echo "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" - result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"') - while [[ "$result" != "SUCCESS" && "$result" != "FAILURE" && $timer -lt $timeout ]]; do result=$(curl --silent --user jenkins:${CI_API_TOKEN} -X GET "${CI_EXTERNAL_URL}/job/Infra/job/UpdateAppVersion/${{ env.build_number }}/api/json" | grep -Eo '"result"[^,]*' | grep -Eo '[^:]*$' | tr -d '"') && sleep $step && ((timer=timer+step)) && echo "result=$result in $timer seconds"; done - if [ "$result" != "SUCCESS" ]; then exit 1; fi - diff --git a/.github/workflows/pilot-pipeline-admin-server.yml b/.github/workflows/pilot-pipeline-admin-server.yml index 84648c832..2d454128d 100644 --- a/.github/workflows/pilot-pipeline-admin-server.yml +++ b/.github/workflows/pilot-pipeline-admin-server.yml @@ -3,12 +3,12 @@ name: CI pipeline admin server on: push: branches: - - patched-version + - pilot_develop paths: - 'modules/admin/**' pull_request: branches: - - patched-version + - pilot_develop paths: - 'modules/admin/**' @@ -35,12 +35,12 @@ jobs: shell: bash run: | BRANCH=${GITHUB_REF#refs/heads/} - BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' package.json` + BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' modules/admin/package.json` echo "app_version=$BASE_VERSION" >> $GITHUB_OUTPUT - build-and-push-docker-image: + build-and-push-admin-server-image: needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'patched-version'}} + if: ${{ needs.extract-branch-name.outputs.branch == 'pilot_develop'}} name: Build admin server Docker image and push to repositories runs-on: ubuntu-20.04 steps: @@ -52,7 +52,7 @@ jobs: - name: Login to Github Packages uses: docker/login-action@v2 with: - registry: pilotdataplatform.azurecr.io + registry: indocpilot.azurecr.io username: ${{ secrets.ACR_CLIENT }} password: ${{ secrets.ACR_SECRET }} - name: Docker metadata @@ -61,11 +61,11 @@ jobs: with: # list of Docker images to use as base name for tags images: | - pilotdataplatform.azurecr.io/arranger/arranger-admin-server + indocpilot.azurecr.io/arranger # generate Docker tags based on the following events/attributes sep-tags: ',' tags: | - type=raw,prefix=arranger-admin-server-,suffix=,value=${{needs.get-version.outputs.app_version}} + type=raw,prefix=admin-server-,suffix=,value=${{needs.get-version.outputs.app_version}} # - name: Image digest # run: echo ${{ steps.meta.outputs.tags }} - name: Image digest diff --git a/.github/workflows/pilot-pipeline-admin-ui.yml b/.github/workflows/pilot-pipeline-admin-ui.yml index 64a7ff7f5..3621b5158 100644 --- a/.github/workflows/pilot-pipeline-admin-ui.yml +++ b/.github/workflows/pilot-pipeline-admin-ui.yml @@ -3,12 +3,12 @@ name: CI pipeline admin ui on: push: branches: - - patched-version + - pilot_develop paths: - 'modules/admin-ui/**' pull_request: branches: - - patched-version + - pilot_develop paths: - 'modules/admin-ui/**' @@ -35,12 +35,12 @@ jobs: shell: bash run: | BRANCH=${GITHUB_REF#refs/heads/} - BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' package.json` + BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' modules/admin-ui/package.json` echo "app_version=$BASE_VERSION" >> $GITHUB_OUTPUT - build-and-push-docker-image: + build-and-push-admin-ui-image: needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'patched-version'}} + if: ${{ needs.extract-branch-name.outputs.branch == 'pilot_develop'}} name: Build admin ui Docker image and push to repositories runs-on: ubuntu-20.04 steps: @@ -52,7 +52,7 @@ jobs: - name: Login to Github Packages uses: docker/login-action@v2 with: - registry: pilotdataplatform.azurecr.io + registry: indocpilot.azurecr.io username: ${{ secrets.ACR_CLIENT }} password: ${{ secrets.ACR_SECRET }} - name: Docker metadata @@ -61,11 +61,11 @@ jobs: with: # list of Docker images to use as base name for tags images: | - pilotdataplatform.azurecr.io/arranger/arranger-admin-ui + indocpilot.azurecr.io/arranger # generate Docker tags based on the following events/attributes sep-tags: ',' tags: | - type=raw,prefix=arranger-admin-ui-,suffix=,value=${{needs.get-version.outputs.app_version}} + type=raw,prefix=admin-ui-,suffix=,value=${{needs.get-version.outputs.app_version}} # - name: Image digest # run: echo ${{ steps.meta.outputs.tags }} - name: Image digest diff --git a/.github/workflows/pilot-pipeline-server-filter.yml b/.github/workflows/pilot-pipeline-server-filter.yml index ce21ba37d..90ad9d76c 100644 --- a/.github/workflows/pilot-pipeline-server-filter.yml +++ b/.github/workflows/pilot-pipeline-server-filter.yml @@ -3,12 +3,12 @@ name: CI pipeline server filter on: push: branches: - - patched-version + - pilot_develop paths: - 'modules/server-filter/**' pull_request: branches: - - patched-version + - pilot_develop paths: - 'modules/server-filter/**' @@ -35,12 +35,12 @@ jobs: shell: bash run: | BRANCH=${GITHUB_REF#refs/heads/} - BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' package.json` + BASE_VERSION=`sed -n 's/^ *"version":.*"\([^"]*\)".*/\1/p' modules/server-filter/package.json` echo "app_version=$BASE_VERSION" >> $GITHUB_OUTPUT - build-and-push-docker-image: + build-and-push-sever-filter-image: needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'patched-version'}} + if: ${{ needs.extract-branch-name.outputs.branch == 'pilot_develop'}} name: Build server filter Docker image and push to repositories runs-on: ubuntu-20.04 steps: @@ -52,7 +52,7 @@ jobs: - name: Login to Github Packages uses: docker/login-action@v2 with: - registry: pilotdataplatform.azurecr.io + registry: indocpilot.azurecr.io username: ${{ secrets.ACR_CLIENT }} password: ${{ secrets.ACR_SECRET }} - name: Docker metadata @@ -61,11 +61,11 @@ jobs: with: # list of Docker images to use as base name for tags images: | - pilotdataplatform.azurecr.io/arranger/arranger-server + indocpilot.azurecr.io/arranger # generate Docker tags based on the following events/attributes sep-tags: ',' tags: | - type=raw,prefix=arranger-server-filter-,suffix=,value=${{needs.get-version.outputs.app_version}} + type=raw,prefix=server-filter-,suffix=,value=${{needs.get-version.outputs.app_version}} # - name: Image digest # run: echo ${{ steps.meta.outputs.tags }} - name: Image digest diff --git a/modules/admin-ui/package.json b/modules/admin-ui/package.json index 0a28f1bfa..19dfa700a 100644 --- a/modules/admin-ui/package.json +++ b/modules/admin-ui/package.json @@ -1,6 +1,6 @@ { "name": "@arranger/admin-ui", - "version": "2.19.3", + "version": "1.1.0", "dependencies": { "@arranger/admin": "^2.19.3", "@types/node": "^13.13.0", diff --git a/modules/admin/package.json b/modules/admin/package.json index 965a3f94f..5f84dab96 100644 --- a/modules/admin/package.json +++ b/modules/admin/package.json @@ -1,6 +1,6 @@ { "name": "@arranger/admin", - "version": "2.19.3", + "version": "1.1.0", "description": "Admin API for the Arranger server in graphql", "engineStrict": true, "type": "module", diff --git a/modules/server-filter/package.json b/modules/server-filter/package.json index f1a4511c9..8a9f8c412 100644 --- a/modules/server-filter/package.json +++ b/modules/server-filter/package.json @@ -1,6 +1,6 @@ { "name": "server-filter", - "version": "1.0.0", + "version": "1.1.0", "description": "", "main": "index.js", "type": "module", From 953eb147441b31c4c79459ae3b08429bed7a031a Mon Sep 17 00:00:00 2001 From: Anthony Mammoliti Date: Mon, 23 Sep 2024 17:02:16 -0400 Subject: [PATCH 2/5] Update renamed build step --- .github/workflows/pilot-pipeline-admin-server.yml | 2 +- .github/workflows/pilot-pipeline-admin-ui.yml | 2 +- .github/workflows/pilot-pipeline-server-filter.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pilot-pipeline-admin-server.yml b/.github/workflows/pilot-pipeline-admin-server.yml index 2d454128d..30ba630b8 100644 --- a/.github/workflows/pilot-pipeline-admin-server.yml +++ b/.github/workflows/pilot-pipeline-admin-server.yml @@ -122,7 +122,7 @@ jobs: fi trigger_pilot_dev_deployment: - needs: [build-and-push-docker-image, get-version] + needs: [build-and-push-admin-server-image, get-version] runs-on: ubuntu-20.04 if: github.event_name != 'pull_request' steps: diff --git a/.github/workflows/pilot-pipeline-admin-ui.yml b/.github/workflows/pilot-pipeline-admin-ui.yml index 3621b5158..8db60acab 100644 --- a/.github/workflows/pilot-pipeline-admin-ui.yml +++ b/.github/workflows/pilot-pipeline-admin-ui.yml @@ -122,7 +122,7 @@ jobs: fi trigger_pilot_dev_deployment: - needs: [build-and-push-docker-image, get-version] + needs: [build-and-push-admin-ui-image, get-version] runs-on: ubuntu-20.04 if: github.event_name != 'pull_request' steps: diff --git a/.github/workflows/pilot-pipeline-server-filter.yml b/.github/workflows/pilot-pipeline-server-filter.yml index 90ad9d76c..c169e276b 100644 --- a/.github/workflows/pilot-pipeline-server-filter.yml +++ b/.github/workflows/pilot-pipeline-server-filter.yml @@ -122,7 +122,7 @@ jobs: fi trigger_pilot_dev_deployment: - needs: [build-and-push-docker-image, get-version] + needs: [build-and-push-sever-filter-image, get-version] runs-on: ubuntu-20.04 if: github.event_name != 'pull_request' steps: From 518cf0d06f20eb4d1a7bbbd68da297c40298e001 Mon Sep 17 00:00:00 2001 From: Anthony Mammoliti Date: Mon, 23 Sep 2024 17:09:11 -0400 Subject: [PATCH 3/5] Remove if statement for build publish --- .github/workflows/pilot-pipeline-admin-server.yml | 1 - .github/workflows/pilot-pipeline-admin-ui.yml | 1 - .github/workflows/pilot-pipeline-server-filter.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/pilot-pipeline-admin-server.yml b/.github/workflows/pilot-pipeline-admin-server.yml index 30ba630b8..f3d27ad4a 100644 --- a/.github/workflows/pilot-pipeline-admin-server.yml +++ b/.github/workflows/pilot-pipeline-admin-server.yml @@ -40,7 +40,6 @@ jobs: build-and-push-admin-server-image: needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'pilot_develop'}} name: Build admin server Docker image and push to repositories runs-on: ubuntu-20.04 steps: diff --git a/.github/workflows/pilot-pipeline-admin-ui.yml b/.github/workflows/pilot-pipeline-admin-ui.yml index 8db60acab..c9370ec34 100644 --- a/.github/workflows/pilot-pipeline-admin-ui.yml +++ b/.github/workflows/pilot-pipeline-admin-ui.yml @@ -40,7 +40,6 @@ jobs: build-and-push-admin-ui-image: needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'pilot_develop'}} name: Build admin ui Docker image and push to repositories runs-on: ubuntu-20.04 steps: diff --git a/.github/workflows/pilot-pipeline-server-filter.yml b/.github/workflows/pilot-pipeline-server-filter.yml index c169e276b..9baaf8fdc 100644 --- a/.github/workflows/pilot-pipeline-server-filter.yml +++ b/.github/workflows/pilot-pipeline-server-filter.yml @@ -40,7 +40,6 @@ jobs: build-and-push-sever-filter-image: needs: [extract-branch-name, get-version] - if: ${{ needs.extract-branch-name.outputs.branch == 'pilot_develop'}} name: Build server filter Docker image and push to repositories runs-on: ubuntu-20.04 steps: From 9806154c053061102c85fc2e74ab45f01f2d841b Mon Sep 17 00:00:00 2001 From: Anthony Mammoliti Date: Mon, 23 Sep 2024 20:12:58 -0400 Subject: [PATCH 4/5] Fix docker image base --- .github/workflows/pilot-pipeline-admin-server.yml | 4 ++-- .github/workflows/pilot-pipeline-admin-ui.yml | 4 ++-- .github/workflows/pilot-pipeline-server-filter.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pilot-pipeline-admin-server.yml b/.github/workflows/pilot-pipeline-admin-server.yml index f3d27ad4a..7c712e910 100644 --- a/.github/workflows/pilot-pipeline-admin-server.yml +++ b/.github/workflows/pilot-pipeline-admin-server.yml @@ -60,11 +60,11 @@ jobs: with: # list of Docker images to use as base name for tags images: | - indocpilot.azurecr.io/arranger + indocpilot.azurecr.io/arranger/arranger-admin-server # generate Docker tags based on the following events/attributes sep-tags: ',' tags: | - type=raw,prefix=admin-server-,suffix=,value=${{needs.get-version.outputs.app_version}} + type=raw,prefix=arranger-admin-server-,suffix=,value=${{needs.get-version.outputs.app_version}} # - name: Image digest # run: echo ${{ steps.meta.outputs.tags }} - name: Image digest diff --git a/.github/workflows/pilot-pipeline-admin-ui.yml b/.github/workflows/pilot-pipeline-admin-ui.yml index c9370ec34..6c37f020b 100644 --- a/.github/workflows/pilot-pipeline-admin-ui.yml +++ b/.github/workflows/pilot-pipeline-admin-ui.yml @@ -60,11 +60,11 @@ jobs: with: # list of Docker images to use as base name for tags images: | - indocpilot.azurecr.io/arranger + indocpilot.azurecr.io/arranger/arranger-admin-ui # generate Docker tags based on the following events/attributes sep-tags: ',' tags: | - type=raw,prefix=admin-ui-,suffix=,value=${{needs.get-version.outputs.app_version}} + type=raw,prefix=arranger-admin-ui-,suffix=,value=${{needs.get-version.outputs.app_version}} # - name: Image digest # run: echo ${{ steps.meta.outputs.tags }} - name: Image digest diff --git a/.github/workflows/pilot-pipeline-server-filter.yml b/.github/workflows/pilot-pipeline-server-filter.yml index 9baaf8fdc..9c304f173 100644 --- a/.github/workflows/pilot-pipeline-server-filter.yml +++ b/.github/workflows/pilot-pipeline-server-filter.yml @@ -60,11 +60,11 @@ jobs: with: # list of Docker images to use as base name for tags images: | - indocpilot.azurecr.io/arranger + indocpilot.azurecr.io/arranger/arranger-server # generate Docker tags based on the following events/attributes sep-tags: ',' tags: | - type=raw,prefix=server-filter-,suffix=,value=${{needs.get-version.outputs.app_version}} + type=raw,prefix=arranger-server-filter-,suffix=,value=${{needs.get-version.outputs.app_version}} # - name: Image digest # run: echo ${{ steps.meta.outputs.tags }} - name: Image digest From 1db781db2e45e300ff78100f3dc35f50eaa3a135 Mon Sep 17 00:00:00 2001 From: Anthony Mammoliti Date: Mon, 23 Sep 2024 20:24:28 -0400 Subject: [PATCH 5/5] Update trivy ignore --- .github/.trivyignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/.trivyignore b/.github/.trivyignore index e69de29bb..3b794c71c 100644 --- a/.github/.trivyignore +++ b/.github/.trivyignore @@ -0,0 +1,7 @@ +# Vulnerabilities fixed, but will resolve in another PR +CVE-2023-45133 +CVE-2022-1650 +CVE-2021-3918 +CVE-2022-37601 +CVE-2021-44906 +CVE-2021-42740