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

Add initial CI and image building helper config

parents
No related branches found
No related tags found
No related merge requests found
stages:
get_charts
deploy_rabbit
deploy_grb
deploy_g2g
deploy_wms
deploy_wmts
.get_chart_tmpl:
variables:
SUBCOMP_REPOS_BASE: "https://gitlab.ssec.wisc.edu/cspp_geo/geosphere"
# required:
SUBCOMP_REPOS: ""
SUBCOMP_CHART_DIR: ""
script:
- repos_url="${SUBCOMP_REPOS_BASE}/${SUBCOMP_REPOS}"
- git clone --depth 1 $repos_url
- cd ${SUBCOMP_REPOS}
# most recent docker image should be tagged with most recent SHA
- docker_tag=$(git rev-parse --short HEAD)
- echo $docker_tag
- cd chart
- |-
sed -i "s/^appVersion: .*\$/appVersion: ${docker_tag}/g" ${SUBCOMP_CHART_DIR}/Chart.yaml
# debug:
- helm template ${SUBCOMP_CHART_DIR} .
# XXX: Do we always want to clone the subcomponent
# rules:
# - if: '$GEOSPHERE_SUBCOMP == ""'
# when: always
# - if: '$GEOSPHERE_SUBCOMP == $SUBCOMP_NAME'
# when: always
# - when: never
get_chart_grb:
extends: .get_chart_tmpl
variables:
SUBCOMP_REPOS: "geosphere-grb"
SUBCOMP_CHART_DIR: "cspp-geo-grb"
\ No newline at end of file
# GeoSphere Deploy
This repository holds the various configuration files needed to deploy
GeoSphere data processing jobs on the GeoSphere Kubernetes cluster(s).
To accomplish this deployment a series of GitLab "triggers" are configured
so when sub-components in the https://gitlab.ssec.wisc.edu/cspp_geo/geosphere
GitLab group are updated, deployment is executed and operational processing
is upgraded.
This repository also contains "helper" CI configs for sub-component
repositories to use for building and testing their pieces.
\ No newline at end of file
# template job for building images
# To use:
#
# include:
# - project: 'cspp_geo/geosphere/geosphere-deploy'
# file: '/helpers/build_image.yml'
#
# build_image_grb:
# extends: .build_image
# variables:
# IMAGE_NAME: "cspp-geo-grb"
# IMAGE_DIR: "cspp_geo_grb"
.build_image:
variables:
IMAGE_NAME: ""
IMAGE_DIR: ""
stage: build_image
tags:
- docker
script:
- image_url="${CI_REGISTRY_IMAGE}/${IMAGE_NAME}"
- if [ -z "$CI_COMMIT_TAG" ]; then
docker_tag=$CI_COMMIT_SHORT_SHA;
else
docker_tag=$CI_COMMIT_TAG;
fi;
- echo $docker_tag
- docker pull ${image_url}:latest || true
- docker build --cache-from ${image_url}:latest -t "${image_url}:latest" -t "${image_url}:${docker_tag}" ${IMAGE_DIR}
- docker push ${image_url}:${docker_tag}
- docker push ${image_url}:latest
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