Newer
Older
# This file is included as part of the main repository .gitlab-ci.yml file
test gcp connection:
extends: .helm_based_job
stage: test
# don't need any artifacts for this to run
dependencies: []
script:
- gcloud compute instances list
- if [ "${GEOSPHERE_DEPLOY_GCP_CLUSTER_NAME}" != "" ]; then
gcloud container clusters get-credentials "${GEOSPHERE_DEPLOY_GCP_CLUSTER_NAME}" --zone "${GEOSPHERE_DEPLOY_GCP_ZONE_NAME}";
kubectl get all;
fi
extends: .helm_based_job
stage: create storage
script:
- ns=$(./helpers/get_namespace.sh)
- ./helpers/create_pvc.sh "$ns" "ci_gcp/geotiff-pvc.yaml" "cspp-geo-geo2grid"
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
when: never
# this will always be true for tags
- changes:
- if: $CREATE_STORAGE
extends: .helm_based_job
stage: create storage
script:
- ns=$(./helpers/get_namespace.sh)
- ./helpers/create_pvc.sh "$ns" "ci_gcp/postgres-pvc.yaml" "geosphere-postgis"
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
- if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
when: never
- changes:
- ci_gcp/postgres-pvc.yaml
- if: $CREATE_STORAGE
extends: .helm_based_job
stage: create storage
script:
- ns=$(./helpers/get_namespace.sh)
- ./helpers/create_pvc.sh "$ns" "ci_gcp/shapefiles-pvc.yaml" "geosphere-tile-gen-shapefiles"
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
when: never
# this will always be true for tags
- changes:
- ci_gcp/shapefiles-pvc.yaml
- if: $CREATE_STORAGE
extends: .helm_based_job
stage: deploy infrastructure
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
when: never
# no need to build if another project triggered us
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- changes:
- if: $DEPLOY_RABBIT
extends: .helm_based_job
stage: deploy infrastructure
script:
- ./helpers/deploy_postgis.sh ci_gcp
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
- if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
when: never
# no need to build if another project triggered us
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- changes:
- ci_gcp/values-postgis.yaml
- if: $DEPLOY_POSTGIS
gcp deploy grb:
extends: .helm_based_job
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
stage: deploy GRB
script:
- ns=$(./helpers/get_namespace.sh)
- cd geosphere-grb/chart
- source cspp-geo-grb/cibuild.env
# copy private ssh key to the chart for inclusion in the secret
- cp $GRB_PROXY_SSH_KEY cspp-geo-grb/secrets/grb_ssh_proxy_rsa
- echo "Deploying version $docker_tag to cluster namespace $ns"
- helm upgrade -v 2 --install --namespace $ns -f ../../ci_gcp/values-grb-g16.yaml cspp-geo-grb cspp-geo-grb/
dependencies:
- get_chart_grb
rules:
- if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
when: never
- when: on_success
gcp deploy geo2grid g16 radf:
extends: .deploy_geo2grid
variables:
VALUES_DIR: "ci_gcp"
DEPLOY_SUFFIX: "-g16-radf"
rules:
- if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
when: never
- when: on_success
gcp deploy tile gen g16 radf:
extends: .deploy_tile_gen
variables:
VALUES_DIR: "ci_gcp"
DEPLOY_SUFFIX: "-g16-radf"
rules:
- if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
when: never
- when: on_success
gcp deploy mapserver:
variables:
VALUES_DIR: "ci_gcp"
extends: .deploy_mapserver
rules:
- if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
when: never
- when: on_success
gcp deploy mapcache:
variables:
VALUES_DIR: "ci_gcp"
extends: .deploy_mapcache
rules:
- if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
when: never
- when: on_success
extends: .helm_based_job
- ns=$(./helpers/get_namespace.sh)
- source geosphere-client/cibuild.env
- echo "Deploying version $docker_tag to cluster namespace $ns"
- helm upgrade -v 2 --kubeconfig $HOME/.kube/config --install --namespace $ns -f ../../ci_gcp/values-client.yaml geosphere-client geosphere-client/
dependencies:
- get_chart_client_test
rules:
when: never
- when: on_success