From 318d824050cae74eb8b54672f8407cde6c84e38d Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 25 Dec 2016 07:14:29 +0200 Subject: [PATCH] - Fetch Git submodules in Jenkins. - User install pip (for caching purposes). - Import to Ansible Galaxy on success. - Commented out Molecule test (using Vagrant). --- Jenkinsfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5823321..f9af1ab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,8 +3,8 @@ pipeline { stages { stage('install') { steps { - sh 'virtualenv example' - sh '. example/bin/activate && pip install -r tests/requirements.txt' + sh 'git submodule update --init' + sh 'pip install -r tests/requirements.txt --user' sh '. example/bin/activate && ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles' sh '. example/bin/activate && molecule dependency' } @@ -12,7 +12,13 @@ pipeline { stage('test') { steps { sh '. example/bin/activate && pre-commit run --all-files' + // sh 'molecule test --platform all' } } } + post { + success { + sh 'ansible-galaxy import -v' + } + } } -- GitLab