From cf078c0c889d7da36f5c2048693c9b169c191dfe Mon Sep 17 00:00:00 2001 From: Marko Date: Wed, 29 Jul 2020 21:55:58 +0200 Subject: [PATCH] ci: push nightly builds (#6517) --- .github/workflows/docker.yml | 22 ++++++++++++++++++++++ Makefile | 2 +- networks/local/Makefile | 4 ---- networks/local/simappnode/Dockerfile | 23 ----------------------- networks/local/simappnode/wrapper.sh | 25 ------------------------- 5 files changed, 23 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/docker.yml delete mode 100644 networks/local/Makefile delete mode 100644 networks/local/simappnode/Dockerfile delete mode 100755 networks/local/simappnode/wrapper.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000000..1d36ec0183 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,22 @@ +name: Nightly Builds +# Nightly Builds rebuilds the simapp docker image Monday - Friday at midnight +# and pushes the image to https://hub.docker.com/r/interchainio/simapp/tags +on: + schedule: + - cron: "0 0 * * 1-5" # deploy at midnight Monday - Friday + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: Publish to Docker Hub + uses: docker/build-push-action@v1.1.0 + with: + repository: interchainio/simapp + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + tags: nightly-${{ steps.date.outputs.date }} diff --git a/Makefile b/Makefile index 29a7526175..9121980a4d 100644 --- a/Makefile +++ b/Makefile @@ -378,7 +378,7 @@ proto-update-deps: ############################################################################### build-docker-local-simapp: - @$(MAKE) -C networks/local + docker build -t cosmos-sdk/simapp . # Run a 4-node testnet locally localnet-start: build-simd-linux localnet-stop diff --git a/networks/local/Makefile b/networks/local/Makefile deleted file mode 100644 index 41c955ae31..0000000000 --- a/networks/local/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -all: - docker build --tag cosmos-sdk/simappnode simappnode - -.PHONY: all diff --git a/networks/local/simappnode/Dockerfile b/networks/local/simappnode/Dockerfile deleted file mode 100644 index ef70bbaf32..0000000000 --- a/networks/local/simappnode/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -#FROM alpine:3.10.2 -# -#RUN apk update && \ -# apk upgrade && \ -# apk --no-cache add curl jq file - -# Changed from Alpine to Ubuntu because the keyring PR is linking to libc -# Alpine uses muslc instead of libc - -FROM ubuntu:18.04 - -RUN apt-get update && \ - apt-get -y upgrade && \ - apt-get -y install curl jq file - -VOLUME [ /simd ] -WORKDIR /simd -EXPOSE 26656 26657 1317 -ENTRYPOINT ["/usr/bin/wrapper.sh"] -CMD ["start"] -STOPSIGNAL SIGTERM - -COPY wrapper.sh /usr/bin/wrapper.sh diff --git a/networks/local/simappnode/wrapper.sh b/networks/local/simappnode/wrapper.sh deleted file mode 100755 index a225009857..0000000000 --- a/networks/local/simappnode/wrapper.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env sh - -BINARY=/simd/${BINARY:-simd} -ID=${ID:-0} -LOG=${LOG:-simd.log} - -if ! [ -f "${BINARY}" ]; then - echo "The binary $(basename "${BINARY}") cannot be found. Please add the binary to the shared folder. Please use the BINARY environment variable if the name of the binary is not 'simd'" - exit 1 -fi - -BINARY_CHECK="$(file "$BINARY" | grep 'ELF 64-bit LSB executable, x86-64')" - -if [ -z "${BINARY_CHECK}" ]; then - echo "Binary needs to be OS linux, ARCH amd64" - exit 1 -fi - -export SIMDHOME="/simd/node${ID}/simd" - -if [ -d "$(dirname "${SIMDHOME}"/"${LOG}")" ]; then - "${BINARY}" --home "${SIMDHOME}" "$@" | tee "${SIMDHOME}/${LOG}" -else - "${BINARY}" --home "${SIMDHOME}" "$@" -fi