blob: f7eedcae867f70158735ff8295aa0900fb05d687 [file] [log] [blame]
R. Tyler Croy5eb71412017-02-06 00:37:42 -08001#!/usr/bin/env groovy
2
Carlos Sancheze9f90952016-03-15 19:16:56 +01003node('docker') {
R. Tyler Croy5eb71412017-02-06 00:37:42 -08004 deleteDir()
Carlos Sancheze9f90952016-03-15 19:16:56 +01005
R. Tyler Croy5eb71412017-02-06 00:37:42 -08006 stage('Checkout') {
7 checkout scm
8 }
Carlos Sancheze9f90952016-03-15 19:16:56 +01009
R. Tyler Croy5eb71412017-02-06 00:37:42 -080010 stage('Build') {
11 docker.build('jenkins')
12 }
13
14 stage('Test') {
15 sh """
16 git submodule update --init --recursive
17 git clone https://github.com/sstephenson/bats.git
18 bats/bin/bats tests
19 """
20 }
R. Tyler Croyf358b3c2017-02-06 01:01:03 -080021
22 if (infra.isTrusted()) {
23 stage('Publish') {
Carlos Sanchez0f763d42017-02-06 10:55:11 +010024 sh './publish.sh'
R. Tyler Croyf358b3c2017-02-06 01:01:03 -080025 }
26 }
Carlos Sancheze9f90952016-03-15 19:16:56 +010027}