Skip to content

Instantly share code, notes, and snippets.

@harlowja
Created November 4, 2016 17:48
Show Gist options
  • Save harlowja/332965e7f560fbfa99ef2aada700a9d9 to your computer and use it in GitHub Desktop.
Save harlowja/332965e7f560fbfa99ef2aada700a9d9 to your computer and use it in GitHub Desktop.
stage("Kolla checkout (external)")
kolla_stash = "kolla.stash"
kolla_cloner = {
helpers.clone_and_stash(kolla_project_url, kolla_project_ref, kolla_stash)
}
helpers.slack_stage(
"Checking out (and stashing) repo for kolla",
kolla_cloner)
stage("Image building")
image_builder = {
node('build-slave-cent7') {
clean_docker_images()
helpers.clean_ws {
unstash(kolla_stash)
helpers.named_sh(
"Kolla virtualenv creation & population",
"""
virtualenv .venv
source .venv/bin/activate
pip install pip setuptools --upgrade
pip install .
"""
)
helpers.named_sh(
"Kolla dependency graph creation/output",
"""
source .venv/bin/activate
pip install graphviz
kolla-build --save-dependency ${project}.dot ${project}
cat ${project}.dot
"""
)
pretty_write_file("etc/kolla/kolla-build.conf", kolla_build_conf)
pretty_write_file("template-overrides.j2", kolla_template_overrides)
helpers.named_sh(
"Kolla ${project} image building",
"""
source .venv/bin/activate
kolla-build -t source \
--template-override template-overrides.j2 \
${project}
"""
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment