diff --git a/.github/workflows/ci-api-build.and.test.yml b/.github/workflows/ci-api-build.and.test.yml index 611a618..79a7c11 100644 --- a/.github/workflows/ci-api-build.and.test.yml +++ b/.github/workflows/ci-api-build.and.test.yml @@ -41,7 +41,7 @@ jobs: - name: Run unit tests run: mvn -f pom.xml clean package - name: Run Trivy vulnerability scanner in repo mode - uses: aquasecurity/trivy-action@0.2.5 + uses: aquasecurity/trivy-action@0.12.0 with: scan-type: 'fs' ignore-unfixed: true diff --git a/.github/workflows/deploy-to.openshift-prod.yml b/.github/workflows/deploy-to.openshift-prod.yml index 25615a7..4e2eaee 100644 --- a/.github/workflows/deploy-to.openshift-prod.yml +++ b/.github/workflows/deploy-to.openshift-prod.yml @@ -112,7 +112,7 @@ jobs: oc rollout cancel dc/${{ env.SPRING_BOOT_IMAGE_NAME }} 2> /dev/null \ || true && echo "No rollout in progress" - oc tag ${{ env.NAMESPACE }}-dev/${{ env.REPO_NAME }}-${{ env.BRANCH }}:${{ steps.get-latest-tag.outputs.tag }} ${{ env.NAMESPACE }}-prod/${{ env.REPO_NAME }}-${{ env.BRANCH }}:${{ steps.get-latest-tag.outputs.tag }} + oc tag ${{ env.NAMESPACE }}-test/${{ env.REPO_NAME }}-${{ env.BRANCH }}:${{ steps.get-latest-tag.outputs.tag }} ${{ env.NAMESPACE }}-prod/${{ env.REPO_NAME }}-${{ env.BRANCH }}:${{ steps.get-latest-tag.outputs.tag }} # Process and apply deployment template oc process -f tools/openshift/api.dc.yaml -p APP_NAME=${{ env.APP_NAME }} -p REPO_NAME=${{ env.REPO_NAME }} -p BRANCH=${{ env.BRANCH }} -p NAMESPACE=${{ env.OPENSHIFT_NAMESPACE }} -p TAG=${{ steps.get-latest-tag.outputs.tag }} -p MIN_REPLICAS=${{ env.MIN_REPLICAS }} -p MAX_REPLICAS=${{ env.MAX_REPLICAS }} -p MIN_CPU=${{ env.MIN_CPU }} -p MAX_CPU=${{ env.MAX_CPU }} -p MIN_MEM=${{ env.MIN_MEM }} -p MAX_MEM=${{ env.MAX_MEM }} \ diff --git a/.github/workflows/deploy-to.openshift-test.yml b/.github/workflows/deploy-to.openshift-test.yml index 9934442..145a60c 100644 --- a/.github/workflows/deploy-to.openshift-test.yml +++ b/.github/workflows/deploy-to.openshift-test.yml @@ -29,7 +29,7 @@ env: APP_NAME_FULL: "soam-api-master" NAMESPACE: ${{ secrets.COMMON_NAMESPACE_NO_ENV }} PEN_NAMESPACE: ${{ secrets.PEN_NAMESPACE_NO_ENV }} - TAG: "latest" + TAG: ${{ github.event.inputs.tag }} TARGET_ENV: "test" MIN_REPLICAS_TEST: "2" MAX_REPLICAS_TEST: "2" @@ -40,6 +40,12 @@ env: on: workflow_dispatch: + inputs: + tag: + description: 'Please input the tag, latest or release ex. 1.2.3' + type: string + required: true + default: "latest" jobs: