Merge pull request #425 from rtyler/publish-containers-729
Publish containers automatically in trusted.ci
diff --git a/Jenkinsfile b/Jenkinsfile
index 1e79e64..3170bf9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,15 +1,27 @@
+#!/usr/bin/env groovy
+
node('docker') {
- deleteDir()
- stage 'Checkout'
- checkout scm
+ deleteDir()
- stage 'Build'
- docker.build('jenkins')
+ stage('Checkout') {
+ checkout scm
+ }
- stage 'Test'
- sh """
- git submodule update --init --recursive
- git clone https://github.com/sstephenson/bats.git
- bats/bin/bats tests
- """
+ stage('Build') {
+ docker.build('jenkins')
+ }
+
+ stage('Test') {
+ sh """
+ git submodule update --init --recursive
+ git clone https://github.com/sstephenson/bats.git
+ bats/bin/bats tests
+ """
+ }
+
+ if (infra.isTrusted()) {
+ stage('Publish') {
+ sh './weekly.sh'
+ }
+ }
}