diff --git a/.drone.yml b/.drone.yml index b94a4035..a08b9b67 100644 --- a/.drone.yml +++ b/.drone.yml @@ -149,9 +149,7 @@ steps: ALLOW_CVE_LIST_FILE: hof-services-config/Firearms_Licensing/trivy-cve-exceptions.txt when: event: - - pull_request - push - - tag # Deploy to pull request UAT environment @@ -168,7 +166,7 @@ steps: - bin/deploy.sh $${BRANCH_ENV} when: branch: master - event: pull_request + event: push - name: setup_branch pull: if-not-exists @@ -183,7 +181,7 @@ steps: include: - master - feature/* - event: pull_request + event: push - name: linting_branch <<: *linting @@ -192,7 +190,7 @@ steps: include: - master - feature/* - event: pull_request + event: push - name: unit_tests_branch <<: *unit_tests @@ -201,7 +199,7 @@ steps: include: - master - feature/* - event: pull_request + event: push - name: sonar_scanner_branch <<: *sonar_scanner @@ -210,7 +208,7 @@ steps: include: - master - feature/* - event: pull_request + event: push - name: build_acceptance_branch pull: if-not-exists @@ -220,7 +218,7 @@ steps: - docker build -f Dockerfile-acceptance -t firearms-acceptance-$${DRONE_COMMIT_SHA} . when: branch: master - event: pull_request + event: push # - name: test_acceptance_branch # pull: if-not-exists @@ -247,7 +245,7 @@ steps: - npm run test:acceptance when: branch: master - event: pull_request + event: push # Snyk security scans which run after branch deployment to prevent blocking of PR UAT tests - name: snyk_scan @@ -263,7 +261,7 @@ steps: include: - master - feature/* - event: pull_request + event: push # Deploy to Master UAT environment - name: deploy_to_uat @@ -278,7 +276,7 @@ steps: - bin/deploy.sh $${UAT_ENV} when: branch: master - event: push + event: pull_request - name: test_acceptance_uat <<: *acceptance_tests diff --git a/bin/deploy.sh b/bin/deploy.sh index a2230808..68b6cec4 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -29,7 +29,7 @@ if [[ ${KUBE_NAMESPACE} == ${BRANCH_ENV} ]]; then elif [[ ${KUBE_NAMESPACE} == ${UAT_ENV} ]]; then $kd -f kube/configmaps/configmap.yml -f kube/app/service.yml $kd -f kube/app/ingress-external.yml -f kube/app/networkpolicy-external.yml - $kd -f kube/app/ingress-internal.yml + $kd -f kube/app/ingress-internal.yml -f kube/app/networkpolicy-internal.yml $kd -f kube/redis -f kube/html-pdf -f kube/file-vault -f kube/app/deployment.yml elif [[ ${KUBE_NAMESPACE} == ${STG_ENV} ]]; then $kd -f kube/configmaps/configmap.yml -f kube/app/service.yml