Skip to content
Snippets Groups Projects
Commit 82851759 authored by Dobromir Palushev's avatar Dobromir Palushev
Browse files

Deployment on main

parent 8178b1a3
No related branches found
No related tags found
1 merge request!47Deployment on main
workflow:
rules:
- if: >-
$CI_COMMIT_BRANCH == "staging" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: '$CI_COMMIT_BRANCH == "staging" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: always
- when: never
......@@ -130,7 +129,7 @@ deploy-image:
variables:
ENVIRONMENT_NAME: 'staging'
STATIC_IP: 'staging-todoapp-ip'
- if: $CI_COMMIT_REF_NAME !~ /main/
- if: $CI_COMMIT_REF_NAME =~ /main/
when: 'always'
variables:
ENVIRONMENT_NAME: 'production'
......@@ -150,6 +149,3 @@ deploy-image:
- kubectl apply -f service.yaml --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}"
- INGRESS_MANIFEST=$(sed -e "s,{{static-ip-name}},${STATIC_IP},g" ./ingress.yaml.tmpl)
- echo "${INGRESS_MANIFEST}" | kubectl apply --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}" --filename -
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment