Skip to content
Snippets Groups Projects
Verified Commit 513c7862 authored by David Hoese's avatar David Hoese
Browse files

Add docker tag to CI jobs

parent 08e9cfba
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,8 @@ variables: ...@@ -16,6 +16,8 @@ variables:
build ci: build ci:
stage: .pre stage: .pre
image: docker:19.03.1 image: docker:19.03.1
tags:
- docker
services: services:
- docker:19.03.1-dind - docker:19.03.1-dind
before_script: before_script:
...@@ -61,6 +63,12 @@ build ci: ...@@ -61,6 +63,12 @@ build ci:
sed -i "s/^appVersion: .*\$/appVersion: ${docker_tag}/g" ${SUBCOMP_CHART_DIR}/Chart.yaml sed -i "s/^appVersion: .*\$/appVersion: ${docker_tag}/g" ${SUBCOMP_CHART_DIR}/Chart.yaml
# debug: # debug:
- helm template ${SUBCOMP_CHART_DIR} . - helm template ${SUBCOMP_CHART_DIR} .
artifacts:
paths:
- chart/${SUBCOMP_CHART_DIR}
variables:
- docker_tag
expire_in: 6 hours
# XXX: Do we always want to clone the subcomponent # XXX: Do we always want to clone the subcomponent
# rules: # rules:
# - if: '$GEOSPHERE_SUBCOMP == ""' # - if: '$GEOSPHERE_SUBCOMP == ""'
...@@ -73,4 +81,31 @@ get_chart_grb: ...@@ -73,4 +81,31 @@ get_chart_grb:
extends: .get_chart_tmpl extends: .get_chart_tmpl
variables: variables:
SUBCOMP_REPOS: "geosphere-grb" SUBCOMP_REPOS: "geosphere-grb"
SUBCOMP_CHART_DIR: "cspp-geo-grb" SUBCOMP_CHART_DIR: "cspp-geo-grb"
\ No newline at end of file
# TODO: Use "environment: " to define a job for production and one for development
# https://docs.gitlab.com/ee/ci/yaml/#environment
deploy_grb:
stage: deploy_grb
tags:
- docker
script:
- if [ -n "$CI_COMMIT_TAG" ]; then
ns="geosphere";
else
ns="geosphere-test";
fi
- echo $ns
- cd chart
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
# namespace names are the same as domain names
# - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns --set grbNotifier.image.dockerTag=$docker_tag --set grbProcessor.env[0].name=APID_FILTER --set grbProcessor.env[0].value="GOES-16-ABI-Only.xml" cspp-geo-grb cspp-geo-grb/
needs:
- job: get_chart_grb
artifacts: true
rules:
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
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