Skip to content
Snippets Groups Projects

Indexer-core-plus service

Merged Joshua Hindmon requested to merge jdh-indexer-core-plus into master
Files
65
+ 118
0
variables:
GC_SERVICE: indexer
GC_VENDOR: gc
gc-baremetal-test:
variables:
GC_VENDOR: baremetal
CUCUMBER_OPTIONS: "--tags @default"
gc-containerize-gitlab:core-plus:
stage: containerize
needs:
- "compile-and-unit-test"
- "download_plugins"
tags: ["osdu-small"]
image: docker:19.03
cache: {}
variables:
BUILD_ARGS: "--build-arg PORT=$GC_PORT"
BUILD_PATH: "indexer-core-plus/cloudbuild/Dockerfile"
IMAGE_NAME: "indexer-core-plus"
script:
- !reference [.gc_set_image_name, script]
- docker build $EXTRA_TAG -f $BUILD_PATH $BUILD_ARGS .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME
rules:
- if: "$CI_COMMIT_BRANCH =~ /^release/"
when: never
- if: "$CI_COMMIT_TAG"
when: never
- if: "$PROTECTED == '1'"
when: on_success
gc-helm-charts-gitlab:core-plus:
stage: containerize
tags: ["osdu-small"]
needs: ["gc-containerize-gitlab:core-plus"]
image:
name: alpine/helm:3.11.2
entrypoint: [""]
variables:
IMAGE_NAME: "indexer-core-plus"
before_script:
- helm registry login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- !reference [.gc_set_image_name, script]
- !reference [.gc_substitute_image_in_helm, script]
script:
- !reference [.gc_define_app_version, script]
- helm package $GC_HELM_DEPLOYMENT_DIR -u --version $GC_HELM_PACKAGE_VERSION-$HELM_TAG --app-version $APP_VERSION
- helm push $GC_HELM_PACKAGE_NAME-$GC_HELM_PACKAGE_VERSION-$HELM_TAG.tgz oci://$CI_REGISTRY_IMAGE/core-plus-helm
rules:
- if: "$CI_COMMIT_BRANCH =~ /^release/"
when: never
- if: "$CI_COMMIT_TAG"
when: never
- if: "$PROTECTED == '1'"
when: on_success
gc-baremetal-deploy:
environment:
name: GC_Baremetal
extends: .gc-baremetal-variables
id_tokens:
GITLAB_OIDC_TOKEN:
aud: https://iam.googleapis.com/projects/${GC_PROJECT_NUMBER}/locations/global/workloadIdentityPools/${GC_POOL_ID}/providers/${GC_PROVIDER_ID}
tags: ["osdu-small"]
image: gcr.io/google.com/cloudsdktool/cloud-sdk:alpine
stage: deploy
needs:
- "gc-containerize-gitlab:core-plus"
- "gc-helm-charts-gitlab:core-plus"
retry: 1
variables:
IMAGE_NAME: "indexer-core-plus"
GC_SA_EMAIL: $GC_SA_GKE_EMAIL
script:
- !reference [.gc_obtain_credentials, script]
- !reference [.gc_set_image_name, script]
- !reference [.gc_common_config, script]
- >
helm upgrade $GC_SERVICE-deploy oci://$CI_REGISTRY_IMAGE/core-plus-helm/$GC_HELM_PACKAGE_NAME
--version $GC_HELM_PACKAGE_VERSION-$HELM_TAG
--install
--create-namespace
--namespace=$GC_HELM_NAMESPACE
--wait
--history-max=3
--set global.onPremEnabled=true
--set global.domain=$GC_DOMAIN
--set data.serviceAccountName=$GC_SERVICE
--set data.bootstrapServiceAccountName=$GC_BOOTSTRAP_SA
--set data.logLevel=INFO
--set data.springProfilesActive=$GC_SPRING_PROFILES_ACTIVE
--set data.bucketPrefix=$BUCKET_PREFIX
--set data.dataPartitionId=$GC_TENANT
--set data.groupId=$GROUP_ID
--set data.adminUserEmail=$GC_ADMIN_USER_EMAIL
--set data.airflowComposerEmail=$GC_AIRFLOW_COMPOSER_EMAIL
--set data.sharedTenantName=$GC_TENANT
--set opa.data.serviceAccountName=opa
--set data.bucketName=$GC_POLICY_BUCKET
--set data.googleCloudProject=$GC_PROJECT
--set data.subscriberPrivateKeyId=$GC_BAREMETAL_SUBSCRIBER_PRIVATE_KEY_ID
$GC_HELM_SETS
$GC_HELM_TIMEOUT
- !reference [.gc_verify_deploy, script]
- !reference [.gc_verify_bootstrap, script]
rules:
- if: "$CI_COMMIT_BRANCH =~ /^release/"
when: never
- if: "$CI_COMMIT_TAG"
when: never
- if: "$PROTECTED == '1'"
when: on_success
Loading