Skip to content

Commit

Permalink
pipeline-utils: add prep_container_storage()
Browse files Browse the repository at this point in the history
This re-implements some of what is contained in
`scripts/pull-mount-oscontainer` to allow parts of the pipeline to
pull container images from inside another container.
  • Loading branch information
miabbott committed Sep 21, 2018
1 parent 96a94fd commit 829caa6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pipeline-utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,17 @@ def registry_login(username, password, registry) {
sh "podman login -u '${username}' -p '${password}' ${registry}"
}

// re-implementation of some functionality from scripts/pull-mount-oscontainer
// sets up local container storage so the pipeline can pull container images
// from inside another container
def prep_container_storage(hostStorage, localStorage) {
sh """
rm -rf ${localStorage}
mkdir -p ${localStorage}
rm -rf ${hostStorage} && mkdir -p ${hostStorage}
mount --bind ${localStorage} ${hostStorage}
"""
}
// Substitute secrets from credentials into files in the git repo
def prepare_configuration() {
withCredentials([
Expand Down

0 comments on commit 829caa6

Please sign in to comment.