diff options
author | Tim Rozet <trozet@redhat.com> | 2015-07-21 13:14:11 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2015-07-21 16:00:16 -0400 |
commit | 80407058601af3ad6f3adca814858555768dddf9 (patch) | |
tree | 3f63c92c1de5dacc0b4540c8f76b102a7ff0d644 /jjb/genesis | |
parent | 85b729b515037043e21bbbcf3128045af1979c5e (diff) |
Adds lab reconfig to JJB for Foreman
Adds another builder to do the lab reconfig pulls in UCS
login info from the local jumphost. Need to still
add the updates for Fuel, but want to make sure these changes are good.
JIRA: OCTO-109
Change-Id: I8e7988b49e8ae44b37973472deff800b9f4f21e8
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/genesis')
-rw-r--r-- | jjb/genesis/genesis-foreman.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/jjb/genesis/genesis-foreman.yml b/jjb/genesis/genesis-foreman.yml index 656b44348..aa5e0f742 100644 --- a/jjb/genesis/genesis-foreman.yml +++ b/jjb/genesis/genesis-foreman.yml @@ -264,6 +264,7 @@ branch: '{branch}' builders: + - 'foreman-lab-reconfig' - 'foreman-deploy' ######################## @@ -297,6 +298,46 @@ # builder macros ######################## - builder: + name: 'foreman-lab-reconfig' + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + + # check to see if ucs login info file exists + if [ -e /home/jenkins-ci/.ssh/ucs_creds ];then + source /home/jenkins-ci/.ssh/ucs_creds + else + echo "Unable to find UCS credentials for LF lab reconfiguration...Exiting" + exit 1 + fi + + # clone releng + echo "Cloning releng repo..." + if ! GIT_SSL_NO_VERIFY=true git clone https://gerrit.opnfv.org/gerrit/releng; then + echo "Unable to clone releng repo...Exiting" + exit 1 + fi + + # log info to console + echo "Starting the lab reconfiguration for $INSTALLER..." + echo "--------------------------------------------------------" + echo + + # create venv + sudo $WORKSPACE/releng/utils/lab-reconfiguration/create_venv.sh + + # enter venv + source ./venv/bin/activate + sudo python $WORKSPACE/releng/utils/lab-reconfiguration/reconfigUcsNet.py $ucs_host -u $ucs_user -p $ucs_password -f $WORKSPACE/releng/utils/lab-reconfiguration/foreman.yaml + + echo + echo "--------------------------------------------------------" + echo "Done!" + +- builder: name: 'foreman-build' builders: - shell: | |