Skip to content

Commit

Permalink
ci(refactor): Minor script updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-stopka committed Jan 11, 2021
1 parent ed93354 commit 33d6b37
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -8,10 +8,14 @@ set -e
if ! which jq >> /dev/null 2>&1; then
echo "ERROR: jq binary is missing!"
exit 0
elif ! which docker >> /dev/null 2>&1; then
fi
if ! which docker >> /dev/null 2>&1; then
echo "ERROR: docker binary is missing!"
exit 0
fi
if ! cd ${PWD}/.github/tests/00-cardano-node-integration-tests/; then
echo "ERROR: Failed to switch to cardano-node-integration-tests directory!"
fi

GH_JSON=$(curl --proto '=https' --tlsv1.2 -sSf "https://api.github.com/repos/input-output-hk/cardano-node/releases/latest")
if [ $(jq -r .prerelease <<< ${GH_JSON}) == false ]; then
Expand All @@ -21,14 +25,13 @@ if [ $(jq -r .prerelease <<< ${GH_JSON}) == false ]; then
fi

sed -i "s/<cardanoNodeVersionTag>/${cardanoNodeVersionTag}/" \
${PWD}/.github/tests/00-cardano-node-integration-tests/Dockerfile
${PWD}/Dockerfile

echo "Pull Docker image from Docker Hub"
if ! docker pull 2ndlayer/centos-cardano-node:${cardanoNodeVersion} >> /dev/null 2>&1; then
echo "ERROR: Docker image pull failed!"
exit 0
else TESTNET_MAGIC=${RANDOM}
cd ${PWD}/.github/tests/00-cardano-node-integration-tests/
docker build -t local/cardano-node-shelley-testnet:${cardanoNodeVersion} ./

if docker run local/cardano-node-shelley-testnet:${cardanoNodeVersion} \
Expand Down

0 comments on commit 33d6b37

Please sign in to comment.