Commit 7332cb73 authored by James T. Lee's avatar James T. Lee
Browse files

Fully parameterize build script in prep for multi-arch builds

parent 6f721eaa
Pipeline #289 canceled with stage
in 15 minutes and 13 seconds
...@@ -7,17 +7,22 @@ default: ...@@ -7,17 +7,22 @@ default:
'Build haswell': 'Build haswell':
stage: 'build' stage: 'build'
tags: ['nest'] tags: ['nest']
variables:
ARCH: 'x86_64'
CPU: 'haswell'
GENTOO_STAGE3_TAG: 'amd64'
script: script:
- 'mkdir debug' - 'mkdir debug'
- 'buildah bud --pull --squash - 'buildah bud --pull --squash
--security-opt seccomp=unconfined --security-opt seccomp=unconfined
--build-arg GENTOO_STAGE3_TAG=amd64 --build-arg GENTOO_STAGE3_TAG="$GENTOO_STAGE3_TAG"
--build-arg EMERGE_DEFAULT_OPTS="$CI_HOST_EMERGE_DEFAULT_OPTS --usepkg" --build-arg EMERGE_DEFAULT_OPTS="${CI_HOST_EMERGE_DEFAULT_OPTS} --usepkg"
--build-arg MAKEOPTS="$CI_HOST_MAKEOPTS" --build-arg MAKEOPTS="$CI_HOST_MAKEOPTS"
--build-arg PROFILE="haswell/server" --build-arg PROFILE="${CPU}/server"
-v "/usr/bin/qemu-${ARCH}:/usr/bin/qemu-${ARCH}:ro"
-v "${PWD}/debug:/usr/lib/debug" -v "${PWD}/debug:/usr/lib/debug"
-v /nest:/nest -v /nest:/nest
-t "${CI_REGISTRY_IMAGE}:haswell" .' -t "${CI_REGISTRY_IMAGE}:${CPU}" .'
- 'buildah bud -t "${CI_REGISTRY_IMAGE}/debug:haswell" -f Containerfile.debug .' - 'buildah bud -t "${CI_REGISTRY_IMAGE}/debug:${CPU}" -f Containerfile.debug .'
- 'buildah push "${CI_REGISTRY_IMAGE}:haswell"' - 'buildah push "${CI_REGISTRY_IMAGE}:${CPU}"'
- 'buildah push "${CI_REGISTRY_IMAGE}/debug:haswell"' - 'buildah push "${CI_REGISTRY_IMAGE}/debug:${CPU}"'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment