-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
1 addition
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,6 @@ pipeline { | |
not { expression { params.RELEASE } }; | ||
anyOf { | ||
branch 'dev'; | ||
branch 'dev_jdk8' | ||
} | ||
} | ||
} | ||
|
@@ -102,51 +101,6 @@ pipeline { | |
} | ||
} | ||
} | ||
stage('Deploy to DEV') { | ||
environment { | ||
GIT_CREDENTIALS = credentials('4b740850-d7e0-4ab2-9eee-ecd1607e1e02') | ||
SERVICE_VOCABULARY = "${env.WORKSPACE}/service-vocabulary.yml" | ||
HOSTS_VOCABULARY = "${env.WORKSPACE}/hosts-vocabulary" | ||
BUILD_HOSTS = "${BUILD_ID}_hosts" | ||
} | ||
when { | ||
allOf { | ||
not { expression { params.RELEASE } }; | ||
branch 'dev_jdk8'; | ||
} | ||
} | ||
steps { | ||
sshagent(['85f1747d-ea03-49ca-9e5d-aa9b7bc01c5f']) { | ||
sh ''' | ||
rm -rf * | ||
git clone -b master [email protected]:gbif/gbif-configuration.git | ||
git clone -b dev2 [email protected]:gbif/c-deploy.git | ||
''' | ||
|
||
createServiceFile("${env.WORKSPACE}/gbif-configuration/environments/dev/services.yml") | ||
createHostsFile() | ||
|
||
sh """ | ||
cd c-deploy/services | ||
echo "Creating group_vars directory" | ||
mkdir group_vars | ||
# Configuration and services files are concatenated into a single file, that will contain the Ansible variables | ||
cat ../../gbif-configuration/environments/dev/configuration.yml \ | ||
../../gbif-configuration/environments/dev/monitoring.yml \ | ||
${SERVICE_VOCABULARY} >> group_vars/${BUILD_ID} | ||
# The default Ansible inventory file 'hosts' is concatenated with the input HOSTS file | ||
cat ../../gbif-configuration/environments/dev/hosts \ | ||
${HOSTS_VOCABULARY} >> ${BUILD_HOSTS} | ||
# Executes the Ansible playbook | ||
echo "Executing Ansible playbook" | ||
ansible-playbook -vvv -i ${BUILD_HOSTS} services.yml --private-key=~/.ssh/id_rsa --extra-vars "git_credentials=${GIT_CREDENTIALS}" | ||
""" | ||
} | ||
} | ||
} | ||
stage('Deploy to DEV2') { | ||
environment { | ||
GIT_CREDENTIALS = credentials('4b740850-d7e0-4ab2-9eee-ecd1607e1e02') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters