blob: f287149b9bb0e9d3ad25642da7e8a995f65b29cc [file] [log] [blame]
R. Tyler Croy5eb71412017-02-06 00:37:42 -08001#!/usr/bin/env groovy
2
R. Tyler Croyfc25da32017-02-06 02:16:17 -08003properties([
4 buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5')),
5 pipelineTriggers([cron('@daily')]),
6])
7
Carlos Sancheze9f90952016-03-15 19:16:56 +01008node('docker') {
R. Tyler Croy5eb71412017-02-06 00:37:42 -08009 deleteDir()
Carlos Sancheze9f90952016-03-15 19:16:56 +010010
R. Tyler Croy5eb71412017-02-06 00:37:42 -080011 stage('Checkout') {
12 checkout scm
13 }
Carlos Sancheze9f90952016-03-15 19:16:56 +010014
R. Tyler Croy5eb71412017-02-06 00:37:42 -080015 stage('Build') {
16 docker.build('jenkins')
17 }
18
19 stage('Test') {
20 sh """
21 git submodule update --init --recursive
22 git clone https://github.com/sstephenson/bats.git
23 bats/bin/bats tests
24 """
25 }
R. Tyler Croyf358b3c2017-02-06 01:01:03 -080026
27 if (infra.isTrusted()) {
28 stage('Publish') {
29 sh './weekly.sh'
30 }
31 }
Carlos Sancheze9f90952016-03-15 19:16:56 +010032}