diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-01 15:42:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 15:42:32 -0500 |
commit | 67d48c56a61fbdfe18e33a2f765373d581ac5724 (patch) | |
tree | dac11b9f06a84fb73b5f1137c49f2f8c6ba721c9 /contrib | |
parent | 0ba47f71c0dd829114666d13776792f748682be3 (diff) | |
parent | 6c595dd31155f5af377ece1f106e3bed4e395494 (diff) | |
download | podman-67d48c56a61fbdfe18e33a2f765373d581ac5724.tar.gz podman-67d48c56a61fbdfe18e33a2f765373d581ac5724.tar.bz2 podman-67d48c56a61fbdfe18e33a2f765373d581ac5724.zip |
Merge pull request #9180 from cevich/v3.0_static_remote
[v3.0] Use cachix for static build & include podman-remote build
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/cirrus/required_host_ports.txt | 1 | ||||
-rwxr-xr-x | contrib/cirrus/runner.sh | 17 |
2 files changed, 9 insertions, 9 deletions
diff --git a/contrib/cirrus/required_host_ports.txt b/contrib/cirrus/required_host_ports.txt index 9248e497a..5f066e059 100644 --- a/contrib/cirrus/required_host_ports.txt +++ b/contrib/cirrus/required_host_ports.txt @@ -2,3 +2,4 @@ github.com 22 docker.io 443 quay.io 443 registry.fedoraproject.org 443 +podman.cachix.org 443 diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 48df57ad8..5e8759f1b 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -178,15 +178,14 @@ function _run_altbuild() { req_env_vars CTR_FQIN [[ "$UID" -eq 0 ]] || \ die "Static build must execute nixos container as root on host" - mkdir -p /var/cache/nix - podman run -i --rm -v /var/cache/nix:/mnt/nix:Z \ - $CTR_FQIN cp -rfT /nix /mnt/nix - podman run -i --rm -v /var/cache/nix:/nix:Z \ - -v $PWD:$PWD:Z -w $PWD $CTR_FQIN \ - nix --print-build-logs --option cores 4 --option max-jobs 4 \ - build --file ./nix/ - # result symlink is absolute from container perspective :( - cp /var/cache/$(readlink result)/bin/podman ./ # for cirrus-ci artifact + podman run -i --rm \ + -e CACHIX_AUTH_TOKEN \ + -v $PWD:$PWD:Z -w $PWD $CTR_FQIN sh -c \ + "nix-env -iA cachix -f https://cachix.org/api/v1/install && \ + cachix use podman && \ + nix-build nix && \ + nix-store -qR --include-outputs \$(nix-instantiate nix/default.nix) | grep -v podman | cachix push podman && \ + cp -R result/bin ." rm result # makes cirrus puke ;; *) |