fix wrong container in autoconf/k8s, init work on linux arm and ci/cd refactoring
This commit is contained in:
parent
97dc6540eb
commit
a286e7bd32
|
@ -92,9 +92,11 @@ jobs:
|
|||
|
||||
# Build Linux packages
|
||||
build-packages:
|
||||
needs: [create-arm]
|
||||
strategy:
|
||||
matrix:
|
||||
linux: [ubuntu, debian, fedora, rhel]
|
||||
platforms: [linux/amd64, linux/arm64, linux/arm/v7]
|
||||
include:
|
||||
- release: beta
|
||||
- linux: ubuntu
|
||||
|
@ -105,16 +107,26 @@ jobs:
|
|||
package: rpm
|
||||
- linux: rhel
|
||||
package: rpm
|
||||
exclude:
|
||||
- linux: fedora
|
||||
platforms: linux/arm/v7
|
||||
- linux: rhel
|
||||
platforms: linux/arm/v7
|
||||
uses: ./.github/workflows/linux-build.yml
|
||||
with:
|
||||
RELEASE: ${{ matrix.release }}
|
||||
LINUX: ${{ matrix.linux }}
|
||||
PACKAGE: ${{ matrix.package }}
|
||||
TEST: false
|
||||
PLATFORMS: ${{ matrix.platforms }}
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
ARM_SSH_KEY: ${{ secrets.ARM_SSH_KEY }}
|
||||
ARM_SSH_IP: ${{ needs.create-arm.outputs.ip }}
|
||||
ARM_SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }}
|
||||
|
||||
# Wait for all builds and extract VERSION
|
||||
wait-builds:
|
||||
|
@ -170,44 +182,76 @@ jobs:
|
|||
needs: [wait-builds]
|
||||
strategy:
|
||||
matrix:
|
||||
linux: [bubuntu, debian, fedora, el]
|
||||
linux: [ubuntu, debian, fedora, el]
|
||||
arch: [amd64, arm64, armv7]
|
||||
include:
|
||||
- release: beta
|
||||
repo: bunkerweb
|
||||
- linux: ubuntu
|
||||
separator: _
|
||||
suffix: amd64
|
||||
suffix2: -1_amd64
|
||||
suffix: ""
|
||||
version: jammy
|
||||
package: deb
|
||||
- linux: debian
|
||||
separator: _
|
||||
suffix: amd64
|
||||
suffix2: -1_amd64
|
||||
suffix: ""
|
||||
version: bullseye
|
||||
package: deb
|
||||
- linux: fedora
|
||||
separator: "-"
|
||||
suffix: 1.x86_64
|
||||
suffix2: -1.x86_64
|
||||
version: 37
|
||||
suffix: "1."
|
||||
version: 38
|
||||
package: rpm
|
||||
- linux: el
|
||||
separator: "-"
|
||||
suffix: 1.x86_64
|
||||
suffix2: -1.x86_64
|
||||
suffix: "1."
|
||||
version: 8
|
||||
package: rpm
|
||||
- linux: ubuntu
|
||||
arch: amd64
|
||||
package_arch: amd64
|
||||
- linux: debian
|
||||
arch: amd64
|
||||
package_arch: amd64
|
||||
- linux: fedora
|
||||
arch: amd64
|
||||
package_arch: x86_64
|
||||
- linux: el
|
||||
arch: amd64
|
||||
package_arch: x86_64
|
||||
- linux: ubuntu
|
||||
arch: arm64
|
||||
package_arch: arm64
|
||||
- linux: debian
|
||||
arch: arm64
|
||||
package_arch: arm64
|
||||
- linux: fedora
|
||||
arch: arm64
|
||||
package_arch: aarch64
|
||||
- linux: el
|
||||
arch: amd64
|
||||
package_arch: aarch64
|
||||
- linux: ubuntu
|
||||
arch: armv7
|
||||
package_arch: armhf
|
||||
- linux: debian
|
||||
arch: armv7
|
||||
package_arch: armhf
|
||||
exclude:
|
||||
- linux: fedora
|
||||
arch: armv7
|
||||
- linux: el
|
||||
arch: armv7
|
||||
uses: ./.github/workflows/push-packagecloud.yml
|
||||
with:
|
||||
SEPARATOR: ${{ matrix.separator }}
|
||||
SUFFIX: ${{ matrix.suffix }}
|
||||
SUFFIX2: ${{ matrix.suffix2 }}
|
||||
REPO: ${{ matrix.repo }}
|
||||
LINUX: ${{ matrix.linux }}
|
||||
VERSION: ${{ matrix.separator }}
|
||||
PACKAGE: ${{ matrix.package }}
|
||||
BW_VERSION: ${{ $matrix.package == 'rpm' && needs.wait-builds.outputs.versionrpm || needs.wait-builds.outputs.version }}
|
||||
PACKAGE_ARCH: ${{ matrix.package_arch }}
|
||||
secrets:
|
||||
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
||||
|
||||
|
@ -244,7 +288,7 @@ jobs:
|
|||
# Remove ARM VM
|
||||
rm-arm:
|
||||
if: ${{ always() }}
|
||||
needs: [create-arm, push-images]
|
||||
needs: [create-arm, push-images, build-packages]
|
||||
uses: ./.github/workflows/rm-arm.yml
|
||||
secrets:
|
||||
ARM_ID: ${{ needs.create-arm.outputs.id }}
|
||||
|
|
|
@ -12,6 +12,20 @@ on:
|
|||
PACKAGE:
|
||||
required: true
|
||||
type: string
|
||||
PLATFORMS:
|
||||
required: true
|
||||
type: string
|
||||
TEST:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
ARM_SSH_KEY:
|
||||
required: false
|
||||
ARM_SSH_IP:
|
||||
required: false
|
||||
ARM_SSH_CONFIG:
|
||||
required: false
|
||||
|
||||
secrets:
|
||||
DOCKER_USERNAME:
|
||||
required: true
|
||||
|
@ -29,8 +43,31 @@ jobs:
|
|||
# Prepare
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
- name: Extract arch
|
||||
run : |
|
||||
echo "ARCH=${{ env.PLATFORMS }}" | sed 's/linux//g' | sed 's@/@@g' >> "$GITHUB_ENV"
|
||||
env:
|
||||
PLATFORMS: ${{ inputs.PLATFORMS }}
|
||||
- name: Setup SSH for ARM node
|
||||
if: startsWith(env.ARCH, "arm") == true
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_KEY" > ~/.ssh/id_rsa_arm
|
||||
chmod 600 ~/.ssh/id_rsa_arm
|
||||
echo "$SSH_CONFIG" | sed "s/SSH_IP/$SSH_IP/g" > ~/.ssh/config
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.ARM_SSH_KEY }}
|
||||
SSH_IP: ${{ secrets.ARM_SSH_IP }}
|
||||
SSH_CONFIG: ${{ secrets.ARM_SSH_CONFIG }}
|
||||
- name: Setup Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
if: startsWith(env.ARCH, "arm") == false
|
||||
- name: Setup Buildx (ARM)
|
||||
uses: docker/setup-buildx-action@v2
|
||||
if: startsWith(env.ARCH, "arm") == true
|
||||
with:
|
||||
endpoint: ssh://root@arm
|
||||
platforms: linux/arm64,linux/arm/v7,linux/arm/v6
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
@ -50,7 +87,7 @@ jobs:
|
|||
context: .
|
||||
load: true
|
||||
file: src/linux/Dockerfile-${{ inputs.LINUX }}
|
||||
platforms: linux/amd64
|
||||
platforms: ${{ inputs.PLATFORMS }}
|
||||
tags: local/bunkerweb-${{ inputs.LINUX }}:latest
|
||||
cache-from: type=registry,ref=bunkerity/cache:${{ inputs.LINUX }}-staging
|
||||
cache-to: type=registry,ref=bunkerity/cache:${{ inputs.LINUX }}-staging,mode=min
|
||||
|
@ -62,21 +99,22 @@ jobs:
|
|||
context: .
|
||||
load: true
|
||||
file: src/linux/Dockerfile-${{ inputs.LINUX }}
|
||||
platforms: linux/amd64
|
||||
platforms: ${{ inputs.PLATFORMS }}
|
||||
tags: local/bunkerweb-${{ inputs.LINUX }}:latest
|
||||
# Generate package
|
||||
- name: Generate package
|
||||
run: ./src/linux/package.sh ${{ inputs.LINUX }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: package-${{ inputs.LINUX }}
|
||||
name: package-${{ inputs.LINUX }}-${{ env.ARCH }}
|
||||
path: package-${{ inputs.LINUX }}/*.${{ inputs.PACKAGE }}
|
||||
# Build test image
|
||||
- name: Build test image
|
||||
if: inputs.TEST == true
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: tests/linux/Dockerfile-${{ inputs.LINUX }}
|
||||
platforms: linux/amd64
|
||||
platforms: ${{ inputs.PLATFORMS }}
|
||||
push: true
|
||||
tags: ${{ secrets.PRIVATE_REGISTRY }}/infra/${{ inputs.LINUX }}-tests:${{ inputs.RELEASE }}
|
||||
|
|
|
@ -9,9 +9,6 @@ on:
|
|||
SUFFIX:
|
||||
required: true
|
||||
type: string
|
||||
SUFFIX2:
|
||||
required: true
|
||||
type: string
|
||||
REPO:
|
||||
required: true
|
||||
type: string
|
||||
|
@ -27,6 +24,12 @@ on:
|
|||
BW_VERSION:
|
||||
required: true
|
||||
type: string
|
||||
ARCH:
|
||||
required: true
|
||||
type: string
|
||||
PACKAGE_ARCH:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
PACKAGECLOUD_TOKEN:
|
||||
required: true
|
||||
|
@ -48,16 +51,16 @@ jobs:
|
|||
- uses: actions/download-artifact@v3
|
||||
if: inputs.LINUX != 'el'
|
||||
with:
|
||||
name: package-${{ inputs.LINUX }}
|
||||
name: package-${{ inputs.LINUX }}-${{ inputs.ARCH }}
|
||||
path: /tmp/${{ inputs.LINUX }}
|
||||
- uses: actions/download-artifact@v3
|
||||
if: inputs.LINUX == 'el'
|
||||
with:
|
||||
name: package-rhel
|
||||
path: /tmp/${{ inputs.LINUX }}
|
||||
path: /tmp/${{ inputs.LINUX }}-${{ inputs.ARCH }}
|
||||
# Remove existing packages
|
||||
- name: Remove existing package
|
||||
run: package_cloud yank bunkerity/${{ inputs.REPO }}/${{ inputs.LINUX }}/${{ inputs.VERSION }} bunkerweb${{ inputs.SEPARATOR }}${{ inputs.BW_VERSION }}${{ inputs.SEPARATOR }}${{ inputs.SUFFIX }}.${{ inputs.PACKAGE }}
|
||||
run: package_cloud yank bunkerity/${{ inputs.REPO }}/${{ inputs.LINUX }}/${{ inputs.VERSION }} bunkerweb${{ inputs.SEPARATOR }}${{ inputs.BW_VERSION }}${{ inputs.SEPARATOR }}${{ inputs.SUFFIX }}${{ inputs.PACKAGE_ARCH }}.${{ inputs.PACKAGE }}
|
||||
continue-on-error: true
|
||||
env:
|
||||
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
||||
|
|
|
@ -7,111 +7,56 @@ on:
|
|||
branches: [staging]
|
||||
|
||||
jobs:
|
||||
# Containers
|
||||
build-bw:
|
||||
|
||||
# Build Docker images
|
||||
build-containers:
|
||||
strategy:
|
||||
matrix:
|
||||
image: [bunkerweb, scheduler, autoconf, ui]
|
||||
include:
|
||||
- image: bunkerweb
|
||||
dockerfile: src/bw/Dockerfile
|
||||
- image: scheduler
|
||||
dockerfile: src/scheduler/Dockerfile
|
||||
- image: autoconf
|
||||
dockerfile: src/autoconf/Dockerfile
|
||||
- image: ui
|
||||
dockerfile: src/ui/Dockerfile
|
||||
uses: ./.github/workflows/container-build.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
ARCH: linux/amd64
|
||||
IMAGE: bunkerweb
|
||||
DOCKERFILE: src/bw/Dockerfile
|
||||
CACHE_SUFFIX: "amd64"
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
build-scheduler:
|
||||
uses: ./.github/workflows/container-build.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
ARCH: linux/amd64
|
||||
IMAGE: scheduler
|
||||
DOCKERFILE: src/scheduler/Dockerfile
|
||||
CACHE_SUFFIX: "amd64"
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
build-autoconf:
|
||||
uses: ./.github/workflows/container-build.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
ARCH: linux/amd64
|
||||
IMAGE: autoconf
|
||||
DOCKERFILE: src/autoconf/Dockerfile
|
||||
CACHE_SUFFIX: "amd64"
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
build-ui:
|
||||
uses: ./.github/workflows/container-build.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
ARCH: linux/amd64
|
||||
IMAGE: ui
|
||||
DOCKERFILE: src/ui/Dockerfile
|
||||
CACHE_SUFFIX: "amd64"
|
||||
CACHE: true
|
||||
PUSH: true
|
||||
IMAGE: ${{ matrix.image }}
|
||||
DOCKERFILE: ${{ matrix.dockerfile }}
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
|
||||
# Linux
|
||||
build-ubuntu:
|
||||
# Build Linux packages
|
||||
build-packages:
|
||||
strategy:
|
||||
matrix:
|
||||
linux: [ubuntu, debian, fedora, rhel]
|
||||
include:
|
||||
- linux: ubuntu
|
||||
package: deb
|
||||
- linux: debian
|
||||
package: deb
|
||||
- linux: fedora
|
||||
package: rpm
|
||||
- linux: rhel
|
||||
package: rpm
|
||||
uses: ./.github/workflows/linux-build.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
LINUX: ubuntu
|
||||
PACKAGE: deb
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
build-debian:
|
||||
uses: ./.github/workflows/linux-build.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
LINUX: debian
|
||||
PACKAGE: deb
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
# build-centos:
|
||||
# uses: ./.github/workflows/linux-build.yml
|
||||
# with:
|
||||
# RELEASE: staging
|
||||
# LINUX: centos
|
||||
# PACKAGE: rpm
|
||||
# secrets:
|
||||
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
# DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
# PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
# PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
build-fedora:
|
||||
uses: ./.github/workflows/linux-build.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
LINUX: fedora
|
||||
PACKAGE: rpm
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }}
|
||||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
build-rhel:
|
||||
uses: ./.github/workflows/linux-build.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
LINUX: rhel
|
||||
PACKAGE: rpm
|
||||
LINUX: ${{ matrix.linux }}
|
||||
PACKAGE: ${{ matrix.package }}
|
||||
TEST: true
|
||||
PLATFORMS: linux/amd64
|
||||
secrets:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
@ -143,87 +88,42 @@ jobs:
|
|||
category: "/language:${{matrix.language}}"
|
||||
|
||||
# Create infrastructures
|
||||
create-infra-docker:
|
||||
needs: [code-security, build-bw, build-scheduler]
|
||||
create-infras:
|
||||
needs: [code-security, build-containers, build-packages]
|
||||
strategy:
|
||||
matrix:
|
||||
type: [docker, autoconf, swarm, k8s, linux]
|
||||
uses: ./.github/workflows/staging-create-infra.yml
|
||||
with:
|
||||
TYPE: docker
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
create-infra-autoconf:
|
||||
needs: [code-security, build-bw, build-scheduler, build-autoconf]
|
||||
uses: ./.github/workflows/staging-create-infra.yml
|
||||
with:
|
||||
TYPE: autoconf
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
create-infra-swarm:
|
||||
needs: [code-security, build-bw, build-scheduler, build-autoconf]
|
||||
uses: ./.github/workflows/staging-create-infra.yml
|
||||
with:
|
||||
TYPE: swarm
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
create-infra-k8s:
|
||||
needs: [code-security, build-bw, build-scheduler, build-autoconf]
|
||||
uses: ./.github/workflows/staging-create-infra.yml
|
||||
with:
|
||||
TYPE: k8s
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
create-infra-linux:
|
||||
needs:
|
||||
[
|
||||
code-security,
|
||||
build-ubuntu,
|
||||
build-debian,
|
||||
build-fedora,
|
||||
build-rhel,
|
||||
]
|
||||
uses: ./.github/workflows/staging-create-infra.yml
|
||||
with:
|
||||
TYPE: linux
|
||||
TYPE: ${{ matrix.type }}
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
|
||||
# Perform tests
|
||||
tests-docker:
|
||||
needs: [create-infra-docker]
|
||||
create-infras:
|
||||
needs: [create-infras]
|
||||
strategy:
|
||||
matrix:
|
||||
type: [docker, autoconf, swarm, k8s, linux]
|
||||
include:
|
||||
- type: docker
|
||||
runs_on: "['self-hosted', 'bw-docker']"
|
||||
- type: autoconf
|
||||
runs_on: "['self-hosted', 'bw-autoconf']"
|
||||
- type: swarm
|
||||
runs_on: "['self-hosted', 'bw-swarm']"
|
||||
- type: k8s
|
||||
runs_on: "['ubuntu-latest']"
|
||||
- type: linux
|
||||
runs_on: "['self-hosted', 'bw-linux']"
|
||||
uses: ./.github/workflows/staging-tests.yml
|
||||
with:
|
||||
TYPE: docker
|
||||
RUNS_ON: "['self-hosted', 'bw-docker']"
|
||||
secrets: inherit
|
||||
tests-autoconf:
|
||||
needs: [create-infra-autoconf]
|
||||
uses: ./.github/workflows/staging-tests.yml
|
||||
with:
|
||||
TYPE: autoconf
|
||||
RUNS_ON: "['self-hosted', 'bw-autoconf']"
|
||||
secrets: inherit
|
||||
tests-swarm:
|
||||
needs: [create-infra-swarm]
|
||||
uses: ./.github/workflows/staging-tests.yml
|
||||
with:
|
||||
TYPE: swarm
|
||||
RUNS_ON: "['self-hosted', 'bw-swarm']"
|
||||
secrets: inherit
|
||||
tests-k8s:
|
||||
needs: [create-infra-k8s]
|
||||
uses: ./.github/workflows/staging-tests.yml
|
||||
with:
|
||||
TYPE: k8s
|
||||
RUNS_ON: "['ubuntu-latest']"
|
||||
secrets: inherit
|
||||
tests-linux:
|
||||
needs: [create-infra-linux]
|
||||
uses: ./.github/workflows/staging-tests.yml
|
||||
with:
|
||||
TYPE: linux
|
||||
RUNS_ON: "['self-hosted', 'bw-linux']"
|
||||
TYPE: ${{ matrix.type }}
|
||||
RUNS_ON: ${{ matrix.runs_on }}
|
||||
secrets: inherit
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
tests-ui:
|
||||
needs: [code-security, build-bw, build-scheduler, build-ui]
|
||||
needs: [create-infras]
|
||||
uses: ./.github/workflows/tests-ui.yml
|
||||
with:
|
||||
RELEASE: staging
|
||||
|
@ -232,43 +132,14 @@ jobs:
|
|||
PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
|
||||
|
||||
# Delete infrastructures
|
||||
delete-infra-docker:
|
||||
delete-infras:
|
||||
if: ${{ always() }}
|
||||
needs: [tests-docker]
|
||||
needs: [create-infras]
|
||||
strategy:
|
||||
matrix:
|
||||
type: [docker, autoconf, swarm, k8s, linux]
|
||||
uses: ./.github/workflows/staging-delete-infra.yml
|
||||
with:
|
||||
TYPE: docker
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
delete-infra-autoconf:
|
||||
if: ${{ always() }}
|
||||
needs: [tests-autoconf]
|
||||
uses: ./.github/workflows/staging-delete-infra.yml
|
||||
with:
|
||||
TYPE: autoconf
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
delete-infra-swarm:
|
||||
if: ${{ always() }}
|
||||
needs: [tests-swarm]
|
||||
uses: ./.github/workflows/staging-delete-infra.yml
|
||||
with:
|
||||
TYPE: swarm
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
delete-infra-k8s:
|
||||
if: ${{ always() }}
|
||||
needs: [tests-k8s]
|
||||
uses: ./.github/workflows/staging-delete-infra.yml
|
||||
with:
|
||||
TYPE: k8s
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
||||
delete-infra-linux:
|
||||
if: ${{ always() }}
|
||||
needs: [tests-linux]
|
||||
uses: ./.github/workflows/staging-delete-infra.yml
|
||||
with:
|
||||
TYPE: linux
|
||||
TYPE: ${{ matrix.type }}
|
||||
secrets:
|
||||
CICD_SECRETS: ${{ secrets.CICD_SECRETS }}
|
|
@ -567,6 +567,7 @@ spec:
|
|||
bunkerweb.io/INSTANCE: "yes"
|
||||
spec:
|
||||
containers:
|
||||
# using bunkerweb as name is mandatory
|
||||
- name: bunkerweb
|
||||
image: bunkerity/bunkerweb:1.5.0-beta
|
||||
imagePullPolicy: Always
|
||||
|
@ -816,7 +817,7 @@ List of supported Linux distros :
|
|||
|
||||
- Debian 11 "Bullseye"
|
||||
- Ubuntu 22.04 "Jammy"
|
||||
- Fedora 37
|
||||
- Fedora 38
|
||||
- RedHat Enterprise Linux (RHEL) 8.7
|
||||
|
||||
Please note that you will need to **install NGINX 1.24.0 before BunkerWeb**. For all distros, except Fedora, using prebuilt packages from [official NGINX repository](https://nginx.org/en/linux_packages.html) is mandatory. Compiling NGINX from source or using packages from different repositories won't work with the official prebuilt packages of BunkerWeb but you can build it from source.
|
||||
|
@ -1082,8 +1083,7 @@ List of supported Linux distros :
|
|||
|
||||
- Debian 11 "Bullseye"
|
||||
- Ubuntu 22.04 "Jammy"
|
||||
- Fedora 37
|
||||
- CentOS Stream 8
|
||||
- Fedora 38
|
||||
- RedHat Enterprise Linux (RHEL) 8.7
|
||||
|
||||
[Ansible](https://docs.ansible.com/ansible/latest/index.html) is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
|
||||
|
|
|
@ -522,6 +522,7 @@ Because the web UI is a web application, the recommended installation procedure
|
|||
bunkerweb.io/INSTANCE: "yes"
|
||||
spec:
|
||||
containers:
|
||||
# using bunkerweb as name is mandatory
|
||||
- name: bunkerweb
|
||||
image: bunkerity/bunkerweb:1.5.0-beta
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -46,6 +46,7 @@ spec:
|
|||
bunkerweb.io/INSTANCE: "yes"
|
||||
spec:
|
||||
containers:
|
||||
# using bunkerweb as name is mandatory
|
||||
- name: bunkerweb
|
||||
image: bunkerity/bunkerweb:1.5.0-beta
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -46,6 +46,7 @@ spec:
|
|||
bunkerweb.io/INSTANCE: "yes"
|
||||
spec:
|
||||
containers:
|
||||
# using bunkerweb as name is mandatory
|
||||
- name: bunkerweb
|
||||
image: bunkerity/bunkerweb:1.5.0-beta
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -46,6 +46,7 @@ spec:
|
|||
bunkerweb.io/INSTANCE: "yes"
|
||||
spec:
|
||||
containers:
|
||||
# using bunkerweb as name is mandatory
|
||||
- name: bunkerweb
|
||||
image: bunkerity/bunkerweb:1.5.0-beta
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -46,6 +46,7 @@ spec:
|
|||
bunkerweb.io/INSTANCE: "yes"
|
||||
spec:
|
||||
containers:
|
||||
# using bunkerweb as name is mandatory
|
||||
- name: bunkerweb
|
||||
image: bunkerity/bunkerweb:1.5.0-beta
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -46,6 +46,7 @@ spec:
|
|||
bunkerweb.io/INSTANCE: "yes"
|
||||
spec:
|
||||
containers:
|
||||
# using bunkerweb as name is mandatory
|
||||
- name: bunkerweb
|
||||
image: bunkerity/bunkerweb:1.5.0-beta
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -46,6 +46,7 @@ spec:
|
|||
bunkerweb.io/INSTANCE: "yes"
|
||||
spec:
|
||||
containers:
|
||||
# using bunkerweb as name is mandatory
|
||||
- name: bunkerweb
|
||||
image: bunkerity/bunkerweb:1.5.0-beta
|
||||
imagePullPolicy: Always
|
||||
|
|
|
@ -41,10 +41,17 @@ class IngressController(Controller, ConfigCaller):
|
|||
health = True
|
||||
break
|
||||
instance["health"] = health
|
||||
instance["env"] = {
|
||||
env.name: env.value or ""
|
||||
for env in controller_instance.spec.containers[0].env
|
||||
}
|
||||
instance["env"] = {}
|
||||
pod = None
|
||||
for container in controller_instance.spec.containers:
|
||||
if container.name == "bunkerweb":
|
||||
pod = container
|
||||
break
|
||||
if not pod:
|
||||
self.__logger.warning(f"Missing container bunkerweb in pod {controller_instance.metadata.name}")
|
||||
else:
|
||||
for env in pod.env:
|
||||
instance["env"][env.name] = env.value
|
||||
for controller_service in self._get_controller_services():
|
||||
if controller_service.metadata.annotations:
|
||||
for (
|
||||
|
@ -156,8 +163,16 @@ class IngressController(Controller, ConfigCaller):
|
|||
):
|
||||
continue
|
||||
|
||||
pod = None
|
||||
for container in instance.spec.containers:
|
||||
if container.name == "bunkerweb":
|
||||
pod = container
|
||||
break
|
||||
if not pod :
|
||||
continue
|
||||
|
||||
variables = {
|
||||
env.name: env.value or "" for env in instance.spec.containers[0].env
|
||||
env.name: env.value or "" for env in pod.env
|
||||
}
|
||||
|
||||
if "SERVER_NAME" in variables and variables["SERVER_NAME"].strip():
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM fedora:37
|
||||
FROM fedora:38
|
||||
|
||||
ENV OS=fedora
|
||||
ENV NGINX_VERSION 1.24.0
|
||||
|
|
|
@ -5,6 +5,7 @@ ENV NGINX_VERSION 1.24.0
|
|||
|
||||
# Copy centos repo
|
||||
COPY src/linux/centos.repo /etc/yum.repos.d/centos.repo
|
||||
RUN sed -i "s/%ARCH%/$(uname -m)/g" src/linux/centos.repo /etc/yum.repos.d/centos.repo
|
||||
|
||||
# Copy RPM-GPG-KEY-CentOS-Official
|
||||
COPY src/linux/RPM-GPG-KEY-centosofficial /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[centos8-base]
|
||||
name = CentOS 8 Base OS
|
||||
baseurl = http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/
|
||||
baseurl = http://mirror.centos.org/centos/8-stream/BaseOS/%ARCH%/os/
|
||||
gpgcheck = 1
|
||||
enabled = 1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
|
@ -4,7 +4,7 @@
|
|||
--version %VERSION%
|
||||
--architecture x86_64
|
||||
--depends bash --depends python3 --depends 'nginx = 1:1.24.0-1.fc37' --depends libcurl-devel --depends libxml2 --depends lmdb-libs --depends geoip-devel --depends gd --depends sudo --depends procps --depends lsof --depends nginx-mod-stream
|
||||
--description "BunkerWeb %VERSION% for Fedora 37"
|
||||
--description "BunkerWeb %VERSION% for Fedora 38"
|
||||
--url "https://www.bunkerweb.io"
|
||||
--maintainer "Bunkerity <contact at bunkerity dot com>"
|
||||
--before-install /usr/share/bunkerweb/scripts/beforeInstall.sh
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM fedora:37
|
||||
FROM fedora:38
|
||||
|
||||
ENV container docker
|
||||
ENV NGINX_VERSION 1.24.0
|
||||
|
|
|
@ -4,6 +4,7 @@ ENV NGINX_VERSION 1.24.0
|
|||
|
||||
# Copy centos repo
|
||||
COPY src/linux/centos.repo /etc/yum.repos.d/centos.repo
|
||||
RUN sed -i "s/%ARCH%/$(uname -m)/g" src/linux/centos.repo /etc/yum.repos.d/centos.repo
|
||||
|
||||
# Copy RPM-GPG-KEY-CentOS-Official
|
||||
COPY src/linux/RPM-GPG-KEY-centosofficial /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
|
|
Loading…
Reference in New Issue