- job: | |
concurrent: true | |
description: Dockerfile building job | |
disabled: false | |
dsl: |- | |
timestamps { | |
stage('build-dockerfiles') { | |
node('dockerfile-builder') { | |
dir('src') { | |
deleteDir() | |
checkout([ | |
scm: [ | |
$class: 'GitSCM', | |
userRemoteConfigs: [[ | |
url: MBED_TLS_TEST_REPO, | |
credentialsId: mbedtls-github-ssh | |
]], | |
branches: [[name: MBED_TLS_TEST_BRANCH]], | |
extensions: [ | |
[$class: 'CloneOption', timeout: 60], | |
[$class: 'SubmoduleOption', recursiveSubmodules: true], | |
[$class: 'LocalBranch', localBranch: MBED_TLS_TEST_BRANCH], | |
], | |
] | |
]) | |
dir('resources') { | |
dir('docker_files') { | |
withCredentials([string(credentialsId: 'DOCKER_AUTH', variable: 'TOKEN')]) { | |
sh """\ | |
mkdir -p ${env.HOME}/.docker | |
cat > ${env.HOME}/.docker/config.json << EOF | |
{ | |
"auths": { | |
"https://index.docker.io/v1/": { | |
"auth": "\${TOKEN}" | |
} | |
} | |
} | |
EOF | |
chmod 0600 ${env.HOME}/.docker/config.json | |
""" | |
} | |
if (BUILD_16_04_DOCKERFILE == "true") { | |
dir('ubuntu-16.04') { | |
sh """\ | |
docker build --build-arg ARMLMD_LICENSE_FILE=27000@flexnet.trustedfirmware.org -t trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_16_04_DOCKERFILE} . | |
docker push trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_16_04_DOCKERFILE} | |
""" | |
} | |
} | |
if (BUILD_18_04_DOCKERFILE == "true") { | |
dir('ubuntu-18.04') { | |
sh """\ | |
docker build --build-arg ARMLMD_LICENSE_FILE=27000@flexnet.trustedfirmware.org -t trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_18_04_DOCKERFILE} . | |
docker push trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_18_04_DOCKERFILE} | |
""" | |
} | |
} | |
if (BUILD_20_04_DOCKERFILE == "true") { | |
dir('ubuntu-20.04') { | |
sh """\ | |
docker build --build-arg ARMLMD_LICENSE_FILE=27000@flexnet.trustedfirmware.org -t trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_20_04_DOCKERFILE} . | |
docker push trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_20_04_DOCKERFILE} | |
""" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
name: mbedtls-dockerfile-builder | |
parameters: | |
- string: | |
default: ssh://git@github.com/Mbed-TLS/mbedtls-test.git | |
description: Mbed TLS test repo/fork | |
name: MBED_TLS_TEST_REPO | |
trim: true | |
- string: | |
default: main | |
description: Branch or commit to build Dockerfile from | |
name: MBED_TLS_TEST_BRANCH | |
trim: true | |
- bool: | |
default: false | |
description: Build the Ubuntu 16.04 Docker image | |
name: BUILD_16_04_DOCKERFILE | |
- string: | |
default: ubuntu-16.04-testing | |
description: Tag for the Ubuntu 16.04 Docker image being built | |
name: TAG_FOR_16_04_DOCKERFILE | |
trim: true | |
- bool: | |
default: false | |
description: Build the Ubuntu 18.04 Docker image | |
name: BUILD_18_04_DOCKERFILE | |
- string: | |
default: ubuntu-18.04-testing | |
description: Tag for the Ubuntu 18.04 Docker image being built | |
name: TAG_FOR_18_04_DOCKERFILE | |
trim: true | |
- bool: | |
default: false | |
description: Build the Ubuntu 20.04 Docker image | |
name: BUILD_20_04_DOCKERFILE | |
- string: | |
default: ubuntu-20.04-testing | |
description: Tag for the Ubuntu 20.04 Docker image being built | |
name: TAG_FOR_20_04_DOCKERFILE | |
trim: true | |
project-type: pipeline | |
properties: | |
- speed-durability: | |
hint: performance-optimized | |
- build-blocker: | |
block-level: GLOBAL | |
blocking-jobs: [] | |
queue-scanning: DISABLED | |
use-build-blocker: false | |
- build-discarder: | |
artifact-days-to-keep: -1 | |
artifact-num-to-keep: -1 | |
days-to-keep: 60 | |
num-to-keep: 100 | |
sandbox: true | |
triggers: [] |