stages: - get chart - build prereqs - test - create storage - deploy rabbit - deploy GRB - deploy G2G - deploy tile gen - deploy WMS - deploy WMTS - deploy Client variables: DOCKER_TLS_CERTDIR: "" DOCKER_HOST: "tcp://localhost:2375" DOCKER_DRIVER: overlay2 HELM_EXPERIMENTAL_OCI: "1" CICHART_IMAGE: "$CI_REGISTRY_IMAGE/cichart:latest" GEOSPHERE_TAG_REGEX: "^r[0-9]+_[0-9]+" GEOSPHERE_TEST_TAG_REGEX: "^test-r[0-9]+_[0-9]+" GCP_TAG_REGEX: "^gcp-r[0-9]+_[0-9]+" # TESTS_BRANCH_REGEX: "^master" # only run tests for branches in the main repository TESTS_PROJECT_NAMESPACE: "cspp_geo/geosphere" GEOSPHERE_NAMESPACE: "geosphere" GEOSPHERE_TEST_NAMESPACE: "geosphere-test" GCP_NAMESPACE: "default" TESTS_NAMESPACE: "geosphere-ci-tests" include: - local: "/helpers/build_image.yaml" - local: "/helpers/docker_base.yaml" - local: "/helpers/helm_base.yaml" - local: "/helpers/get_chart.yaml" - local: "/ci_tests/gitlab-ci.yaml" - local: "/ci_geosphere/gitlab-ci.yaml" - local: "/ci_geosphere-test/gitlab-ci.yaml" # - local: "/ci_gcp/gitlab-ci.yaml" build ci: stage: .pre extends: .docker_based_job script: - cd cichart - docker build --tag $CICHART_IMAGE . - docker push $CICHART_IMAGE rules: # no need to build if another project triggered us - if: $CI_PIPELINE_SOURCE == "pipeline" when: never # no need to build with tags or non-master...probably - if: '$CI_COMMIT_BRANCH != "master"' when: never - changes: - cichart/Dockerfile when: always - if: $BUILD_CI_IMAGE when: always build sidecar rabbit init: stage: build prereqs extends: .build_image variables: IMAGE_NAME: cspp-geo-rabbit-init IMAGE_DIR: sidecars/cspp-geo-rabbit-init rules: # no need to build if another project triggered us - if: $CI_PIPELINE_SOURCE == "pipeline" when: never # no need to build with tags or non-master...probably - if: '$CI_COMMIT_BRANCH != "master"' when: never - changes: - sidecars/cspp-geo-rabbit-init/Dockerfile - sidecars/cspp-geo-rabbit-init/declare_exchange.py when: always - if: $BUILD_PREREQS when: always get_chart_grb: extends: .get_chart_tmpl variables: SUBCOMP_REPOS: "geosphere-grb" SUBCOMP_CHART_DIR: "cspp-geo-grb" get_chart_geo2grid: extends: .get_chart_tmpl variables: SUBCOMP_REPOS: "geosphere-geo2grid" SUBCOMP_CHART_DIR: "cspp-geo-geo2grid" get_chart_tilegen: extends: .get_chart_tmpl variables: SUBCOMP_REPOS: "geosphere-tile-gen" SUBCOMP_CHART_DIR: "geosphere-tile-gen" get_chart_mapserver: extends: .get_chart_tmpl variables: SUBCOMP_REPOS: "geosphere-mapserver" SUBCOMP_CHART_DIR: "geosphere-mapserver" get_chart_mapcache: extends: .get_chart_tmpl variables: SUBCOMP_REPOS: "geosphere-mapcache" SUBCOMP_CHART_DIR: "geosphere-mapcache" get_chart_client: extends: .get_chart_tmpl variables: SUBCOMP_REPOS: "geosphere-client" SUBCOMP_CHART_DIR: "geosphere-client" get_chart_client_test: extends: .get_chart_tmpl variables: SUBCOMP_REPOS: "geosphere-client" SUBCOMP_CHART_DIR: "geosphere-client" SUBCOMP_BRANCH: "develop" .deploy_geo2grid: # environment: # name: geosphere-test # url: http://geosphere-test.ssec.wisc.edu variables: DEPLOY_SUFFIX: "" VALUES_DIR: "" extends: .helm_based_job stage: deploy G2G script: - ./helpers/deploy_geo2grid.sh "${VALUES_DIR}" "${DEPLOY_SUFFIX}" dependencies: - get_chart_geo2grid .deploy_tile_gen: # environment: # name: geosphere-test # url: http://geosphere-test.ssec.wisc.edu variables: DEPLOY_SUFFIX: "" VALUES_DIR: "" extends: .helm_based_job stage: deploy tile gen script: - ./helpers/deploy_tile_gen.sh "${VALUES_DIR}" "${DEPLOY_SUFFIX}" dependencies: - get_chart_tilegen .deploy_mapserver: variables: VALUES_DIR: "" extends: .helm_based_job stage: deploy WMS script: - ns=$(./helpers/get_namespace.sh) - cd geosphere-mapserver/chart - source geosphere-mapserver/cibuild.env # copy secret kubeconfig to the mounted (pwd) directory - cp $kubekorner_k3s_config . - kubeconfig=$(basename $kubekorner_k3s_config) - echo "Deploying version $docker_tag to cluster namespace $ns" # copy extra values files to the local directory (where helm has access via docker mount) - cp ../../${VALUES_DIR}/values-mapserver.yaml . # namespace names are the same as domain names - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-mapserver.yaml geosphere-mapserver geosphere-mapserver/ dependencies: - get_chart_mapserver .deploy_mapcache: variables: VALUES_DIR: "" extends: .helm_based_job stage: deploy WMTS script: - ns=$(./helpers/get_namespace.sh) - cd geosphere-mapcache/chart - source geosphere-mapcache/cibuild.env # copy secret kubeconfig to the mounted (pwd) directory - cp $kubekorner_k3s_config . - kubeconfig=$(basename $kubekorner_k3s_config) - echo "Deploying version $docker_tag to cluster namespace $ns" # copy extra values files to the local directory (where helm has access via docker mount) - cp ../../${VALUES_DIR}/values-mapcache.yaml . # namespace names are the same as domain names - helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-mapcache.yaml geosphere-mapcache geosphere-mapcache/ dependencies: - get_chart_mapcache