Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1338 from mxinden/vanilla-terraform
Browse files Browse the repository at this point in the history
tests: Make tectonic builder-image configurable
  • Loading branch information
mxinden authored Jul 11, 2017
2 parents ca63ece + 14e4bb8 commit b47c81d
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def quay_creds = [
)
]

def builder_image = 'quay.io/coreos/tectonic-builder:v1.25'
def default_builder_image = 'quay.io/coreos/tectonic-builder:v1.25'

pipeline {
agent none
Expand All @@ -31,6 +31,13 @@ pipeline {
timestamps()
buildDiscarder(logRotator(numToKeepStr:'100'))
}
parameters {
string(
name: 'builder_image',
defaultValue: default_builder_image,
description: 'tectonic-builder docker image to use for builds'
)
}

stages {
stage('Build & Test') {
Expand All @@ -40,7 +47,7 @@ pipeline {
}
steps {
node('worker && ec2') {
withDockerContainer(builder_image) {
withDockerContainer(params.builder_image) {
checkout scm
sh """#!/bin/bash -ex
mkdir -p \$(dirname $GO_PROJECT) && ln -sf $WORKSPACE $GO_PROJECT
Expand Down Expand Up @@ -79,7 +86,7 @@ pipeline {
"SmokeTest TerraForm: AWS": {
node('worker && ec2') {
withCredentials(creds) {
withDockerContainer(args: '-v /etc/passwd:/etc/passwd:ro', image: builder_image) {
withDockerContainer(args: '-v /etc/passwd:/etc/passwd:ro', image: params.builder_image) {
checkout scm
unstash 'installer'
unstash 'smoke'
Expand Down Expand Up @@ -117,7 +124,7 @@ pipeline {
"SmokeTest TerraForm: AWS (non-TLS)": {
node('worker && ec2') {
withCredentials(creds) {
withDockerContainer(builder_image) {
withDockerContainer(params.builder_image) {
checkout scm
unstash 'installer'
timeout(5) {
Expand All @@ -133,7 +140,7 @@ pipeline {
"SmokeTest TerraForm: AWS (experimental)": {
node('worker && ec2') {
withCredentials(creds) {
withDockerContainer(builder_image) {
withDockerContainer(params.builder_image) {
checkout scm
unstash 'installer'
timeout(5) {
Expand All @@ -149,7 +156,7 @@ pipeline {
"SmokeTest TerraForm: AWS (custom ca)": {
node('worker && ec2') {
withCredentials(creds) {
withDockerContainer(builder_image) {
withDockerContainer(params.builder_image) {
checkout scm
unstash 'installer'
timeout(5) {
Expand All @@ -165,7 +172,7 @@ pipeline {
"SmokeTest TerraForm: AWS (private vpc)": {
node('worker && ec2') {
withCredentials(creds) {
withDockerContainer(image: builder_image, args: '--device=/dev/net/tun --cap-add=NET_ADMIN') {
withDockerContainer(image: params.builder_image, args: '--device=/dev/net/tun --cap-add=NET_ADMIN') {
checkout scm
unstash 'installer'
unstash 'smoke'
Expand Down Expand Up @@ -200,7 +207,7 @@ pipeline {
"IntegrationTest Installer Gui": {
node('worker && ec2') {
withCredentials(creds) {
withDockerContainer(builder_image) {
withDockerContainer(params.builder_image) {
checkout scm
unstash 'installer'
unstash 'node_modules'
Expand All @@ -219,7 +226,7 @@ pipeline {
failure {
node('worker && ec2') {
withCredentials([creds, quay_creds]) {
withDockerContainer(builder_image) {
withDockerContainer(params.builder_image) {
checkout scm
unstash 'installer'
timeout(15) {
Expand Down

0 comments on commit b47c81d

Please sign in to comment.