Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Import Process
Mapper Service
Commits
402c9094
Commit
402c9094
authored
Nov 19, 2020
by
Jonas Waeber
Browse files
Update gitlab ci
parent
56e3e9b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
402c9094
...
...
@@ -5,79 +5,10 @@ stages:
-
test
-
publish
test
:
stage
:
test
image
:
gradle:6.3-jdk8
tags
:
-
mbr
script
:
-
gradle --no-daemon --no-scan --no-build-cache test --fail-fast
.build-image
:
stage
:
publish
image
:
docker:stable
services
:
-
docker:dind
script
:
-
docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" "$REGISTRY"
-
docker build --pull -t "$IMAGE_TAG" -f "$DOCKERFILE" .
-
docker push "$IMAGE_TAG"
-
docker logout
build-tagged-image
:
extends
:
.build-image
variables
:
IMAGE_TAG
:
"
$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
REGISTRY_PASSWORD
:
"
$CI_REGISTRY_PASSWORD"
REGISTRY_USER
:
"
$CI_REGISTRY_USER"
REGISTRY
:
"
$CI_REGISTRY"
DOCKERFILE
:
"
Dockerfile"
only
:
-
tags
build-latest-image
:
extends
:
.build-image
variables
:
IMAGE_TAG
:
"
$CI_REGISTRY_IMAGE:latest"
REGISTRY_PASSWORD
:
"
$CI_REGISTRY_PASSWORD"
REGISTRY_USER
:
"
$CI_REGISTRY_USER"
REGISTRY
:
"
$CI_REGISTRY"
DOCKERFILE
:
"
Dockerfile"
only
:
-
master
build-feature-branch-image
:
extends
:
.build-image
variables
:
IMAGE_TAG
:
"
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
REGISTRY_PASSWORD
:
"
$CI_REGISTRY_PASSWORD"
REGISTRY_USER
:
"
$CI_REGISTRY_USER"
REGISTRY
:
"
$CI_REGISTRY"
DOCKERFILE
:
"
Dockerfile"
except
:
-
master
-
tags
test-chart
:
stage
:
test
image
:
dtzar/helm-kubectl:3.2.0
tags
:
-
mbr
script
:
-
helm lint helm-charts/
publish-chart
:
stage
:
publish
image
:
dtzar/helm-kubectl:3.2.0
tags
:
-
mbr
script
:
-
export HELM_EXPERIMENTAL_OCI=1
-
helm registry login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
-
./insert_chart_versions.sh
-
helm chart save helm-charts/ "$CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_TAG-chart"
-
helm chart push "$CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_TAG-chart"
-
helm registry logout "$CI_REGISTRY"
only
:
-
tags
\ No newline at end of file
include
:
-
project
:
'
memoriav/memobase-2020/utilities/ci-templates'
file
:
'
gradle-test/gradle-test.yml'
-
project
:
'
memoriav/memobase-2020/utilities/ci-templates'
file
:
'
docker-image/docker-image.yml'
-
project
:
'
memoriav/memobase-2020/utilities/ci-templates'
file
:
'
helm-chart/helm-chart.yml'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment