github action test (#143)
* github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com> * github action test Signed-off-by: André Bauer <monotek23@gmail.com>
This commit is contained in:
parent
f93db7f2e8
commit
581434287c
12
.github/docker-image-build.sh
vendored
12
.github/docker-image-build.sh
vendored
@ -6,17 +6,9 @@ set -o errexit
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
DOCKER_IMAGES="zammad zammad-elasticsearch zammad-postgresql"
|
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
|
# shellcheck disable=SC2153
|
||||||
for DOCKER_IMAGE in ${DOCKER_IMAGES}; do
|
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"
|
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" .
|
||||||
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}"
|
|
||||||
done
|
done
|
||||||
|
23
.github/workflows/ci.yaml
vendored
23
.github/workflows/ci.yaml
vendored
@ -32,32 +32,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dockerfile: containers/zammad-postgresql/Dockerfile
|
dockerfile: containers/zammad-postgresql/Dockerfile
|
||||||
|
|
||||||
build-containers:
|
build-and-run-docker-compose:
|
||||||
needs:
|
needs:
|
||||||
- lint-bash-scripts
|
- lint-bash-scripts
|
||||||
- lint-docker-files
|
- lint-docker-files
|
||||||
runs-on: ubuntu-latest
|
timeout-minutes: 30
|
||||||
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
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
- name: build docker containers
|
||||||
|
run: .github/docker-image-build.sh
|
||||||
- name: use images build by ci
|
- name: use images build by ci
|
||||||
run: sed -i -e 's#VERSION=.*#VERSION=-ci-snapshot#g' < .env
|
run: sed -i -e 's#${IMAGE_REPO}:##g' -e 's#${VERSION}##g' docker-compose.yml
|
||||||
- name: pull container images
|
|
||||||
run: docker-compose pull
|
|
||||||
- name: run docker-compose up
|
- name: run docker-compose up
|
||||||
run: docker-compose up --detach
|
run: docker-compose up --detach
|
||||||
- name: add autowizard file
|
- name: add autowizard file
|
||||||
|
@ -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
|
ARG BUILD_DATE
|
||||||
|
|
||||||
LABEL org.label-schema.build-date="$BUILD_DATE" \
|
LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||||
|
Loading…
Reference in New Issue
Block a user