From 4656401d7a860e05781f60d0354711f30a7a0475 Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Fri, 26 Jul 2024 07:26:42 +0200 Subject: [PATCH] Update Zammad patchlevel + dependencies and introduce updatecli (#422) --- .env.dist | 10 ++-- .github/updatecli.yaml | 117 +++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 10 ++-- 3 files changed, 127 insertions(+), 10 deletions(-) create mode 100644 .github/updatecli.yaml diff --git a/.env.dist b/.env.dist index 5e9a6c85..14a5af16 100644 --- a/.env.dist +++ b/.env.dist @@ -1,7 +1,7 @@ -# ELASTICSEARCH_VERSION=8.12.2 +# ELASTICSEARCH_VERSION=8.14.3 # IMAGE_REPO=ghcr.io/zammad/zammad # MEMCACHE_SERVERS=zammad-memcached:11211 -# MEMCACHE_VERSION=1.6.25-alpine +# MEMCACHE_VERSION=1.6.29-alpine # NGINX_PORT=8080 # NGINX_EXPOSE_PORT=8080 # POSTGRES_DB=zammad_production @@ -9,13 +9,13 @@ # POSTGRES_USER=zammad # POSTGRES_HOST=zammad-postgresql # POSTGRES_PORT=5432 -# POSTGRES_VERSION=15.6-alpine +# POSTGRES_VERSION=15.7-alpine # POSTGRESQL_OPTIONS=?pool=50 # REDIS_URL=redis://zammad-redis:6379 -# REDIS_VERSION=7.2.4-alpine +# REDIS_VERSION=7.2.5-alpine # RESTART=always # Use a fixed version. You are responsible to update this to newer patch level versions yourself. -# VERSION=6.3.1-38 +# VERSION=6.3.1-95 # You can also use floating versions that will give you automatic updates: # VERSION=6.2 # all patchlevel updates # VERSION=6 # including minor updates diff --git a/.github/updatecli.yaml b/.github/updatecli.yaml new file mode 100644 index 00000000..614b1f01 --- /dev/null +++ b/.github/updatecli.yaml @@ -0,0 +1,117 @@ +name: "Update Zammad version and dependency charts (patch and minor only)" + +sources: + zammad: + kind: dockerimage + spec: + image: "zammad/zammad-docker-compose" + architecture: "linux/amd64" + tagfilter: "6\\.3.*" + elasticsearch: + kind: dockerimage + spec: + image: "bitnami/elasticsearch" + architecture: "linux/amd64" + versionfilter: + kind: "semver" + pattern: "8.x.x" + memcached: + kind: dockerimage + spec: + image: "memcached" + architecture: "linux/amd64" + versionfilter: + kind: "semver" + pattern: "1.6.x" + postgresql: + kind: dockerimage + spec: + image: "postgres" + architecture: "linux/amd64" + versionfilter: + kind: "semver" + pattern: "15.x.x" + redis: + kind: dockerimage + spec: + image: "redis" + architecture: "linux/amd64" + versionfilter: + kind: "semver" + pattern: "7.x.x" + +conditions: {} + +targets: + zammad: + # we can't use yaml because it breaks our file structure + kind: file + sourceid: zammad + spec: + file: docker-compose.yml + matchpattern: \${VERSION:-(.*)\} + replacepattern: ${VERSION:-{{ source `zammad` }}} + zammad-env-dist: + # we can't use yaml because it breaks our file structure + kind: file + sourceid: zammad + spec: + file: .env.dist + matchpattern: ' VERSION=(\d+\.\d+.\d+.*)' + replacepattern: ' VERSION={{ source `zammad` }}' + elasticsearch: + kind: file + sourceid: elasticsearch + spec: + file: docker-compose.yml + matchpattern: ELASTICSEARCH_VERSION:-(.*)\} + replacepattern: ELASTICSEARCH_VERSION:-{{ source `elasticsearch`}}} + elasticsearch-env-dist: + kind: file + sourceid: elasticsearch + spec: + file: .env.dist + matchpattern: ELASTICSEARCH_VERSION=(.*) + replacepattern: ELASTICSEARCH_VERSION={{ source `elasticsearch`}} + memcached: + kind: file + sourceid: memcached + spec: + file: docker-compose.yml + matchpattern: MEMCACHE_VERSION:-(.*)-alpine\} + replacepattern: MEMCACHE_VERSION:-{{ source `memcached` }}-alpine} + memcached-env-dist: + kind: file + sourceid: memcached + spec: + file: .env.dist + matchpattern: MEMCACHE_VERSION=(.*)-alpine + replacepattern: MEMCACHE_VERSION={{ source `memcached` }}-alpine + postgresql: + kind: file + sourceid: postgresql + spec: + file: docker-compose.yml + matchpattern: POSTGRES_VERSION:-(.*)-alpine\} + replacepattern: POSTGRES_VERSION:-{{ source `postgresql` }}-alpine} + postgresql-env-dist: + kind: file + sourceid: postgresql + spec: + file: .env.dist + matchpattern: POSTGRES_VERSION=(.*)-alpine + replacepattern: POSTGRES_VERSION={{ source `postgresql` }}-alpine + redis: + kind: file + sourceid: redis + spec: + file: docker-compose.yml + matchpattern: REDIS_VERSION:-(.*)-alpine\} + replacepattern: REDIS_VERSION:-{{ source `redis` }}-alpine} + redis-env-dist: + kind: file + sourceid: redis + spec: + file: .env.dist + matchpattern: REDIS_VERSION=(.*)-alpine + replacepattern: REDIS_VERSION={{ source `redis` }}-alpine diff --git a/docker-compose.yml b/docker-compose.yml index b4d927af..3e582531 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,7 +36,7 @@ x-shared: ZAMMAD_SESSION_JOBS: ZAMMAD_PROCESS_SCHEDULED: ZAMMAD_PROCESS_DELAYED_JOBS_WORKERS: - image: ${IMAGE_REPO:-ghcr.io/zammad/zammad}:${VERSION:-6.3.1-38} + image: ${IMAGE_REPO:-ghcr.io/zammad/zammad}:${VERSION:-6.3.1-95} restart: ${RESTART:-always} volumes: - zammad-storage:/opt/zammad/storage @@ -56,7 +56,7 @@ services: user: 0:0 zammad-elasticsearch: - image: bitnami/elasticsearch:${ELASTICSEARCH_VERSION:-8.12.2} + image: bitnami/elasticsearch:${ELASTICSEARCH_VERSION:-8.14.3} restart: ${RESTART:-always} volumes: - elasticsearch-data:/bitnami/elasticsearch/data @@ -71,7 +71,7 @@ services: zammad-memcached: command: memcached -m 256M - image: memcached:${MEMCACHE_VERSION:-1.6.25-alpine} + image: memcached:${MEMCACHE_VERSION:-1.6.29-alpine} restart: ${RESTART:-always} zammad-nginx: @@ -89,7 +89,7 @@ services: POSTGRES_DB: ${POSTGRES_DB:-zammad_production} POSTGRES_USER: ${POSTGRES_USER:-zammad} POSTGRES_PASSWORD: ${POSTGRES_PASS:-zammad} - image: postgres:${POSTGRES_VERSION:-15.6-alpine} + image: postgres:${POSTGRES_VERSION:-15.7-alpine} restart: ${RESTART:-always} volumes: - postgresql-data:/var/lib/postgresql/data @@ -99,7 +99,7 @@ services: command: ["zammad-railsserver"] zammad-redis: - image: redis:${REDIS_VERSION:-7.2.4-alpine} + image: redis:${REDIS_VERSION:-7.2.5-alpine} restart: ${RESTART:-always} volumes: - redis-data:/data