Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
theodolite
Commits
861ee684
Commit
861ee684
authored
4 years ago
by
Sören Henning
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue-2-docker-build-push' into 'master'
Enable Docker push in pipeline See merge request
!22
parents
db4c3408
499faa9a
No related branches found
No related tags found
1 merge request
!22
Enable Docker push in pipeline
Pipeline
#650
passed with warnings
4 years ago
Stage: build
Stage: test
Stage: check
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+139
-10
139 additions, 10 deletions
.gitlab-ci.yml
with
139 additions
and
10 deletions
.gitlab-ci.yml
+
139
−
10
View file @
861ee684
...
...
@@ -25,6 +25,11 @@ build:
tags
:
-
exec-docker
script
:
./gradlew --build-cache assemble
artifacts
:
paths
:
-
"
build/libs/*.jar"
-
"
*/build/distributions/*.tar"
expire_in
:
1 day
test
:
stage
:
test
...
...
@@ -76,7 +81,7 @@ spotbugs:
.deploy
:
stage
:
deploy
tags
:
-
exec-d
ocker
-
exec-d
ind
# see https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
# for image usage and settings for building with TLS and docker in docker
image
:
docker:19.03.1
...
...
@@ -86,14 +91,138 @@ spotbugs:
DOCKER_TLS_CERTDIR
:
"
/certs"
script
:
-
DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
-
docker build --pull -t
titan-ccp-exp-bigdata19-bridge ./exp-bigdata19-bridge
-
docker tag
titan-ccp-exp-bigdata19-bridge $DOCKERHUB_ORG/titan-ccp-exp-bigdata19-bridge
:${DOCKER_TAG_NAME}latest
-
docker tag
titan-ccp-exp-bigdata19-bridge $DOCKERHUB_ORG/titan-ccp-exp-bigdata19-bridge
:$DOCKER_TAG_NAME$CI_COMMIT_SHA
-
docker build --pull -t
$IMAGE_NAME ./$JAVA_PROJECT_NAME
-
docker tag
$IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME
:${DOCKER_TAG_NAME}latest
-
docker tag
$IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME
:$DOCKER_TAG_NAME$CI_COMMIT_
SHORT_
SHA
-
echo $DOCKERHUB_PW | docker login -u $DOCKERHUB_ID --password-stdin
-
docker push $DOCKERHUB_ORG/
titan-ccp-exp-bigdata19-bridge
-
docker push $DOCKERHUB_ORG/
$IMAGE_NAME
-
docker logout
only
:
variables
:
-
$DOCKERHUB_ORG
-
$DOCKERHUB_ID
-
$DOCKERHUB_PW
rules
:
-
changes
:
# - $JAVA_PROJECT_NAME/**/* # hope this can be simplified soon, see #51
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
deploy-uc1-kstreams-app
:
extends
:
.deploy
variables
:
IMAGE_NAME
:
"
theodolite-uc1-kstreams-app"
JAVA_PROJECT_NAME
:
"
uc1-application"
rules
:
# hope this can be simplified soon, see #51
-
changes
:
-
uc1-application/**/*
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
deploy-uc2-kstreams-app
:
extends
:
.deploy
variables
:
IMAGE_NAME
:
"
theodolite-uc2-kstreams-app"
JAVA_PROJECT_NAME
:
"
uc2-application"
rules
:
# hope this can be simplified soon, see #51
-
changes
:
-
uc2-application/**/*
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
deploy-uc3-kstreams-app
:
extends
:
.deploy
variables
:
IMAGE_NAME
:
"
theodolite-uc3-kstreams-app"
JAVA_PROJECT_NAME
:
"
uc3-application"
rules
:
# hope this can be simplified soon, see #51
-
changes
:
-
uc3-application/**/*
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
deploy-uc4-kstreams-app
:
extends
:
.deploy
variables
:
IMAGE_NAME
:
"
theodolite-uc4-kstreams-app"
JAVA_PROJECT_NAME
:
"
uc4-application"
rules
:
# hope this can be simplified soon, see #51
-
changes
:
-
uc4-application/**/*
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
deploy-uc1-workload-generator
:
extends
:
.deploy
variables
:
IMAGE_NAME
:
"
theodolite-uc1-workload-generator"
JAVA_PROJECT_NAME
:
"
uc1-workload-generator"
rules
:
# hope this can be simplified soon, see #51
-
changes
:
-
uc1-workload-generator/**/*
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
deploy-uc2-workload-generator
:
extends
:
.deploy
variables
:
IMAGE_NAME
:
"
theodolite-uc2-workload-generator"
JAVA_PROJECT_NAME
:
"
uc2-workload-generator"
rules
:
# hope this can be simplified soon, see #51
-
changes
:
-
uc2-workload-generator/**/*
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
deploy-uc3-workload-generator
:
extends
:
.deploy
variables
:
IMAGE_NAME
:
"
theodolite-uc3-workload-generator"
JAVA_PROJECT_NAME
:
"
uc3-workload-generator"
rules
:
# hope this can be simplified soon, see #51
-
changes
:
-
uc3-workload-generator/**/*
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
deploy-uc4-workload-generator
:
extends
:
.deploy
variables
:
IMAGE_NAME
:
"
theodolite-uc4-workload-generator"
JAVA_PROJECT_NAME
:
"
uc4-workload-generator"
rules
:
# hope this can be simplified soon, see #51
-
changes
:
-
uc4-workload-generator/**/*
-
application-kafkastreams-commons/**/*
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
always
-
if
:
"
$DOCKERHUB_ORG
&&
$DOCKERHUB_ID
&&
$DOCKERHUB_PW
&&
$IMAGE_NAME
&&
$JAVA_PROJECT_NAME"
when
:
manual
allow_failure
:
true
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