From 1b1494610b7b603b359984b55b831de58482d32f Mon Sep 17 00:00:00 2001 From: Dan Olaru Date: Fri, 20 Oct 2017 17:22:43 -0400 Subject: [PATCH] Add the Jenkinsfile --- Jenkinsfile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..dcfed8d4e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,49 @@ +pipeline { + agent none + + stages { + + + stage('Build::Packer') { + agent { + docker { + image 'hashicorp/packer' + } + + } + + steps { + parallel( + "catalog-web": { + sh 'packer build packer/catalog-web.json' + }, + + "catalog-harvester": { + sh 'packer build packer/catalog-harvester.json' + }, + + "solr": { + sh 'packer build packer/solr.json' + } + ) + } + + } + + + stage('Deploy::Terragrunt') { + agent any + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/GSA/datagov-infrastructure-live']]]) + + sh 'cd dev/vpc && terragrunt apply' + + sh 'cd dev/db && terragrunt apply' + + sh 'cd dev/app && terragrunt apply' + } + } + + + } +}