From 581434287ce6602a0693e3e4326931e484e3d7de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Fri, 6 Mar 2020 18:50:38 +0100 Subject: [PATCH] github action test (#143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer * github action test Signed-off-by: André Bauer --- .github/docker-image-build.sh | 12 ++--------- .github/workflows/ci.yaml | 23 +++++----------------- containers/zammad-elasticsearch/Dockerfile | 2 +- 3 files changed, 8 insertions(+), 29 deletions(-) diff --git a/.github/docker-image-build.sh b/.github/docker-image-build.sh index 9e8cdad..f9c09e4 100755 --- a/.github/docker-image-build.sh +++ b/.github/docker-image-build.sh @@ -6,17 +6,9 @@ set -o errexit set -o pipefail DOCKER_IMAGES="zammad zammad-elasticsearch zammad-postgresql" -DOCKER_IMAGE_TAG="ci-snapshot" -DOCKER_REGISTRY="index.docker.io" -DOCKER_REPOSITORY="zammad-docker-compose" - -# dockerhub auth -echo "${DOCKER_PASSWORD}" | docker login --username="${DOCKER_USERNAME}" --password-stdin # shellcheck disable=SC2153 for DOCKER_IMAGE in ${DOCKER_IMAGES}; do - echo "Build Zammad Docker image ${DOCKER_IMAGE} with version ${DOCKER_IMAGE_TAG} for DockerHubs ${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY} repo" - - docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" -t "${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${DOCKER_IMAGE_TAG}" -f "containers/${DOCKER_IMAGE}/Dockerfile" . - docker push "${DOCKER_REGISTRY}/${REPO_USER}/${DOCKER_REPOSITORY}:${DOCKER_IMAGE}-${DOCKER_IMAGE_TAG}" + echo "Build Zammad Docker image ${DOCKER_IMAGE} for local test" + docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" -t "${DOCKER_IMAGE}" -f "containers/${DOCKER_IMAGE}/Dockerfile" . done diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6f681f6..e77198b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,32 +32,19 @@ jobs: with: dockerfile: containers/zammad-postgresql/Dockerfile - build-containers: + build-and-run-docker-compose: needs: - lint-bash-scripts - lint-docker-files - runs-on: ubuntu-latest - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - REPO_USER: ${{ secrets.REPO_USER }} - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: build docker containers - run: .github/docker-image-build.sh - - test-docker-compose: - needs: build-containers - timeout-minutes: 10 + timeout-minutes: 30 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v1 + - name: build docker containers + run: .github/docker-image-build.sh - name: use images build by ci - run: sed -i -e 's#VERSION=.*#VERSION=-ci-snapshot#g' < .env - - name: pull container images - run: docker-compose pull + run: sed -i -e 's#${IMAGE_REPO}:##g' -e 's#${VERSION}##g' docker-compose.yml - name: run docker-compose up run: docker-compose up --detach - name: add autowizard file diff --git a/containers/zammad-elasticsearch/Dockerfile b/containers/zammad-elasticsearch/Dockerfile index f20aceb..05fa676 100644 --- a/containers/zammad-elasticsearch/Dockerfile +++ b/containers/zammad-elasticsearch/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.0 +FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.1 ARG BUILD_DATE LABEL org.label-schema.build-date="$BUILD_DATE" \