diff options
author | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2017-03-15 09:30:26 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-03-15 09:30:26 +0000 |
commit | e38a2eff7cc1368f0cf92f372787e0f42247923d (patch) | |
tree | c5c14052845b61e0b9023fa387c6f4d0dbf3a2c3 | |
parent | d9e8e35aa07286581c5cd9dbd49e5770ad5bcb2b (diff) | |
parent | cc3943b24290b25d716022e8f35a8fd19b253bd2 (diff) |
Merge "Allow creation of Dockerfile.aarch64 through patch"
-rw-r--r-- | jjb/releng/opnfv-docker.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index 302feb03d..9bd711bc6 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -53,9 +53,19 @@ if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then fi cd $WORKSPACE/docker -if [ ! -f ${DOCKERFILE} ]; then - echo "ERROR: Dockerfile not found." - exit 1 +HOST_ARCH=$(uname -m) +if [ ! -f "${DOCKERFILE}" ]; then + # If this is expected to be a Dockerfile for other arch than x86 + # and it does not exist, but there is a patch for the said arch, + # then apply the patch and create the Dockerfile.${HOST_ARCH} file + if [[ "${DOCKERFILE}" == *"${HOST_ARCH}" && \ + -f "Dockerfile.${HOST_ARCH}.patch" ]]; then + patch -o Dockerfile."${HOST_ARCH}" Dockerfile \ + Dockerfile."${HOST_ARCH}".patch + else + echo "ERROR: No Dockerfile or ${HOST_ARCH} patch found." + exit 1 + fi fi # Get tag version |