This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CICD: Added Workflows & Docker Manifests
- Loading branch information
Showing
2 changed files
with
78 additions
and
98 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ name: CI/CD NON PROD INTERNAL WEB | |
run-name: CI/CD NON PROD INTERNAL WEB | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
@@ -149,104 +150,104 @@ jobs: | |
outputs: | ||
image_tag: ${{ steps.push-image.outputs.image_tag }} | ||
|
||
deploy-on-non-prod-cluster: | ||
# deploy-on-non-prod-cluster: | ||
|
||
name: Deploy on Non Prod Cluster | ||
if: github.ref == 'refs/heads/master' | ||
# name: Deploy on Non Prod Cluster | ||
# if: github.ref == 'refs/heads/master' | ||
|
||
needs: | ||
- unit-tests | ||
# - security | ||
# - static-analysis | ||
# - tests | ||
- build-test-push-sign-image | ||
# needs: | ||
# - unit-tests | ||
# # - security | ||
# # - static-analysis | ||
# # - tests | ||
# - build-test-push-sign-image | ||
|
||
runs-on: ubuntu-latest | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
# steps: | ||
|
||
- name: Deploy | ||
run: | | ||
echo 'Deploy on Non Prod' | ||
# - name: Deploy | ||
# run: | | ||
# echo 'Deploy on Non Prod' | ||
|
||
# uses: dvsa/.github/.github/workflows/trigger-github-workflow.yaml@feature/AddMiscAuxilaryWorkflows | ||
# with: | ||
# branch: 'feature/AWSRESET1-514' | ||
# git_repository: 'dvsa/dvsa-container-registry' | ||
# workflow_name: 'CD NON PROD INTERNAL WEB' | ||
# input_arguments: 'iuweb_image_tag=${{ needs.build-test-push-sign-image.outputs.image_tag }}' | ||
# secrets: | ||
# gh_token: ${{ secrets.DVSA_VOL_TERRAFORM_ACCESS_TOKEN }} | ||
# # uses: dvsa/.github/.github/workflows/trigger-github-workflow.yaml@feature/AddMiscAuxilaryWorkflows | ||
# # with: | ||
# # branch: 'feature/AWSRESET1-514' | ||
# # git_repository: 'dvsa/dvsa-container-registry' | ||
# # workflow_name: 'CD NON PROD INTERNAL WEB' | ||
# # input_arguments: 'iuweb_image_tag=${{ needs.build-test-push-sign-image.outputs.image_tag }}' | ||
# # secrets: | ||
# # gh_token: ${{ secrets.DVSA_VOL_TERRAFORM_ACCESS_TOKEN }} | ||
|
||
automation-tests: | ||
# automation-tests: | ||
|
||
name: Run Automation Tests | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
# name: Run Automation Tests | ||
# if: github.ref == 'refs/heads/master' | ||
# runs-on: ubuntu-latest | ||
|
||
needs: | ||
- deploy-on-non-prod-cluster | ||
# needs: | ||
# - deploy-on-non-prod-cluster | ||
|
||
steps: | ||
# steps: | ||
|
||
- name: Run automation tests | ||
run: | | ||
echo 'Run automation tests' | ||
# - name: Run automation tests | ||
# run: | | ||
# echo 'Run automation tests' | ||
|
||
build-nonprod-approved-image: | ||
# build-nonprod-approved-image: | ||
|
||
name: Build Non PROD Approved Image | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
# name: Build Non PROD Approved Image | ||
# if: github.ref == 'refs/heads/master' | ||
# runs-on: ubuntu-latest | ||
|
||
needs: | ||
- build-test-push-sign-image | ||
- deploy-on-non-prod-cluster | ||
- automation-tests | ||
# needs: | ||
# - build-test-push-sign-image | ||
# - deploy-on-non-prod-cluster | ||
# - automation-tests | ||
|
||
steps: | ||
# steps: | ||
|
||
- name: IUWEB_IMAGE_TAG & NONPROD_IUWEB_IMAGE_TAG | ||
run: | | ||
echo "IUWEB_IMAGE_TAG=${{ needs.build-test-push-sign-image.outputs.image_tag }}" >> $GITHUB_ENV | ||
echo "NONPROD_IUWEB_IMAGE_TAG=nonprod-${{ needs.build-test-push-sign-image.outputs.image_tag }}" >> $GITHUB_ENV | ||
# - name: IUWEB_IMAGE_TAG & NONPROD_IUWEB_IMAGE_TAG | ||
# run: | | ||
# echo "IUWEB_IMAGE_TAG=${{ needs.build-test-push-sign-image.outputs.image_tag }}" >> $GITHUB_ENV | ||
# echo "NONPROD_IUWEB_IMAGE_TAG=nonprod-${{ needs.build-test-push-sign-image.outputs.image_tag }}" >> $GITHUB_ENV | ||
|
||
- name: Configure AWS credentials on Non Production IUWEB ECR | ||
uses: aws-actions/[email protected] | ||
with: | ||
role-to-assume: ${{ secrets.VOL_AWS_ROLE_TOOLING_NONPROD }} | ||
role-session-name: GitHub_to_AWS_via_FederatedOIDC | ||
aws-region: ${{ env.AWS_REGION }} | ||
# - name: Configure AWS credentials on Non Production IUWEB ECR | ||
# uses: aws-actions/[email protected] | ||
# with: | ||
# role-to-assume: ${{ secrets.VOL_AWS_ROLE_TOOLING_NONPROD }} | ||
# role-session-name: GitHub_to_AWS_via_FederatedOIDC | ||
# aws-region: ${{ env.AWS_REGION }} | ||
|
||
- name: Login to Non Production IUWEB ECR | ||
id: login-ecr-iuweb-tooling-non-prod | ||
uses: aws-actions/[email protected] | ||
# - name: Login to Non Production IUWEB ECR | ||
# id: login-ecr-iuweb-tooling-non-prod | ||
# uses: aws-actions/[email protected] | ||
|
||
- name: Push Internal Web image | ||
if: github.ref == 'refs/heads/master' | ||
id: push-approved-image | ||
run: | | ||
echo "approved_image_tag=${NONPROD_IUWEB_IMAGE_TAG}" >> $GITHUB_OUTPUT | ||
docker pull ${IUWEB_NONPROD_TOOLING_REPO_URL}:${IUWEB_IMAGE_TAG} | ||
docker tag ${IUWEB_NONPROD_TOOLING_REPO_URL}:${IUWEB_IMAGE_TAG} ${IUWEB_NONPROD_TOOLING_REPO_URL}:${NONPROD_IUWEB_IMAGE_TAG} | ||
docker push ${IUWEB_NONPROD_TOOLING_REPO_URL}:${NONPROD_IUWEB_IMAGE_TAG} | ||
# - name: Push Internal Web image | ||
# if: github.ref == 'refs/heads/master' | ||
# id: push-approved-image | ||
# run: | | ||
# echo "approved_image_tag=${NONPROD_IUWEB_IMAGE_TAG}" >> $GITHUB_OUTPUT | ||
# docker pull ${IUWEB_NONPROD_TOOLING_REPO_URL}:${IUWEB_IMAGE_TAG} | ||
# docker tag ${IUWEB_NONPROD_TOOLING_REPO_URL}:${IUWEB_IMAGE_TAG} ${IUWEB_NONPROD_TOOLING_REPO_URL}:${NONPROD_IUWEB_IMAGE_TAG} | ||
# docker push ${IUWEB_NONPROD_TOOLING_REPO_URL}:${NONPROD_IUWEB_IMAGE_TAG} | ||
|
||
outputs: | ||
approved_image_tag: ${{ steps.push-approved-image.outputs.approved_image_tag }} | ||
# outputs: | ||
# approved_image_tag: ${{ steps.push-approved-image.outputs.approved_image_tag }} | ||
|
||
qa-approval: | ||
# qa-approval: | ||
|
||
name: QA Internal Web Image Approval | ||
if: github.ref == 'refs/heads/master' | ||
# name: QA Internal Web Image Approval | ||
# if: github.ref == 'refs/heads/master' | ||
|
||
needs: | ||
- build-nonprod-approved-image | ||
# needs: | ||
# - build-nonprod-approved-image | ||
|
||
uses: dvsa/.github/.github/workflows/trigger-github-workflow.yaml@feature/AddMiscAuxilaryWorkflows | ||
with: | ||
branch: 'feature/AddWorkflows' | ||
git_repository: 'dvsa/olcs-internal' | ||
workflow_name: 'qa-internal-web-approval.yaml' | ||
input_arguments: 'iuweb_image_tag=${{ needs.build-nonprod-approved-image.outputs.approved_image_tag }}' | ||
secrets: | ||
gh_token: ${{ secrets.DVSA_VOL_TERRAFORM_ACCESS_TOKEN }} | ||
# uses: dvsa/.github/.github/workflows/trigger-github-workflow.yaml@feature/AddMiscAuxilaryWorkflows | ||
# with: | ||
# branch: 'feature/AddWorkflows' | ||
# git_repository: 'dvsa/olcs-internal' | ||
# workflow_name: 'qa-internal-web-approval.yaml' | ||
# input_arguments: 'iuweb_image_tag=${{ needs.build-nonprod-approved-image.outputs.approved_image_tag }}' | ||
# secrets: | ||
# gh_token: ${{ secrets.DVSA_VOL_TERRAFORM_ACCESS_TOKEN }} |