diff --git a/.buildkite/docker-build-push.nix b/.buildkite/docker-build-push.nix index 945f4fdbc6d..8a3b761c597 100644 --- a/.buildkite/docker-build-push.nix +++ b/.buildkite/docker-build-push.nix @@ -53,7 +53,7 @@ in writeScript "docker-build-push" ('' #!${runtimeShell} - set -euo pipefail + set -euox pipefail export PATH=${lib.makeBinPath [ docker gnused ]} @@ -78,7 +78,7 @@ in tags+=( "${image.imageTag}" ) tags+=( "latest" ) elif [[ "$git_tag" = "rc-latest" ]]; then - tags+=( "$git_tag" ) + tags+=( "$git_tag") else echo 'Not pushing docker image because this is neither a rc-latest nor a v20* tag build.' fi diff --git a/.buildkite/release.yml b/.buildkite/release.yml index bb1998e6fb0..4af5fbc38e4 100644 --- a/.buildkite/release.yml +++ b/.buildkite/release.yml @@ -22,7 +22,7 @@ steps: - ./scripts/buildkite/release/linux-package.sh artifact_paths: [ "./result/linux/**" ] agents: - system: ${linux} + system: x86_64-linux - label: 'Refresh node state' key: refresh-node-state @@ -31,6 +31,15 @@ steps: agents: system: x86_64-linux + - label: 'Build Docker Image' + key: build-docker + depends_on: + - add-release-commits + commands: + ./scripts/buildkite/release/docker-build.sh + agents: + system: x86_64-linux + - label: 'Run linux e2e tests' depends_on: - add-release-commits diff --git a/docker-compose.yml b/docker-compose.yml index 03e0e238ab8..48cb92f65b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.5" services: cardano-node: - image: ghcr.io/intersectmbo/cardano-node:${NODE_TAG} + image: cardanofoundation/cardano-wallet:${WALLET_TAG} environment: NETWORK: CARDANO_NODE_SOCKET_PATH: /ipc/node.socket diff --git a/nix/docker.nix b/nix/docker.nix index 465becb3efa..7c32fe87d32 100644 --- a/nix/docker.nix +++ b/nix/docker.nix @@ -20,7 +20,7 @@ , glibcLocales ? null # Used to generate the docker image names -, repoName ? "inputoutput/cardano-wallet" +, repoName ? "cardanofoundation/cardano-wallet" }: diff --git a/scripts/buildkite/release/docker-build.sh b/scripts/buildkite/release/docker-build.sh new file mode 100755 index 00000000000..4f14794f12f --- /dev/null +++ b/scripts/buildkite/release/docker-build.sh @@ -0,0 +1,23 @@ +#! /usr/bin/env -S nix shell --command bash +# shellcheck shell=bash + +set -euox pipefail + +git fetch --all + +RELEASE_COMMIT=$(buildkite-agent meta-data get "release-commit") + +git checkout "$RELEASE_COMMIT" + +mkdir -p config + +echo '{ outputs = _: { dockerHubRepoName = "cardanofoundation/cardano-wallet"; }; }' \ + > config/flake.nix + +hostNixpkgs=$(nix eval --impure -I "$NIX_PATH" --expr '(import {}).path') + +mkdir -p result + +nix build .#dockerImage -o result/docker-image + +docker load < result/docker-image \ No newline at end of file diff --git a/scripts/buildkite/release/linux-package.sh b/scripts/buildkite/release/linux-package.sh index cf359f2791d..debd7694ba0 100755 --- a/scripts/buildkite/release/linux-package.sh +++ b/scripts/buildkite/release/linux-package.sh @@ -1,8 +1,10 @@ #! /usr/bin/env -S nix shell --command bash # shellcheck shell=bash -RELEASE_CANDIDATE_BRANCH=$(buildkite-agent meta-data get "release-candidate-branch") +set -euox pipefail -git checkout "$RELEASE_CANDIDATE_BRANCH" +RELEASE_COMMIT=$(buildkite-agent meta-data get "release-commit") + +git checkout "$RELEASE_COMMIT" nix build -o result/linux .#ci.artifacts.linux64.release \ No newline at end of file