Commit cf05d561 authored by Philip Paetz's avatar Philip Paetz Committed by Georgi Petkov
Browse files

feat(ci): drop group prefix from kubernetes deployment & service names

parent 5db2c970
Pipeline #32655 passed with stages
in 23 seconds
......@@ -32,8 +32,7 @@ production:
| { host: .host, path: (.path // "/") }] else [ { host:
"${PRODUCTION_SUBDOMAIN}.${PRODUCTION_DOMAIN}", path: "/" } ] end | {
"ingresses": . }'
JQ_FIRST_INGRESS: ".ingresses[0] | (.host + .path)"
DEPLOYMENT_NAME: ${CI_PROJECT_PATH_SLUG}
JQ_FIRST_INGRESS: '.ingresses[0] | (.host + .path)'
extends: .use-gcloud
retry: 1
environment:
......@@ -56,7 +55,7 @@ production:
module "bbk_deploy" {
source = "git::https://git.brickblock.sh/devops/infrastructure/k8s-cluster-deploy.git"
app = {
name = "${DEPLOYMENT_NAME}"
name = "${CI_PROJECT_NAME}"
group = "${NAMESPACE_SLUG}"
image = "${CI_REGISTRY_IMAGE}"
image_tag = "${CI_COMMIT_REF_NAME}"
......@@ -78,13 +77,13 @@ production:
apply -f -
- terraform -v
- terraform init
- terraform workspace new ${DEPLOYMENT_NAME} || true
- terraform workspace select ${DEPLOYMENT_NAME}
- terraform workspace new ${CI_PROJECT_NAME} || true
- terraform workspace select ${CI_PROJECT_NAME}
- terraform refresh
- terraform plan -input=false
- terraform apply -auto-approve
- kubectl wait --for=condition=available --timeout=3m
deployment/${DEPLOYMENT_NAME} -n ${NAMESPACE_SLUG}
deployment/${CI_PROJECT_NAME} -n ${NAMESPACE_SLUG}
- CI_PROJECT_NAME=${CI_PROJECT_NAME} npx
@brickblock/slack-changelog-notifier || true
- echo -e "\n\n ✅ Successfully deployed to:\n\n\n" | cat -
......
......@@ -9,8 +9,7 @@ staging:
| { host: .host, path: (.path // "/") }] else [ { host:
"${STAGING_SUBDOMAIN}.${STAGING_DOMAIN}", path: "/" } ] end | {
"ingresses": . }'
JQ_FIRST_INGRESS: ".ingresses[0] | (.host + .path)"
DEPLOYMENT_NAME: ${CI_PROJECT_PATH_SLUG}
JQ_FIRST_INGRESS: '.ingresses[0] | (.host + .path)'
extends:
- .except-ci-release
- .use-gcloud
......@@ -36,7 +35,7 @@ staging:
module "bbk_deploy" {
source = "git::https://git.brickblock.sh/devops/infrastructure/k8s-cluster-deploy.git"
app = {
name = "${DEPLOYMENT_NAME}"
name = "${CI_PROJECT_NAME}"
group = "${NAMESPACE_SLUG}"
image = "${CI_REGISTRY_IMAGE}"
image_tag = "latest"
......@@ -58,12 +57,12 @@ staging:
apply -f -
- terraform -v
- terraform init
- terraform workspace new ${DEPLOYMENT_NAME} || true
- terraform workspace select ${DEPLOYMENT_NAME}
- terraform workspace new ${CI_PROJECT_NAME} || true
- terraform workspace select ${CI_PROJECT_NAME}
- terraform refresh
- terraform plan -input=false
- terraform apply -auto-approve
- kubectl wait --for=condition=available --timeout=3m
deployment/${DEPLOYMENT_NAME} -n ${NAMESPACE_SLUG}
deployment/${CI_PROJECT_NAME} -n ${NAMESPACE_SLUG}
- echo -e "\n\n ✅ Successfully deployed to:\n\n\n" | cat -
terraform.tfvars.json
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment