Skip to content

Commit

Permalink
Merge #1108
Browse files Browse the repository at this point in the history
1108: Buildkite: Make docker push step soft-failable r=KtorZ a=rvl

# Overview

Buildkite builds are often [failing on master](https://buildkite.com/input-output-hk/cardano-wallet/builds?branch=master).

1. Docker image push does not work all the time due to credentials issues. It seems like something that may be flaky anyway. So mark it as "soft fail" in Buildkite.

2. While we're thinking about Docker... Added a data volume `/data`, which is the wallet state directory by default.


Co-authored-by: Rodney Lorrimar <[email protected]>
  • Loading branch information
iohk-bors[bot] and rvl authored Dec 3, 2019
2 parents fe457b6 + 14b1285 commit 320719b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .buildkite/docker-build-push.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ in
'' + concatMapStringsSep "\n" (image: ''
branch="''${BUILDKITE_BRANCH:-}"
tag="''${BUILDKITE_TAG:-}"
if [[ -n "$tag" ]] || [[ "$branch" = "rvl/923/docker" ]]; then
if [[ -n "$tag" ]]; then
tag="${image.imageTag}"
elif [[ "$branch" = master ]]; then
tag="$(echo ${image.imageTag} | sed -e s/${image.version}/''${BUILDKITE_COMMIT:-dev}/)"
Expand All @@ -58,5 +58,6 @@ in
if [ "$tagged" != "${image.imageName}:${image.imageTag}" ]; then
docker tag "${image.imageName}:${image.imageTag}" "$tagged"
fi
echo "Pushing $tagged"
docker push "$tagged"
'') images)
2 changes: 2 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ steps:
- "./docker-build-push"
agents:
system: x86_64-linux
soft_fail:
- exit_status: '*'
9 changes: 8 additions & 1 deletion nix/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@

let
defaultPort = "8090";
dataDir = "/data";

startScript = writeScriptBin "start-cardano-wallet-jormungandr" ''
#!${runtimeShell}
set -euo pipefail
# set up data volume
export XDG_DATA_HOME=/
mkdir -p ${dataDir}
ln -s ${dataDir} /cardano-wallet
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
exec ${cardano-wallet-jormungandr}/bin/cardano-wallet-jormungandr "$@"
'';
Expand All @@ -47,9 +54,9 @@ in
];
config = {
EntryPoint = [ "start-cardano-wallet-jormungandr" ];
# Cmd = [ "--port" defaultPort ];
ExposedPorts = {
"${defaultPort}/tcp" = {}; # wallet api
};
Volume = [ dataDir ];
};
} // { inherit (cardano-wallet-jormungandr) version; }

0 comments on commit 320719b

Please sign in to comment.