cache dev Linux images in ci/cd and disable site config generation for autoconf/swarm/k8s

This commit is contained in:
bunkerity 2022-06-22 14:32:27 +02:00
parent e21a35017a
commit cd0d70b8f6
2 changed files with 11 additions and 0 deletions

View File

@ -188,6 +188,8 @@ jobs:
platforms: linux/amd64
push: true
tags: ${{ secrets.PRIVATE_REGISTRY }}/infra/bunkerweb-ubuntu:latest
cache-from: type=registry,ref=bunkerity/cache:bw-ubuntu-cache
cache-to: type=registry,ref=bunkerity/cache:bw-ubuntu-cache,mode=min
# Build linux debian
build-bw-debian:
@ -219,6 +221,8 @@ jobs:
platforms: linux/amd64
push: true
tags: ${{ secrets.PRIVATE_REGISTRY }}/infra/bunkerweb-debian:latest
cache-from: type=registry,ref=bunkerity/cache:bw-debian-cache
cache-to: type=registry,ref=bunkerity/cache:bw-debian-cache,mode=min
# Build linux centos
build-bw-centos:
@ -250,6 +254,8 @@ jobs:
platforms: linux/amd64
push: true
tags: ${{ secrets.PRIVATE_REGISTRY }}/infra/bunkerweb-centos:latest
cache-from: type=registry,ref=bunkerity/cache:bw-centos-cache
cache-to: type=registry,ref=bunkerity/cache:bw-centos-cache,mode=min
# Build linux fedora
build-bw-fedora:
@ -281,6 +287,8 @@ jobs:
platforms: linux/amd64
push: true
tags: ${{ secrets.PRIVATE_REGISTRY }}/infra/bunkerweb-fedora:latest
cache-from: type=registry,ref=bunkerity/cache:bw-fedora-cache
cache-to: type=registry,ref=bunkerity/cache:bw-fedora-cache,mode=min
# Run tests
tests:

View File

@ -77,6 +77,9 @@ fi
# generate final configuration
export TEMP_NGINX="no"
log "ENTRYPOINT" "" "Generating configuration ..."
if [ "$SWARM_MODE" = "yes" ] || [ "$KUBERNETES_MODE" = "yes" ] || [ "$AUTOCONF_MODE" = "yes" ] ; then
export SERVER_NAME=
fi
env | grep -E -v "^(HOSTNAME|PWD|PKG_RELEASE|NJS_VERSION|SHLVL|PATH|_|NGINX_VERSION|HOME)=" > "/tmp/variables.env"
/opt/bunkerweb/gen/main.py --settings /opt/bunkerweb/settings.json --templates /opt/bunkerweb/confs --output /etc/nginx --variables /tmp/variables.env
if [ "$?" -ne 0 ] ; then