Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
DevOps
Project Templates
Commits
cf05d561
Commit
cf05d561
authored
Sep 16, 2021
by
Philip Paetz
Committed by
Georgi Petkov
Oct 17, 2021
Browse files
feat(ci): drop group prefix from kubernetes deployment & service names
parent
5db2c970
Pipeline
#32655
passed with stages
in 23 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
gitlab-ci/production.yml
View file @
cf05d561
...
...
@@ -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 = "${
DEPLOYMEN
T_NAME}"
name = "${
CI_PROJEC
T_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 ${
DEPLOYMEN
T_NAME} ||
true
-
terraform workspace select ${
DEPLOYMEN
T_NAME}
-
terraform workspace new ${
CI_PROJEC
T_NAME} ||
true
-
terraform workspace select ${
CI_PROJEC
T_NAME}
-
terraform refresh
-
terraform plan -input=false
-
terraform apply -auto-approve
-
kubectl wait --for=condition=available --timeout=3m
deployment/${
DEPLOYMEN
T_NAME} -n ${NAMESPACE_SLUG}
deployment/${
CI_PROJEC
T_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 -
...
...
gitlab-ci/staging.yml
View file @
cf05d561
...
...
@@ -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 = "${
DEPLOYMEN
T_NAME}"
name = "${
CI_PROJEC
T_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 ${
DEPLOYMEN
T_NAME} ||
true
-
terraform workspace select ${
DEPLOYMEN
T_NAME}
-
terraform workspace new ${
CI_PROJEC
T_NAME} ||
true
-
terraform workspace select ${
CI_PROJEC
T_NAME}
-
terraform refresh
-
terraform plan -input=false
-
terraform apply -auto-approve
-
kubectl wait --for=condition=available --timeout=3m
deployment/${
DEPLOYMEN
T_NAME} -n ${NAMESPACE_SLUG}
deployment/${
CI_PROJEC
T_NAME} -n ${NAMESPACE_SLUG}
-
echo -e "\n\n ✅ Successfully deployed to:\n\n\n" | cat -
terraform.tfvars.json
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment