diff --git a/tools/gate/airsloop/Jenkinsfile b/tools/gate/airsloop/Jenkinsfile index 32169ca63..6268751ff 100644 --- a/tools/gate/airsloop/Jenkinsfile +++ b/tools/gate/airsloop/Jenkinsfile @@ -8,7 +8,8 @@ import org.yaml.snakeyaml.DumperOptions; import groovy.json.JsonSlurperClassic import groovy.json.JsonOutput -PEGLEG_IMAGE = 'quay.io/airshipit/pegleg:178c058474fb632806e281673d3eaf6be80fa854' +COLLECT_DIR = 'airsloop' +BUNDLE_DIR = 'bundle' KEYSTONE_URL = 'http://keystone.ucp.svc.cluster.local' SHIPYARD_URL = 'http://shipyard-api.ucp.svc.cluster.local/api/v1.0' @@ -96,11 +97,6 @@ def reset_bare_metal = { //// manifest utils -def resolve_versions = { - def versions = readYaml file: 'global/software/config/versions.yaml' - PROMENADE_IMAGE = versions.data.images.ucp.promenade.promenade -} - def pegleg_site_collect = { stage('Pegleg Site Collect') { @@ -114,14 +110,17 @@ def pegleg_site_collect = { sh "cp ${SSH_KEY} ssh-key" - auth = "-u ${SSH_USER} -k /target/ssh-key" - cmd = "pegleg site ${auth} -r /target collect ${SITE_NAME} -s /target/${SITE_NAME}" - sh "sudo docker run --rm -t -v \$(pwd):/target ${PEGLEG_IMAGE} ${cmd}" + sh "sudo -E tools/airship pegleg site" + + " -u ${SSH_USER}" + + " -k /target/ssh-key" + + " -r /target collect ${SITE_NAME}" + + " -s /target/${COLLECT_DIR}" + + sh "sudo chown -R ubuntu:ubuntu ${COLLECT_DIR}" } - sh "tar czf site-config.tar.gz ${SITE_NAME}" - - archiveArtifacts 'site-config.tar.gz' + sh "tar czf ${COLLECT_DIR}.tar.gz ${SITE_NAME}" + archiveArtifacts "${COLLECT_DIR}.tar.gz" } } @@ -318,6 +317,10 @@ vm(image: 'ubuntu-16.04-server-cloudimg-amd64', 'sudo systemctl disable kubelet') ssh.cmd (GENESIS_CREDS, GENESIS_IP, 'sudo systemctl disable docker') + ssh.cmd (GENESIS_CREDS, GENESIS_IP, + 'sudo touch /forcefsck') + + reset_bare_metal() sh 'sudo apt-get update' sh 'sudo apt-get install docker.io -y' @@ -338,8 +341,6 @@ vm(image: 'ubuntu-16.04-server-cloudimg-amd64', 'placement.openstack.svc.cluster.local" >> hosts' sh 'sudo mv hosts /etc/hosts' - reset_bare_metal() - clone(AIRSHIP_MANIFESTS_REF) // use updater tool to pull latest charts/images @@ -347,8 +348,6 @@ vm(image: 'ubuntu-16.04-server-cloudimg-amd64', uplift_versions() } - resolve_versions() - pegleg_site_collect() prom_config_gen() diff --git a/tools/gate/seaworthy/Jenkinsfile b/tools/gate/seaworthy/Jenkinsfile index d0e17d05c..9a81e82a8 100644 --- a/tools/gate/seaworthy/Jenkinsfile +++ b/tools/gate/seaworthy/Jenkinsfile @@ -11,8 +11,6 @@ import org.yaml.snakeyaml.DumperOptions; import groovy.json.JsonSlurperClassic import groovy.json.JsonOutput -PEGLEG_IMAGE = 'quay.io/airshipit/pegleg:178c058474fb632806e281673d3eaf6be80fa854' - COLLECT_DIR = 'seaworthy' BUNDLE_DIR = 'bundle' @@ -103,11 +101,6 @@ def reset_bare_metal = { //// manifest utils -def resolve_versions = { - def shipyard = readYaml file: "site/${SITE_NAME}/secrets/passphrases/ucp_shipyard_keystone_password.yaml" - SHIPYARD_PASSWD = shipyard.data -} - def pegleg_site_collect = { stage('Pegleg Site Collect') { @@ -121,9 +114,13 @@ def pegleg_site_collect = { sh "cp ${SSH_KEY} ssh-key" - auth = "-u ${SSH_USER} -k /target/ssh-key" - cmd = "pegleg site ${auth} -r /target collect ${SITE_NAME} -s /target/${COLLECT_DIR}" - sh "sudo docker run --rm -t -v \$(pwd):/target ${PEGLEG_IMAGE} ${cmd}" + sh "sudo -E tools/airship pegleg site" + + " -u ${SSH_USER}" + + " -k /target/ssh-key" + + " -r /target collect ${SITE_NAME}" + + " -s /target/${COLLECT_DIR}" + + sh "sudo chown -R ubuntu:ubuntu ${COLLECT_DIR}" } sh "tar czf ${COLLECT_DIR}.tar.gz ${COLLECT_DIR}" @@ -137,7 +134,7 @@ def prom_config_gen = { withEnv(['TERM_OPTS=-t']) { sh "mkdir -p ${BUNDLE_DIR}" sh "sudo -E tools/airship promenade build-all --validators" + - " -o ${BUNDLE_DIR} /target/${COLLECT_DIR}/*.yaml" + " -o ${BUNDLE_DIR} /target/${COLLECT_DIR}/*.yaml" } sh "tar czf ${BUNDLE_DIR}.tar.gz ${BUNDLE_DIR}" @@ -322,12 +319,14 @@ vm(image: 'ubuntu-16.04-server-cloudimg-amd64', 'sudo systemctl disable kubelet') ssh.cmd (GENESIS_CREDS, GENESIS_IP, 'sudo systemctl disable docker') + ssh.cmd (GENESIS_CREDS, GENESIS_IP, + 'sudo touch /forcefsck') + + reset_bare_metal() sh 'sudo apt-get update' sh 'sudo apt-get install docker.io -y' - reset_bare_metal() - clone(AIRSHIP_MANIFESTS_REF) // use updater tool to pull latest charts/images @@ -335,8 +334,6 @@ vm(image: 'ubuntu-16.04-server-cloudimg-amd64', uplift_versions() } - resolve_versions() - pegleg_site_collect() prom_config_gen() diff --git a/tools/gate/seaworthy/seed.groovy b/tools/gate/seaworthy/seed.groovy index 84c8c553f..7c8aa4d4d 100644 --- a/tools/gate/seaworthy/seed.groovy +++ b/tools/gate/seaworthy/seed.groovy @@ -1,7 +1,7 @@ pipelineJob('Seaworthy') { - displayName('Airship Seaworthy') + displayName('Seaworthy') description('Bare-metal continuous deployment pipeline') logRotator { @@ -79,7 +79,7 @@ pipelineJob('Seaworthy') { definition { cps { script(readFileFromWorkspace("tools/gate/seaworthy/Jenkinsfile")) - sandbox() + sandbox(false) } } }