mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-25 09:13:50 +01:00
New Dockerfiles and environment variables structure
This commit is contained in:
commit
b6f869575f
146
.github/workflows/Azure.yml
vendored
146
.github/workflows/Azure.yml
vendored
@ -1,146 +0,0 @@
|
||||
name: Build images (Azure)
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
push:
|
||||
branches:
|
||||
- '5.0'
|
||||
- '5.4'
|
||||
paths-ignore:
|
||||
- '.env*'
|
||||
- 'docker-compose*.yaml'
|
||||
- '*/rhel/*'
|
||||
- '*/windows/*'
|
||||
- "**.md"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build:
|
||||
timeout-minutes: 70
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build:
|
||||
- agent
|
||||
- agent2
|
||||
- java-gateway
|
||||
- proxy-mysql
|
||||
- proxy-sqlite3
|
||||
- server-mysql
|
||||
- server-pgsql
|
||||
- snmptraps
|
||||
- web-apache-mysql
|
||||
- web-apache-pgsql
|
||||
- web-nginx-mysql
|
||||
- web-nginx-pgsql
|
||||
- web-service
|
||||
os:
|
||||
- alpine
|
||||
- ubuntu
|
||||
- ol
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
-
|
||||
uses: actions/checkout@v2
|
||||
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to Azure Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ${{ secrets.azure_registry }}.azurecr.io
|
||||
username: ${{ secrets.AZURE_USERNAME }}
|
||||
password: ${{ secrets.AZURE_PASSWORD }}
|
||||
|
||||
- name: Prepare platform list
|
||||
id: platform
|
||||
run: |
|
||||
DOCKER_PLATFORM="linux/amd64,linux/arm64"
|
||||
echo ::set-output name=list::${DOCKER_PLATFORM}
|
||||
|
||||
- name: Prepare environment (push)
|
||||
if: github.event_name == 'push'
|
||||
id: prepare_push
|
||||
run: |
|
||||
TAGS_ARRAY=()
|
||||
|
||||
IMAGE_NAME="${{ secrets.azure_registry }}.azurecr.io/${{ matrix.os }}/zabbix-${{ matrix.build }}"
|
||||
GIT_BRANCH="${GITHUB_REF##*/}"
|
||||
|
||||
if [ "${GIT_BRANCH}" == "trunk" ]; then
|
||||
TAGS_ARRAY+=("$IMAGE_NAME:trunk")
|
||||
else
|
||||
GIT_BRANCH=`expr "${GIT_BRANCH}" : '\([0-9]*\.[0-9]*\).*'`
|
||||
TAGS_ARRAY+=("$IMAGE_NAME:v${GIT_BRANCH}")
|
||||
fi
|
||||
|
||||
echo "::debug::Branch - ${GIT_BRANCH}"
|
||||
|
||||
TAGS=$(printf -- "%s, " "${TAGS_ARRAY[@]}")
|
||||
|
||||
echo "::debug::Tags - ${TAGS}"
|
||||
|
||||
echo ::set-output name=image_name::${IMAGE_NAME}
|
||||
echo ::set-output name=image_tag_versions::$(printf -- "%s," "${TAGS_ARRAY[@]}")
|
||||
|
||||
- name: Prepare environment (release)
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
id: prepare_release
|
||||
run: |
|
||||
TAGS_ARRAY=()
|
||||
|
||||
IMAGE_NAME="${{ secrets.azure_registry }}.azurecr.io/${{ matrix.os }}/zabbix-${{ matrix.build }}"
|
||||
RELEASE_VERSION=${GITHUB_REF##*/}
|
||||
GIT_BRANCH="${GITHUB_REF##*/}"
|
||||
GIT_BRANCH=`expr "${GIT_BRANCH}" : '\([0-9]*\.[0-9]*\).*'`
|
||||
|
||||
echo "::debug::Release version ${RELEASE_VERSION}. Branch ${GIT_BRANCH}"
|
||||
|
||||
TAGS_ARRAY+=("$IMAGE_NAME:v${RELEASE_VERSION}")
|
||||
|
||||
TAGS=$(printf -- "--tag %s " "${TAGS_ARRAY[@]}")
|
||||
|
||||
echo ::set-output name=image_name::${IMAGE_NAME}
|
||||
echo ::set-output name=image_tag_versions::$(printf -- ",%s" "${TAGS_ARRAY[@]}")
|
||||
|
||||
- name: Prepare tags
|
||||
id: prepare_tags
|
||||
run: |
|
||||
if [ ! -z "${{ steps.prepare_push.outputs.image_tag_versions }}" ]; then
|
||||
TAGS="${{ steps.prepare_push.outputs.image_tag_versions }}"
|
||||
IMAGE_NAME="${{ steps.prepare_push.outputs.image_name }}"
|
||||
elif [ ! -z "${{ steps.prepare_release.outputs.image_tag_versions }}" ]; then
|
||||
TAGS="${{ steps.prepare_release.outputs.image_tag_versions }}"
|
||||
IMAGE_NAME="${{ steps.prepare_release.outputs.image_name }}"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ::set-output name=image_tag_versions::${TAGS}
|
||||
echo ::set-output name=image_name::${IMAGE_NAME}
|
||||
|
||||
-
|
||||
name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./${{ matrix.build }}/${{ matrix.os }}
|
||||
file: ./${{ matrix.build }}/${{ matrix.os }}/Dockerfile
|
||||
platforms: ${{ steps.platform.outputs.list }}
|
||||
push: ${{ secrets.AUTO_PUSH_IMAGES }}
|
||||
tags: ${{ steps.prepare_tags.outputs.image_tag_versions }}
|
||||
|
||||
-
|
||||
name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
4
.github/workflows/dockerhub_description.yml
vendored
4
.github/workflows/dockerhub_description.yml
vendored
@ -5,7 +5,7 @@ on:
|
||||
branches:
|
||||
- 'trunk'
|
||||
paths:
|
||||
- "*/*/README.md"
|
||||
- "Dockerfiles/*/*/README.md"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@ -41,4 +41,4 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ matrix.build }}
|
||||
readme-filepath: ./${{ matrix.build }}/${{ env.SUBDIR }}/README.md
|
||||
readme-filepath: ./Dockerfiles/${{ matrix.build }}/${{ env.SUBDIR }}/README.md
|
||||
|
@ -8,9 +8,9 @@ on:
|
||||
branches:
|
||||
- 'trunk'
|
||||
paths-ignore:
|
||||
- '.env*'
|
||||
- 'env_vars/*'
|
||||
- 'docker-compose*.yaml'
|
||||
- '*/rhel/*'
|
||||
- 'Dockerfiles/*/rhel/*'
|
||||
- '*/windows/*'
|
||||
- "**.md"
|
||||
|
1
Dockerfiles/agent/alpine/build.sh
Symbolic link
1
Dockerfiles/agent/alpine/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/agent/centos/build.sh
Symbolic link
1
Dockerfiles/agent/centos/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/agent/ol/build.sh
Symbolic link
1
Dockerfiles/agent/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/agent/rhel/build.sh
Symbolic link
1
Dockerfiles/agent/rhel/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/agent/ubuntu/build.sh
Symbolic link
1
Dockerfiles/agent/ubuntu/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/agent2/alpine/build.sh
Symbolic link
1
Dockerfiles/agent2/alpine/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/agent2/ol/build.sh
Symbolic link
1
Dockerfiles/agent2/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/agent2/rhel/build.sh
Symbolic link
1
Dockerfiles/agent2/rhel/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/agent2/ubuntu/build.sh
Symbolic link
1
Dockerfiles/agent2/ubuntu/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-base/alpine/build.sh
Symbolic link
1
Dockerfiles/build-base/alpine/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-base/ol/build.sh
Symbolic link
1
Dockerfiles/build-base/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-base/ubuntu/build.sh
Symbolic link
1
Dockerfiles/build-base/ubuntu/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-mysql/alpine/build.sh
Symbolic link
1
Dockerfiles/build-mysql/alpine/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-mysql/ol/build.sh
Symbolic link
1
Dockerfiles/build-mysql/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-mysql/ubuntu/build.sh
Symbolic link
1
Dockerfiles/build-mysql/ubuntu/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-pgsql/alpine/build.sh
Symbolic link
1
Dockerfiles/build-pgsql/alpine/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-pgsql/ol/build.sh
Symbolic link
1
Dockerfiles/build-pgsql/ol/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
1
Dockerfiles/build-pgsql/ubuntu/build.sh
Symbolic link
1
Dockerfiles/build-pgsql/ubuntu/build.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../build.sh
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user