Fix Seaworthy/Airsloop to use tools/airship for Pegleg
Change-Id: I60b598268d5ad6334dc21c2dd1e2818850cdfc9e
This commit is contained in:
parent
38cc109fb1
commit
ae6b1c360b
31
tools/gate/airsloop/Jenkinsfile
vendored
31
tools/gate/airsloop/Jenkinsfile
vendored
@ -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()
|
||||
|
||||
|
25
tools/gate/seaworthy/Jenkinsfile
vendored
25
tools/gate/seaworthy/Jenkinsfile
vendored
@ -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}"
|
||||
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user