Skip to content

Commit

Permalink
Add Jenkinsfile for rpc-gating lint job
Browse files Browse the repository at this point in the history
Connects rcbops/u-suk-dev#1080
  • Loading branch information
hughsaunders committed Feb 23, 2017
1 parent a1fb57e commit aeaf2df
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
properties([
parameters([
string(name: 'REGION',
defaultValue: 'IAD'),
string(name: 'FLAVOR',
defaultValue: '2'),
string(name: 'IMAGE',
defaultValue: 'Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)'),
string(name: 'STAGES',
defaultValue: 'Allocate Resources, Connect Slave, Cleanup'),
string(name: 'INSTANCE_NAME_RAW',
defaultValue: 'AUTO'),
string(name: 'RPC_GATING_REPO',
defaultValue: 'https://github.com/rcbops/rpc-gating'),
string(name: 'RPC_GATING_BRANCH',
defaultValue: 'bug/1080_globallib')
]) //parameters
]) //properties

node(){
deleteDir()
checkout scm
sh "env"
pubcloud.runonpubcloud(step: {
stage("Prepare"){
sh """#!/bin/bash
apt-get update
apt-get -y install groovy2
pip install jenkins-job-builder
"""
}
stage("checkout"){
checkout scm
}
stage("lint"){
sh "./lint.sh"
}
})
}
3 changes: 3 additions & 0 deletions pipeline-steps/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ def install_ansible(){
virtualenv --python=/opt/rh/python27/root/usr/bin/python .venv
fi
# hack the selinux module into the venv
virtualenv --relocatable .venv
cp -r /usr/lib64/python2.6/site-packages/selinux .venv/lib64/python2.7/site-packages/
source .venv/bin/activate
# These pip commands cannot be combined into one.
pip install -U six packaging appdirs
pip install -U setuptools pip
# installing pip resets the shebang to be absolute
virtualenv --relocatable .venv
pip install -U ansible pyrax
"""
}
Expand Down

0 comments on commit aeaf2df

Please sign in to comment.