Skip to content

Commit

Permalink
Add "Build docker image" step
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Action committed Jun 24, 2024
1 parent d996f7a commit cddc78b
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .buildkite/docker-build-push.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ in
writeScript "docker-build-push" (''
#!${runtimeShell}
set -euo pipefail
set -euox pipefail
export PATH=${lib.makeBinPath [ docker gnused ]}
Expand All @@ -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
Expand Down
11 changes: 10 additions & 1 deletion .buildkite/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nix/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
, glibcLocales ? null

# Used to generate the docker image names
, repoName ? "inputoutput/cardano-wallet"
, repoName ? "cardanofoundation/cardano-wallet"
}:


Expand Down
23 changes: 23 additions & 0 deletions scripts/buildkite/release/docker-build.sh
Original file line number Diff line number Diff line change
@@ -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 <nixpkgs> {}).path')

mkdir -p result

nix build .#dockerImage -o result/docker-image

docker load < result/docker-image
6 changes: 4 additions & 2 deletions scripts/buildkite/release/linux-package.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cddc78b

Please sign in to comment.