updating release script to build, tag, and push individually
parent
3c82f29fcb
commit
979c5cf6bf
@ -1,36 +1,43 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Build and tag container images for all services; monerod, nodemapper, and exporter
|
# Build and tag container images for each service based upon passed argument; monerod, nodemapper, or exporter
|
||||||
# All are manually tagged since some do not update as frequently as others. Bump the script
|
# All are manually tagged since some do not update as frequently as others. Bump the script
|
||||||
# to bump the image stored on Dockerhub.
|
# to bump the image stored on Dockerhub.
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
VERSION="${1}"
|
IMAGE=${1}
|
||||||
DH_USER=lalanza808
|
DH_USER=lalanza808
|
||||||
MONERO_VERSION=v0.18.3.1
|
MONEROD_VERSION=v0.18.3.1
|
||||||
MONERO_BASE=${DH_USER}/monerod
|
MONEROD_EXPORTER=${DH_USER}/monerod
|
||||||
EXPORTER_VERSION=1.0.0
|
EXPORTER_VERSION=1.0.0
|
||||||
EXPORTER_BASE=${DH_USER}/exporter
|
EXPORTER_BASE=${DH_USER}/exporter
|
||||||
NODEMAPPER_VERSION=1.0.0
|
NODEMAPPER_VERSION=1.0.0
|
||||||
NODEMAPPER_BASE=${DH_USER}/nodemapper
|
NODEMAPPER_BASE=${DH_USER}/nodemapper
|
||||||
|
|
||||||
|
if [[ "${IMAGE}" -eq "nodemapper" ]]
|
||||||
# build nodemapper
|
then
|
||||||
docker build -t "${NODEMAPPER_BASE}:${NODEMAPPER_VERSION}" -f dockerfiles/nodemapper .
|
echo -e "[+] Building nodemapper"
|
||||||
docker tag "${NODEMAPPER_BASE}:${NODEMAPPER_VERSION}" "${NODEMAPPER_BASE}:latest"
|
docker build -t "${NODEMAPPER_BASE}:${NODEMAPPER_VERSION}" -f dockerfiles/nodemapper .
|
||||||
# docker push "${NODEMAPPER_BASE}:${NODEMAPPER_VERSION}"
|
docker tag "${NODEMAPPER_BASE}:${NODEMAPPER_VERSION}" "${NODEMAPPER_BASE}:latest"
|
||||||
# docker push "${NODEMAPPER_BASE}:latest"
|
docker push "${NODEMAPPER_BASE}:${NODEMAPPER_VERSION}"
|
||||||
|
docker push "${NODEMAPPER_BASE}:latest"
|
||||||
# build exporter
|
fi
|
||||||
docker build -t "${EXPORTER_BASE}:${EXPORTER_VERSION}" -f dockerfiles/exporter .
|
|
||||||
docker tag "${EXPORTER_BASE}:${EXPORTER_VERSION}" "${EXPORTER_BASE}:latest"
|
if [[ "${IMAGE}" -eq "exporter" ]]
|
||||||
# docker push "${EXPORTER_BASE}:${EXPORTER_VERSION}"
|
then
|
||||||
# docker push "${EXPORTER_BASE}:latest"
|
echo -e "[+] Building exporter"
|
||||||
|
docker build -t "${EXPORTER_BASE}:${EXPORTER_VERSION}" -f dockerfiles/exporter .
|
||||||
# build monerod
|
docker tag "${EXPORTER_BASE}:${EXPORTER_VERSION}" "${EXPORTER_BASE}:latest"
|
||||||
|
docker push "${EXPORTER_BASE}:${EXPORTER_VERSION}"
|
||||||
docker build -t "${MONERO_BASE}:${MONERO_VERSION}" -f dockerfiles/nodemapper .
|
docker push "${EXPORTER_BASE}:latest"
|
||||||
docker tag "${MONERO_BASE}:${MONERO_VERSION}" "${MONERO_BASE}:latest"
|
fi
|
||||||
# docker push "${MONERO_BASE}:${MONERO_VERSION}"
|
|
||||||
# docker push "${MONERO_BASE}:latest"
|
if [[ "${IMAGE}" -eq "monerod" ]]
|
||||||
|
then
|
||||||
|
echo -e "[+] Building monerod"
|
||||||
|
docker build -t "${MONEROD_BASE}:${MONEROD_VERSION}" -f dockerfiles/monero .
|
||||||
|
docker tag "${MONEROD_BASE}:${MONEROD_VERSION}" "${MONEROD_BASE}:latest"
|
||||||
|
docker push "${MONEROD_BASE}:${MONEROD_VERSION}"
|
||||||
|
docker push "${MONEROD_BASE}:latest"
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue