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
|
||||
|
||||
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
|
||||
|
19
.github/workflows/ci.yaml
vendored
19
.github/workflows/ci.yaml
vendored
@ -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
|
||||
timeout-minutes: 30
|
||||
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
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- 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
|
||||
|
@ -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" \
|
||||
|
Loading…
Reference in New Issue
Block a user