Skip to content
Snippets Groups Projects

updated logic of the test-job

Merged Dobromir Palushev requested to merge just-a-test into staging
1 file
+ 2
6
Compare changes
  • Side-by-side
  • Inline
+ 2
6
workflow:
workflow:
rules:
rules:
- if: >-
- if: '$CI_COMMIT_BRANCH == "staging" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
$CI_COMMIT_BRANCH == "staging" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
when: always
- when: never
- when: never
@@ -130,7 +129,7 @@ deploy-image:
@@ -130,7 +129,7 @@ deploy-image:
variables:
variables:
ENVIRONMENT_NAME: 'staging'
ENVIRONMENT_NAME: 'staging'
STATIC_IP: 'staging-todoapp-ip'
STATIC_IP: 'staging-todoapp-ip'
- if: $CI_COMMIT_REF_NAME !~ /main/
- if: $CI_COMMIT_REF_NAME =~ /main/
when: 'always'
when: 'always'
variables:
variables:
ENVIRONMENT_NAME: 'production'
ENVIRONMENT_NAME: 'production'
@@ -150,6 +149,3 @@ deploy-image:
@@ -150,6 +149,3 @@ deploy-image:
- kubectl apply -f service.yaml --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}"
- kubectl apply -f service.yaml --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}"
- INGRESS_MANIFEST=$(sed -e "s,{{static-ip-name}},${STATIC_IP},g" ./ingress.yaml.tmpl)
- 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 -
- echo "${INGRESS_MANIFEST}" | kubectl apply --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}" --filename -
Loading