Skip to content

Commit

Permalink
Merge #2631
Browse files Browse the repository at this point in the history
2631: Fix release docker image and release scripts r=rvl a=rvl

### Issue Number

ADP-894

### Overview

1. Something changed in `nixpkgs.dockerTools` base environment which means we now need to add coreutils to our image.
2. Adds a fix for the release file uploading github action.

### Comments

Will cherry-pick this onto a release branch after merging.


Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
  • Loading branch information
iohk-bors[bot] and rvl committed Apr 30, 2021
2 parents ca1fb09 + 2ecdd46 commit 37d7544
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 19 deletions.
18 changes: 18 additions & 0 deletions .buildkite/docker-build-push.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,27 @@ in
echo 'Not pushing docker image because this is not a master branch or v20* tag build.'
fi
echo
echo "Testing that entrypoint works"
set +e
docker run --rm "$orig_tag" version
docker_status="$?"
if [ "$docker_status" -eq 0 ]; then
echo "OK"
elif [ "$docker_status" -eq 125 ]; then
echo "Docker failed to run ... oh well."
echo "Continuing..."
else
echo "Entrypoint command failed with code $docker_status"
exit 1
fi
set -e
echo
for tag in ''${tags[@]}; do
tagged="$fullrepo:$tag"
if [ "$tagged" != "$orig_tag" ]; then
echo "Retagging with $tagged"
docker tag "$orig_tag" "$tagged"
fi
echo "Pushing $tagged"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
nodeTag:
description: 'Node tag (docker)'
required: true
default: '1.25.1'
default: '1.26.2'
walletTag:
description: 'Wallet tag (docker)'
required: true
default: 'dev-master-shelley'
default: 'dev-master'

defaults:
run:
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ jobs:
wget ${{ steps.hydra.outputs.buildProducts }}
- name: '🚀 Release'
uses: docker://antonyurchenko/git-release:v3.4.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "true"
PRE_RELEASE: "false"
CHANGELOG_FILE: "none"
ALLOW_EMPTY_CHANGELOG: "true"
ALLOW_TAG_PREFIX: "true"
uses: softprops/action-gh-release@v1
with:
args: '*.tar.gz *.zip'
draft: true
fail_on_unmatched_files: true
files: |
*.tar.gz
*.zip
docs:
runs-on: ubuntu-20.04
Expand Down
6 changes: 3 additions & 3 deletions nix/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Executables to include in the image as a base layer: node and utilities
, base ? []
# Other things to include in the image.
, iana-etc, cacert, bashInteractive
, iana-etc, cacert, bashInteractive, coreutils
, glibcLocales ? null

# Used to generate the docker image names
Expand Down Expand Up @@ -61,8 +61,8 @@ let
envImage = dockerTools.buildImage {
name = "${repoName}-env";
contents = [
iana-etc cacert bashInteractive
nsswitch-conf
iana-etc cacert nsswitch-conf
bashInteractive coreutils
] ++ lib.optional haveGlibcLocales glibcLocales;

# set up /tmp (override with TMPDIR variable)
Expand Down
2 changes: 1 addition & 1 deletion nix/windows-testing-bundle.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in pkgs.runCommand name {
cd bundle
# Copy in wallet and node EXEs and DLLs.
for pkg in ${cardano-wallet} ${cardano-cli}; do
for pkg in ${cardano-wallet} ${cardano-node} ${cardano-cli}; do
cp -vf $pkg/bin/* .
done
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ One can also start tests against cardano-wallet docker. There is docker-compose-
>```bash
>NETWORK=testnet \
>TESTS_E2E_TOKEN_METADATA=https://metadata.cardano-testnet.iohkdev.io/ \
>WALLET=dev-master-shelley \
>NODE=1.25.1 \
>WALLET=dev-master \
>NODE=1.26.2 \
>NODE_CONFIG_PATH=`pwd`/state/configs/$NETWORK \
>docker-compose -f docker-compose-test.yml up
>```
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/docker_compose
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NETWORK=testnet \
TESTS_E2E_TOKEN_METADATA=https://metadata.cardano-testnet.iohkdev.io/ \
WALLET=dev-master-shelley \
NODE=1.25.1 \
WALLET=dev-master \
NODE=1.26.2 \
NODE_CONFIG_PATH=`pwd`/state/configs/$NETWORK \
docker-compose -f docker-compose-test.yml $1

0 comments on commit 37d7544

Please sign in to comment.