Skip to content
Snippets Groups Projects

use eclipse osiql docker image

All threads resolved!
1 file
+ 73
1
Compare changes
  • Side-by-side
  • Inline
+ 73
1
@@ -7,15 +7,87 @@
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
@Library('releng-pipeline@main') _
pipeline {
agent none
parameters {
booleanParam(name: 'BUILD_DOCKER_IMAGE', defaultValue: false, description: 'Force docker image (re-)build')
}
options {
checkoutToSubdirectory('repo')
timeout(time: 10, unit: 'HOURS')
timestamps()
}
environment {
IMAGE_NAME = "eclipseopenpass/osiql-ci"
REPO_URL = "https://gitlab.eclipse.org/eclipse/openpass/osi-query-library.git"
DOCKERFILE_PATH = "utils/Dockerfile"
}
stages {
stage('Build docker image or set image tag') {
agent {
kubernetes {
inheritFrom 'openpass-agent-pod-' + env.BUILD_NUMBER
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: osiql-build
image: eclipseopenpass/ubuntu:base
tty: true
resources:
limits:
memory: "16Gi"
cpu: "4"
requests:
memory: "16Gi"
cpu: "4"
- name: jnlp
volumeMounts:
- name: volume-known-hosts
mountPath: /home/jenkins/.ssh
volumes:
- name: volume-known-hosts
configMap:
name: known-hosts
"""
}
}
stages {
stage('Build docker image') {
when {
expression {
return params.BUILD_DOCKER_IMAGE
}
}
steps {
script {
env.IMAGE_TAG = "${env.GIT_BRANCH}"
}
build job: 'Docker-build', parameters: [string(name: 'IMAGE_NAME', value: "${env.IMAGE_NAME}"),
string(name: 'IMAGE_TAG', value: "${env.GIT_BRANCH}"),
string(name: 'REPO_URL', value: "${env.REPO_URL}"),
string(name: 'BRANCH_NAME', value: "${env.GIT_BRANCH}"),
string(name: 'DOCKERFILE_PATH', value: 'utils/Dockerfile')],
propagate: true
}
}
stage('Set image tag') {
when {
expression {
return !params.BUILD_DOCKER_IMAGE
}
}
steps {
script {
env.IMAGE_TAG = "latest"
}
}
}
}
}
stage('Linux and Windows build') {
parallel {
stage('Linux') {
@@ -28,7 +100,7 @@ kind: Pod
spec:
containers:
- name: osiql-build
image: nmraghu/osiql:v0.0.1
image: "${env.IMAGE_NAME}:${env.IMAGE_TAG}"
tty: true
resources:
limits:
Loading