2018-02-08 14:46:19 +00:00
|
|
|
pipeline {
|
|
|
|
agent { label 'linux' }
|
|
|
|
|
2018-03-27 13:52:04 +00:00
|
|
|
options {
|
|
|
|
timeout(time: 1, unit: 'HOURS')
|
|
|
|
buildDiscarder(logRotator(daysToKeepStr: '10'))
|
2018-07-03 07:45:52 +00:00
|
|
|
timestamps()
|
2018-03-27 13:52:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
triggers {
|
|
|
|
pollSCM('H * * * *')
|
|
|
|
}
|
|
|
|
|
2018-07-18 12:07:00 +00:00
|
|
|
environment {
|
|
|
|
// Squid is enabled by default in the dev environment
|
|
|
|
DISABLE_PROXY_CACHE = 'true'
|
|
|
|
}
|
|
|
|
|
2018-02-08 14:46:19 +00:00
|
|
|
stages {
|
|
|
|
stage('Prepare Workspace') {
|
|
|
|
steps {
|
|
|
|
sh 'make clean || true'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-16 20:52:35 +00:00
|
|
|
stage('Lint code') {
|
|
|
|
steps {
|
|
|
|
sh 'make lint'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-14 16:53:17 +00:00
|
|
|
stage('Validate essentials.yaml') {
|
|
|
|
steps {
|
|
|
|
dir('services') {
|
|
|
|
sh 'make generate-essentials && git diff --quiet essentials.yaml'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
failure {
|
|
|
|
echo 'Please ensure that updates to essentials.yaml are committed!'
|
|
|
|
}
|
|
|
|
always {
|
|
|
|
archiveArtifacts artifacts: 'services/essentials.yaml', fingerprint: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Prepare ingest') {
|
2018-08-14 14:05:44 +00:00
|
|
|
steps {
|
|
|
|
sh 'make -C services generate-ingest'
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
archiveArtifacts artifacts: 'services/ingest.json', fingerprint: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-22 20:52:19 +00:00
|
|
|
stage('Verifications') {
|
|
|
|
parallel {
|
2018-06-08 07:04:13 +00:00
|
|
|
stage('Evergreen Client') {
|
2018-03-22 20:52:19 +00:00
|
|
|
steps {
|
2018-06-08 07:04:13 +00:00
|
|
|
sh 'make -C distribution/client check'
|
2018-03-22 20:52:19 +00:00
|
|
|
}
|
2018-05-22 23:14:47 +00:00
|
|
|
post {
|
|
|
|
success {
|
2018-06-10 12:58:26 +00:00
|
|
|
archiveArtifacts 'distribution/client/coverage/**'
|
2018-05-22 23:14:47 +00:00
|
|
|
}
|
|
|
|
}
|
2018-03-22 20:52:19 +00:00
|
|
|
}
|
2018-06-08 07:04:13 +00:00
|
|
|
stage('Backend Services') {
|
2018-03-22 20:52:19 +00:00
|
|
|
steps {
|
|
|
|
sh 'make -C services check'
|
|
|
|
}
|
2018-05-22 23:21:09 +00:00
|
|
|
post {
|
|
|
|
success {
|
|
|
|
archiveArtifacts 'services/coverage/**'
|
|
|
|
}
|
2018-07-18 18:37:57 +00:00
|
|
|
cleanup {
|
|
|
|
sh 'make -C services stop'
|
|
|
|
}
|
2018-05-22 23:21:09 +00:00
|
|
|
}
|
2018-03-22 20:52:19 +00:00
|
|
|
}
|
2018-02-08 14:46:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-30 17:43:49 +00:00
|
|
|
stage('Build Distribution') {
|
|
|
|
steps {
|
|
|
|
sh 'make -C distribution distribution'
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
archiveArtifacts artifacts: 'distribution/build/*.zip', fingerprint: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-18 12:33:33 +00:00
|
|
|
stage('Build images') {
|
|
|
|
parallel {
|
|
|
|
stage('jenkins/evergreen') {
|
|
|
|
environment {
|
|
|
|
// Since tests have already been successfully run, skip them
|
|
|
|
SKIP_TESTS = 'true'
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make -C distribution container'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('jenkinsciinfra/evergreen-backend') {
|
|
|
|
environment {
|
|
|
|
// Since tests have already been successfully run, skip them
|
|
|
|
SKIP_TESTS = 'true'
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'make -C services container'
|
|
|
|
}
|
|
|
|
}
|
2018-02-08 14:46:19 +00:00
|
|
|
}
|
2018-07-17 23:21:35 +00:00
|
|
|
post {
|
|
|
|
cleanup {
|
|
|
|
sh 'make -C services stop'
|
|
|
|
}
|
|
|
|
}
|
2018-02-08 14:46:19 +00:00
|
|
|
}
|
2018-03-06 15:41:17 +00:00
|
|
|
|
2018-06-05 16:22:47 +00:00
|
|
|
stage('Test images') {
|
2018-07-17 22:49:22 +00:00
|
|
|
environment {
|
|
|
|
// Since tests have already been successfully run, skip them
|
|
|
|
SKIP_TESTS = 'true'
|
|
|
|
}
|
|
|
|
|
2018-06-05 16:22:47 +00:00
|
|
|
parallel {
|
|
|
|
stage('Docker Cloud image') {
|
2018-06-06 14:02:56 +00:00
|
|
|
agent { label 'linux' }
|
2018-06-05 16:22:47 +00:00
|
|
|
steps {
|
2018-09-15 21:55:33 +00:00
|
|
|
sh 'make -C distribution clean docker-cloud-container-check'
|
2018-06-06 15:12:29 +00:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2018-10-07 19:17:04 +00:00
|
|
|
archiveArtifacts artifacts: '**/build/tests-run*/**'
|
2018-10-03 10:56:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Rollback testing') {
|
|
|
|
agent { label 'linux' }
|
|
|
|
steps {
|
|
|
|
sh 'make -C distribution clean rollback-check'
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
archiveArtifacts artifacts: '**/build/tests-run*/**'
|
2018-06-06 15:12:29 +00:00
|
|
|
}
|
|
|
|
}
|
2018-05-14 21:01:51 +00:00
|
|
|
}
|
2018-07-17 13:22:30 +00:00
|
|
|
stage('AWS Cloud image (smokes)') {
|
|
|
|
agent { label 'linux' }
|
|
|
|
steps {
|
2018-09-15 21:55:33 +00:00
|
|
|
sh 'make -C distribution clean aws-cloud-container-check'
|
2018-07-17 13:22:30 +00:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2018-10-07 19:17:04 +00:00
|
|
|
archiveArtifacts artifacts: '**/build/tests-run*/**'
|
2018-07-17 13:22:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-05-14 21:01:51 +00:00
|
|
|
}
|
2018-03-06 15:41:17 +00:00
|
|
|
}
|
|
|
|
|
2018-03-12 22:57:41 +00:00
|
|
|
stage('Publish jenkins/evergreen') {
|
|
|
|
when {
|
|
|
|
expression { infra.isTrusted() }
|
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
|
|
|
withCredentials([[$class: 'ZipFileBinding',
|
|
|
|
credentialsId: 'jenkins-dockerhub',
|
|
|
|
variable: 'DOCKER_CONFIG']]) {
|
2018-06-26 19:14:34 +00:00
|
|
|
sh 'make publish'
|
2018-03-12 22:57:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-08 14:46:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// vim: ft=groovy
|