Skip to content
Snippets Groups Projects

geomag tag added to jobs

+ 7
9
@@ -15,12 +15,14 @@ variables:
@@ -15,12 +15,14 @@ variables:
BRANCH_OR_TAG: :${CI_COMMIT_REF_SLUG} # format looks like ':feature-branch'
BRANCH_OR_TAG: :${CI_COMMIT_REF_SLUG} # format looks like ':feature-branch'
BRANCH_OR_TAG: ${BRANCH_OR_TAG/:master/:latest} #replaces ':master' with ':latest'
BRANCH_OR_TAG: ${BRANCH_OR_TAG/:master/:latest} #replaces ':master' with ':latest'
DOCKER_AUTH_CONFIG: '{"auths":{"$CI_REGISTRY":{"username":"$CI_REGISTRY_USER","password":"$CI_REGISTRY_PASSWORD"}}}' #Authentication for Docker Executor.
DOCKER_AUTH_CONFIG: '{"auths":{"$CI_REGISTRY":{"username":"$CI_REGISTRY_USER","password":"$CI_REGISTRY_PASSWORD"}}}' #Authentication for Docker Executor.
GEOMAG_TAG: geomag
# Do not run in upstream for merge requests
# Do not run in upstream for merge requests
workflow:
workflow:
rules:
rules:
- if: $CI_COMMIT_TAG
- if: ($CI_COMMIT_TAG || $CI_COMMIT_BRANCH) && $CI_PROJECT_PATH != $UPSTREAM_PATH
- if: $CI_COMMIT_BRANCH
variables:
 
GEOMAG_TAG: staging01 #used when geomag tag is unavailable to a developer
 
- if: $CI_COMMIT_TAG || $CI_COMMIT_BRANCH
## --------------------------------------------------
## --------------------------------------------------
# Templates
# Templates
@@ -47,9 +49,6 @@ workflow:
@@ -47,9 +49,6 @@ workflow:
- export STACK_NAME=${APP_NAME}
- export STACK_NAME=${APP_NAME}
- ./scripts/deploy.sh
- ./scripts/deploy.sh
stage: deploy
stage: deploy
tags:
- deploy
- swarm
# these variables are defined in Gitlab, or set in scripts/custom.config.sh
# these variables are defined in Gitlab, or set in scripts/custom.config.sh
# variables:
# variables:
# DATABASE_URL
# DATABASE_URL
@@ -84,9 +83,6 @@ workflow:
@@ -84,9 +83,6 @@ workflow:
git pull --ff-only "${CI_REPOSITORY_URL}" "${CI_COMMIT_REF_NAME}";
git pull --ff-only "${CI_REPOSITORY_URL}" "${CI_COMMIT_REF_NAME}";
fi
fi
stage: deploy
stage: deploy
tags:
- deploy
- swarm
variables:
variables:
APP_DEPLOY_DIR: "/geomag/geomag-algorithms"
APP_DEPLOY_DIR: "/geomag/geomag-algorithms"
REQUIRED_PREFIX: "/geomag"
REQUIRED_PREFIX: "/geomag"
@@ -183,6 +179,7 @@ Test:
@@ -183,6 +179,7 @@ Test:
tags:
tags:
- deploy
- deploy
- swarm
- swarm
 
- $GEOMAG_TAG #ensures we use geomag-specific- deploy, swarm tagged runners
## --------------------------------------------------
## --------------------------------------------------
# Integration Stage
# Integration Stage
@@ -223,6 +220,7 @@ Build Docker Image:
@@ -223,6 +220,7 @@ Build Docker Image:
tags:
tags:
# TODO: refactor to separate build/publish steps
# TODO: refactor to separate build/publish steps
- deploy
- deploy
 
- $GEOMAG_TAG #ensures we use geomag-specific- deploy, swarm tagged runners
variables:
variables:
APP_NAME: geomag-algorithms
APP_NAME: geomag-algorithms
FROM_IMAGE: code.usgs.gov:5001/devops/images/usgs/python:3.10-obspy
FROM_IMAGE: code.usgs.gov:5001/devops/images/usgs/python:3.10-obspy
Loading