Skip to content
Snippets Groups Projects

Gitlab tests2

All threads resolved!
1 file
+ 0
149
Compare changes
  • Side-by-side
  • Inline
+ 0
149
@@ -13,44 +13,6 @@ variables:
@@ -13,44 +13,6 @@ variables:
# Templates
# Templates
## --------------------------------------------------
## --------------------------------------------------
.adjust_image_names:
before_script:
- IMAGE_NAME=usgs/${APP_NAME}:${CI_COMMIT_REF_SLUG}
- IMAGE_NAME=${IMAGE_NAME/:master/:latest}
- INTERNAL_IMAGE_NAME=${CI_REGISTRY_IMAGE}/${IMAGE_NAME}
- STACK_NAME=${APP_NAME}
.build_docker_image:
cache: {}
extends:
- .adjust_image_names
image: ${CODE_REGISTRY}/ghsc/hazdev/cloud-formation/hazdev-build-runner:latest
only:
- master@ghsc/geomag/geomag-algorithms
- production@ghsc/geomag/geomag-algorithms
- tags@ghsc/geomag/geomag-algorithms
script:
- docker build
--pull
--build-arg APP_NAME=${APP_NAME}
--build-arg FROM_IMAGE=${FROM_IMAGE}
--build-arg GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME}
--build-arg GIT_COMMIT_SHA=${CI_COMMIT_SHA}
--tag local/${IMAGE_NAME} .
- docker tag local/${IMAGE_NAME} ${IMAGE_NAME}
- docker push ${IMAGE_NAME}
- docker image rm ${IMAGE_NAME}
- docker tag local/${IMAGE_NAME} ${INTERNAL_IMAGE_NAME}
- docker push ${INTERNAL_IMAGE_NAME}
- docker image rm ${INTERNAL_IMAGE_NAME}
stage: integration
tags:
- build
variables:
FROM_IMAGE: ${CODE_REGISTRY}/devops/images/usgs/centos:latest
.check_code:
.check_code:
cache: {}
cache: {}
image: usgs/centos:latest
image: usgs/centos:latest
@@ -83,63 +45,6 @@ variables:
@@ -83,63 +45,6 @@ variables:
variables:
variables:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.8
.deploy:
cache: {}
extends:
- .adjust_image_names
image: ${CODE_REGISTRY}/ghsc/hazdev/cloud-formation/hazdev-build-runner:latest
script:
- git clone ${GENERIC_SWARM_DEPLOY_REPO} generic-deploy
- export REGISTRY=${CI_REGISTRY_IMAGE}
- cp -v
generic-deploy/default.config.sh
generic-deploy/default.funcs.sh
generic-deploy/deploy.sh
scripts/.
- ./scripts/deploy.sh
stage: deploy
tags:
- deploy
- swarm
.staging:
only:
- master@ghsc/geomag/geomag-algorithms
- tags@ghsc/geomag/geomag-algorithms
.staging01:
tags:
- staging01
.staging02:
tags:
- staging02
.mage:
variables:
USGS_ONLY: 'false'
.mage01:
tags:
- mage01
.production:
except:
- ^.*beta.*$
- ^.*-rc.*$
only:
- tags@ghsc/geomag/geomag-algorithms
- production@ghsc/geomag/geomag-algorithms
when: manual
.production01:
tags:
- production01
.production02:
tags:
- production02
## --------------------------------------------------
## --------------------------------------------------
# Test Stage
# Test Stage
## --------------------------------------------------
## --------------------------------------------------
@@ -161,57 +66,3 @@ Check Python 3.8:
@@ -161,57 +66,3 @@ Check Python 3.8:
- .check_code
- .check_code
variables:
variables:
PYTHON_VERSION: '3.8'
PYTHON_VERSION: '3.8'
## --------------------------------------------------
# Integration Stage
## --------------------------------------------------
Build Algorithms Docker Image:
extends:
- .build_docker_image
variables:
APP_NAME: geomag-algorithms
## --------------------------------------------------
# Deploy Stage
## --------------------------------------------------
# Deploy Production01:
# extends:
# - .deploy
# - .production
# - .production01
# variables:
# APP_NAME: geomag-plots
# Deploy Production02:
# extends:
# - .deploy
# - .production
# - .production02
# variables:
# APP_NAME: geomag-plots
# Deploy Staging01:
# extends:
# - .deploy
# - .staging
# - .staging01
# variables:
# APP_NAME: geomag-plots
# Deploy Staging02:
# extends:
# - .deploy
# - .staging
# - .staging02
# variables:
# APP_NAME: geomag-plots
# Deploy Mage01:
# extends:
# - .deploy
# - .staging
# - .mage
# - .mage01
# variables:
# APP_NAME: geomag-plots
Loading