Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geosphere-deploy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cspp_geo
geosphere
geosphere-deploy
Commits
77191032
Verified
Commit
77191032
authored
4 years ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Add kubernetes tag to CI runner tags
parent
148cb48f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+19
-25
19 additions, 25 deletions
.gitlab-ci.yml
helpers/build_image.yml
+1
-0
1 addition, 0 deletions
helpers/build_image.yml
with
20 additions
and
25 deletions
.gitlab-ci.yml
+
19
−
25
View file @
77191032
...
@@ -14,20 +14,34 @@ variables:
...
@@ -14,20 +14,34 @@ variables:
HELM_EXPERIMENTAL_OCI
:
"
1"
HELM_EXPERIMENTAL_OCI
:
"
1"
CICHART_IMAGE
:
"
$CI_REGISTRY_IMAGE/cichart:latest"
CICHART_IMAGE
:
"
$CI_REGISTRY_IMAGE/cichart:latest"
build ci
:
stage
:
.pre
.docker_based_job
:
image
:
docker:19.03.1
image
:
docker:19.03.1
tags
:
tags
:
-
docker
-
docker
-
kubernetes
services
:
services
:
-
docker:19.03.1-dind
-
docker:19.03.1-dind
before_script
:
before_script
:
-
docker info
-
docker info
-
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
-
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
.helm_based_job
:
extends
:
.docker_based_job
image
:
$CICHART_IMAGE
before_script
:
-
docker info
-
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
-
shopt -s expand_aliases
-
alias helm='docker run -t --rm -e HELM_EXPERIMENTAL_OCI="$HELM_EXPERIMENTAL_OCI" -v $(pwd):/apps -w /apps -v ~/.kube:/root/.kube -v ~/.helm:/root/.helm -v ~/.config/helm:/root/.config/helm -v ~/.cache/helm:/root/.cache/helm alpine/helm:3.2.3'
-
alias helm='docker run -t --rm -e HELM_EXPERIMENTAL_OCI="$HELM_EXPERIMENTAL_OCI" -v $(pwd):/apps -w /apps -v ~/.kube:/root/.kube -v ~/.helm:/root/.helm -v ~/.config/helm:/root/.config/helm -v ~/.cache/helm:/root/.cache/helm alpine/helm:3.2.3'
-
helm registry login -u ${CI_REGISTRY_USER} -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
-
helm registry login -u ${CI_REGISTRY_USER} -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
build ci
:
stage
:
.pre
extends
:
.docker_based_job
script
:
script
:
-
docker login --username $CI_REGISTRY_USER --password $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
cd cichart
-
cd cichart
-
docker build --tag $CICHART_IMAGE .
-
docker build --tag $CICHART_IMAGE .
-
docker push $CICHART_IMAGE
-
docker push $CICHART_IMAGE
...
@@ -40,23 +54,13 @@ build ci:
...
@@ -40,23 +54,13 @@ build ci:
.get_chart_tmpl
:
.get_chart_tmpl
:
extends
:
.helm_based_job
stage
:
get chart
stage
:
get chart
image
:
$CICHART_IMAGE
services
:
-
docker:19.03.1-dind
tags
:
-
docker
variables
:
variables
:
SUBCOMP_REPOS_BASE
:
"
https://gitlab.ssec.wisc.edu/cspp_geo/geosphere"
SUBCOMP_REPOS_BASE
:
"
https://gitlab.ssec.wisc.edu/cspp_geo/geosphere"
# required:
# required:
SUBCOMP_REPOS
:
"
"
SUBCOMP_REPOS
:
"
"
SUBCOMP_CHART_DIR
:
"
"
SUBCOMP_CHART_DIR
:
"
"
before_script
:
-
docker info
-
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
-
shopt -s expand_aliases
-
alias helm='docker run -t --rm -e HELM_EXPERIMENTAL_OCI="$HELM_EXPERIMENTAL_OCI" -v $(pwd):/apps -w /apps -v ~/.kube:/root/.kube -v ~/.helm:/root/.helm -v ~/.config/helm:/root/.config/helm -v ~/.cache/helm:/root/.cache/helm alpine/helm:3.2.3'
-
helm registry login -u ${CI_REGISTRY_USER} -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
script
:
script
:
-
repos_url="${SUBCOMP_REPOS_BASE}/${SUBCOMP_REPOS}"
-
repos_url="${SUBCOMP_REPOS_BASE}/${SUBCOMP_REPOS}"
-
git clone --depth 1 $repos_url
-
git clone --depth 1 $repos_url
...
@@ -93,18 +97,8 @@ get_chart_grb:
...
@@ -93,18 +97,8 @@ get_chart_grb:
# TODO: Use "environment: " to define a job for production and one for development
# TODO: Use "environment: " to define a job for production and one for development
# https://docs.gitlab.com/ee/ci/yaml/#environment
# https://docs.gitlab.com/ee/ci/yaml/#environment
deploy_g16_grb
:
deploy_g16_grb
:
extends
:
.helm_based_job
stage
:
deploy GRB
stage
:
deploy GRB
image
:
$CICHART_IMAGE
services
:
-
docker:19.03.1-dind
tags
:
-
docker
before_script
:
-
docker info
-
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
-
shopt -s expand_aliases
-
alias helm='docker run -t --rm -e HELM_EXPERIMENTAL_OCI="$HELM_EXPERIMENTAL_OCI" -v $(pwd):/apps -w /apps -v ~/.kube:/root/.kube -v ~/.helm:/root/.helm -v ~/.config/helm:/root/.config/helm -v ~/.cache/helm:/root/.cache/helm alpine/helm:3.2.3'
-
helm registry login -u ${CI_REGISTRY_USER} -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
script
:
script
:
-
if [ -n "$CI_COMMIT_TAG" ]; then
-
if [ -n "$CI_COMMIT_TAG" ]; then
ns="geosphere";
ns="geosphere";
...
...
This diff is collapsed.
Click to expand it.
helpers/build_image.yml
+
1
−
0
View file @
77191032
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
stage
:
build image
stage
:
build image
tags
:
tags
:
-
docker
-
docker
-
kubernetes
before_script
:
before_script
:
-
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
-
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
script
:
script
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment