Skip to content
Snippets Groups Projects
Commit 222b5077 authored by Lars Bilke's avatar Lars Bilke
Browse files

[Jenkins] Push docker images.

parent 3db92ded
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env groovy
@Library('jenkins-pipeline@1.0.9') _
def stage_required = [build: false, data: false, full: false]
def stage_required = [build: false, data: false, full: false, docker: false]
pipeline {
agent none
......@@ -55,6 +55,10 @@ pipeline {
stage_required.data = true
echo "Updating Tests/Data."
}
if (path.startsWith("scripts/docker") && !stage_required.docker) {
stage_required.docker = true
echo "Doing Docker images build."
}
}
}
}
......@@ -335,6 +339,26 @@ pipeline {
stage('Master') {
when { environment name: 'JOB_NAME', value: 'ufz/ogs/master' }
parallel {
// ********************* Push Docker Images ****************************
stage('Push Docker Images') {
when {
beforeAgent true
expression { return stage_required.docker || stage_required.full }
}
agent { label 'docker' }
steps {
script {
dir('scripts/docker') {
def gccImage = docker.build("ogs6/gcc:latest", "-f Dockerfile.gcc.full .")
def clangImage = docker.build("ogs6/clang:latest", "-f Dockerfile.clang.full .")
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
gccImage.push()
clangImage.push()
}
}
}
}
}
// ************************* Analyzers *********************************
stage('Analyzers') {
when {
......
......@@ -81,3 +81,9 @@ make ogs
./bin/ogs
```
## OGS-6 images used by Jenkins
The following images are used by Jenkins:
- `ogs6/gcc`, defined in [scripts/docker/Dockerfile.gcc.full](https://github.com/ufz/ogs/blob/master/scripts/docker/Dockerfile.gcc.full)
- `ogs6/clang`, defined in [scripts/docker/Dockerfile.clang.full](scripts/docker/Dockerfile.clang.full)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment