From f19b7e29e67c0b7ef92320ff2beace99bad05af3 Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Mon, 15 Aug 2022 14:31:59 +0200 Subject: [PATCH 01/11] changes for testing pipeline --- devops/gcp/deploy/templates/virtual-service.yaml | 4 +++- devops/gcp/pipeline/override-stages.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/devops/gcp/deploy/templates/virtual-service.yaml b/devops/gcp/deploy/templates/virtual-service.yaml index 5214685..4b167ea 100644 --- a/devops/gcp/deploy/templates/virtual-service.yaml +++ b/devops/gcp/deploy/templates/virtual-service.yaml @@ -5,8 +5,10 @@ metadata: namespace: "{{ .Release.Namespace }}" spec: hosts: - {{- if .Values.conf.domain }} + {{- if and .Values.conf.domain .Values.conf.onPremEnabled }} - {{ printf "osdu.%s" .Values.conf.domain | quote }} + {{- else if .Values.conf.domain }} + - {{ .Values.conf.domain | quote }} {{- else }} - "*" {{- end }} diff --git a/devops/gcp/pipeline/override-stages.yml b/devops/gcp/pipeline/override-stages.yml index 573a4d3..ea2104a 100644 --- a/devops/gcp/pipeline/override-stages.yml +++ b/devops/gcp/pipeline/override-stages.yml @@ -31,8 +31,8 @@ osdu-gcp-helm-charts-release: .common_test_config: script: - echo $OSDU_GCP_INTEGRATION_TESTER | base64 -d > OSDU_GCP_INTEGRATION_TESTER.json - - gcloud auth activate-service-account --key-file OSDU_GCP_INTEGRATION_TESTER.json - gcloud config set project $OSDU_GCP_PROJECT + - gcloud auth activate-service-account --key-file OSDU_GCP_INTEGRATION_TESTER.json .common_deploy_config: script: -- GitLab From 877831979250199f8741f5f4f48e6901efbbd476 Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Mon, 15 Aug 2022 15:59:01 +0200 Subject: [PATCH 02/11] testing pipeline --- .gitlab-ci.yml | 1 + devops/gcp/pipeline/override-stages.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b39f88f..dbbd9d2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,6 +59,7 @@ include: file: "cloud-providers/ibm-policy-int-test.yml" - project: "osdu/platform/ci-cd-pipelines" + ref: "GONRG-5446-fix-policy-pipeline" file: "cloud-providers/osdu-gcp-global.yml" - local: "/devops/azure/override-stages.yml" diff --git a/devops/gcp/pipeline/override-stages.yml b/devops/gcp/pipeline/override-stages.yml index ea2104a..573a4d3 100644 --- a/devops/gcp/pipeline/override-stages.yml +++ b/devops/gcp/pipeline/override-stages.yml @@ -31,8 +31,8 @@ osdu-gcp-helm-charts-release: .common_test_config: script: - echo $OSDU_GCP_INTEGRATION_TESTER | base64 -d > OSDU_GCP_INTEGRATION_TESTER.json - - gcloud config set project $OSDU_GCP_PROJECT - gcloud auth activate-service-account --key-file OSDU_GCP_INTEGRATION_TESTER.json + - gcloud config set project $OSDU_GCP_PROJECT .common_deploy_config: script: -- GitLab From e4c98ce5ec0d50e1f1ce584e317dc77fb3466cac Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Mon, 15 Aug 2022 16:22:07 +0200 Subject: [PATCH 03/11] testing pipeline #2 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dbbd9d2..91eed85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,7 +59,7 @@ include: file: "cloud-providers/ibm-policy-int-test.yml" - project: "osdu/platform/ci-cd-pipelines" - ref: "GONRG-5446-fix-policy-pipeline" + # ref: "GONRG-5446-fix-policy-pipeline" file: "cloud-providers/osdu-gcp-global.yml" - local: "/devops/azure/override-stages.yml" -- GitLab From 6c67b5fb14ce9d5ecd853dac2713804e5f4497bd Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Mon, 15 Aug 2022 18:26:52 +0200 Subject: [PATCH 04/11] testing pipeline #3 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91eed85..3c2e5f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,7 +59,7 @@ include: file: "cloud-providers/ibm-policy-int-test.yml" - project: "osdu/platform/ci-cd-pipelines" - # ref: "GONRG-5446-fix-policy-pipeline" + ref: "refs/heads/GONRG-5446-fix-policy-pipeline" file: "cloud-providers/osdu-gcp-global.yml" - local: "/devops/azure/override-stages.yml" -- GitLab From 5f1d0ff5cdd50f7183c0de671f0b4d1846fad46f Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Tue, 16 Aug 2022 10:54:26 +0200 Subject: [PATCH 05/11] testing pipeline #4 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3c2e5f3..7100274 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,7 +59,7 @@ include: file: "cloud-providers/ibm-policy-int-test.yml" - project: "osdu/platform/ci-cd-pipelines" - ref: "refs/heads/GONRG-5446-fix-policy-pipeline" + ref: GONRG-5446-fix-policy-pipeline file: "cloud-providers/osdu-gcp-global.yml" - local: "/devops/azure/override-stages.yml" -- GitLab From 1d32d1f9c1c5a6ed3a8c83ea78e252b1ec77f528 Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Tue, 16 Aug 2022 13:05:44 +0200 Subject: [PATCH 06/11] changed value of OSDU_GCP to 1 in conditions --- devops/gcp/pipeline/override-stages.yml | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/devops/gcp/pipeline/override-stages.yml b/devops/gcp/pipeline/override-stages.yml index 573a4d3..43c109d 100644 --- a/devops/gcp/pipeline/override-stages.yml +++ b/devops/gcp/pipeline/override-stages.yml @@ -71,11 +71,11 @@ osdu-gcp-deploy-configmap-opa: --history-max=3 $OSDU_GCP_HELM_OPA_CONFIG_SERVICE_VARS rules: - - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_BRANCH =~ /^release/' when: never - - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_TAG' when: never - - if: '$OSDU_GCP == "true"' + - if: '$OSDU_GCP == "1"' when: on_success osdu-gcp-dev2-deploy-configmap-opa: @@ -95,9 +95,9 @@ osdu-gcp-dev2-deploy-configmap-opa: --set data.bucket_name=$OSDU_GCP_POLICY_BUCKET --set conf.data_partition_id=devtwo rules: - - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_BRANCH =~ /^release/' when: on_success - - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_TAG' when: on_success osdu-gcp-deploy-opa: @@ -117,11 +117,11 @@ osdu-gcp-deploy-opa: --history-max=3 - !reference [.verify_deploy, script] rules: - - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_BRANCH =~ /^release/' when: never - - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_TAG' when: never - - if: '$OSDU_GCP == "true"' + - if: '$OSDU_GCP == "1"' when: on_success osdu-gcp-dev2-deploy-opa: @@ -141,9 +141,9 @@ osdu-gcp-dev2-deploy-opa: --history-max=3 - !reference [.verify_deploy, script] rules: - - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_BRANCH =~ /^release/' when: on_success - - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_TAG' when: on_success osdu-gcp-bootstrap: @@ -162,11 +162,11 @@ osdu-gcp-bootstrap: - mv bundle-$DATA_PARTITION.tar.gz ./policies - gsutil rsync policies gs://$OSDU_GCP_POLICY_BUCKET/ rules: - - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_BRANCH =~ /^release/' when: never - - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_TAG' when: never - - if: '$OSDU_GCP == "true"' + - if: '$OSDU_GCP == "1"' when: on_success osdu-gcp-bootstrap-bundle: @@ -185,11 +185,11 @@ osdu-gcp-bootstrap-bundle: - mv bundle-$DATA_PARTITION.tar.gz ./policies - gsutil rsync policies gs://$OSDU_GCP_POLICY_BUCKET/ rules: - - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_BRANCH =~ /^release/' when: never - - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_TAG' when: never - - if: '$OSDU_GCP == "true"' + - if: '$OSDU_GCP == "1"' when: on_success osdu-gcp-dev2-bootstrap-bundle: @@ -208,9 +208,9 @@ osdu-gcp-dev2-bootstrap-bundle: - mv bundle-$DATA_PARTITION.tar.gz ./policies - gsutil rsync policies gs://$OSDU_GCP_POLICY_BUCKET/ rules: - - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_BRANCH =~ /^release/' when: on_success - - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_TAG' when: on_success osdu-gcp-dev2-bootstrap: @@ -229,9 +229,9 @@ osdu-gcp-dev2-bootstrap: - mv bundle-$DATA_PARTITION.tar.gz ./policies - gsutil rsync policies gs://$OSDU_GCP_POLICY_BUCKET/ rules: - - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_BRANCH =~ /^release/' when: on_success - - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + - if: '$OSDU_GCP == "1" && $CI_COMMIT_TAG' when: on_success osdu-gcp-test-python: @@ -274,7 +274,7 @@ osdu-gcp-anthos-deploy-configmap: when: never - if: "$CI_COMMIT_TAG" when: never - - if: '$OSDU_GCP == "true"' + - if: '$OSDU_GCP == "1"' when: never osdu-gcp-anthos-deploy-deployment: @@ -283,7 +283,7 @@ osdu-gcp-anthos-deploy-deployment: when: never - if: "$CI_COMMIT_TAG" when: never - - if: '$OSDU_GCP == "true"' + - if: '$OSDU_GCP == "1"' when: never osdu-gcp-anthos-test: @@ -292,7 +292,7 @@ osdu-gcp-anthos-test: when: never - if: "$CI_COMMIT_TAG" when: never - - if: '$OSDU_GCP == "true"' + - if: '$OSDU_GCP == "1"' when: never osdu-gcp-anthos-test-python: @@ -301,5 +301,5 @@ osdu-gcp-anthos-test-python: when: never - if: "$CI_COMMIT_TAG" when: never - - if: '$OSDU_GCP == "true" && $OSDU_GCP_INT_TEST_TYPE == "python"' + - if: '$OSDU_GCP == "1" && $OSDU_GCP_INT_TEST_TYPE == "python"' when: never -- GitLab From 133ecc6ab87516c068d055dde9cf4d33c9530e5c Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Tue, 16 Aug 2022 13:20:15 +0200 Subject: [PATCH 07/11] changed IBM and AZURE values to 1 as well in conditions --- devops/azure/override-stages.yml | 6 +++--- devops/ibm/bootstrap-bundle.yml | 2 +- devops/ibm/bootstrap.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/devops/azure/override-stages.yml b/devops/azure/override-stages.yml index 2a39df5..a8165a1 100644 --- a/devops/azure/override-stages.yml +++ b/devops/azure/override-stages.yml @@ -34,7 +34,7 @@ azure_containerize: only: variables: - - $AZURE == 'true' + - $AZURE == '1' azure_bootstrap: stage: bootstrap @@ -48,7 +48,7 @@ azure_bootstrap: - $AZURE_DEPLOYMENTS_SUBDIR/bootstrap.sh only: variables: - - $AZURE == 'true' + - $AZURE == '1' azure_test_py: extends: @@ -62,7 +62,7 @@ azure_test_py: - ./run-integration-tests.sh only: variables: - - $AZURE == 'true' + - $AZURE == '1' artifacts: when: on_failure paths: diff --git a/devops/ibm/bootstrap-bundle.yml b/devops/ibm/bootstrap-bundle.yml index 092dc41..3293731 100644 --- a/devops/ibm/bootstrap-bundle.yml +++ b/devops/ibm/bootstrap-bundle.yml @@ -15,4 +15,4 @@ ibm_bootstrap: - ./mc cp bundle.tar.gz bundle-server/$IBM_OPA_BUNDLE_SERVER_BUCKET/ only: variables: - - $IBM == 'true' \ No newline at end of file + - $IBM == '1' \ No newline at end of file diff --git a/devops/ibm/bootstrap.yml b/devops/ibm/bootstrap.yml index 7a1ace1..cbeb90f 100644 --- a/devops/ibm/bootstrap.yml +++ b/devops/ibm/bootstrap.yml @@ -10,10 +10,10 @@ ibm_bootstrap: - $IBM_DEPLOYMENTS_SUBDIR/bootstrap.sh only: variables: - - $IBM == 'true' + - $IBM == '1' ibm-test: needs: ["ibm_bootstrap"] only: variables: - - $IBM == 'true' + - $IBM == '1' -- GitLab From 69e845d6502b938a156a57242e2cf047c81a6842 Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Tue, 16 Aug 2022 13:47:28 +0200 Subject: [PATCH 08/11] deleted ref which was for testing --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7100274..b39f88f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,7 +59,6 @@ include: file: "cloud-providers/ibm-policy-int-test.yml" - project: "osdu/platform/ci-cd-pipelines" - ref: GONRG-5446-fix-policy-pipeline file: "cloud-providers/osdu-gcp-global.yml" - local: "/devops/azure/override-stages.yml" -- GitLab From a028b200f2692de18b15c69195c518ce671e0680 Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Tue, 16 Aug 2022 14:17:27 +0200 Subject: [PATCH 09/11] inserted newline to the end of bootstrap-bundle.yml --- devops/ibm/bootstrap-bundle.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devops/ibm/bootstrap-bundle.yml b/devops/ibm/bootstrap-bundle.yml index 3293731..e2fbc70 100644 --- a/devops/ibm/bootstrap-bundle.yml +++ b/devops/ibm/bootstrap-bundle.yml @@ -15,4 +15,5 @@ ibm_bootstrap: - ./mc cp bundle.tar.gz bundle-server/$IBM_OPA_BUNDLE_SERVER_BUCKET/ only: variables: - - $IBM == '1' \ No newline at end of file + - $IBM == '1' + \ No newline at end of file -- GitLab From be6e4e552381dc27aee7bbe3c9cb04d3434d877b Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Tue, 16 Aug 2022 14:18:55 +0200 Subject: [PATCH 10/11] added .editorconfig to insert newline to end of files on save --- .editorconfig | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5b462cc --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +insert_final_newline = true -- GitLab From b1b04e22e6af68da698f2d935cc2d9d9161fa837 Mon Sep 17 00:00:00 2001 From: Krisztian Molnar Date: Tue, 16 Aug 2022 14:22:11 +0200 Subject: [PATCH 11/11] deleted extra spaces --- devops/ibm/bootstrap-bundle.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/devops/ibm/bootstrap-bundle.yml b/devops/ibm/bootstrap-bundle.yml index e2fbc70..8b76f2a 100644 --- a/devops/ibm/bootstrap-bundle.yml +++ b/devops/ibm/bootstrap-bundle.yml @@ -16,4 +16,3 @@ ibm_bootstrap: only: variables: - $IBM == '1' - \ No newline at end of file -- GitLab