From b1beba2189410d937314937bea12a5ad01f307e5 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Thu, 14 Mar 2024 14:27:57 +0200 Subject: [PATCH 1/2] Build the rest of the images; remove old things --- .drone.jsonnet | 385 --------- .drone.yml | 1627 ----------------------------------- .github/workflows/ci.yml | 73 ++ fedora-build/Dockerfile | 38 - fedora-test/Dockerfile | 52 -- ubuntu-build/Dockerfile | 31 - ubuntu-gcc/Dockerfile | 13 - ubuntu-test-func/Dockerfile | 25 - ubuntu-test/Dockerfile | 49 -- 9 files changed, 73 insertions(+), 2220 deletions(-) delete mode 100644 .drone.jsonnet delete mode 100644 .drone.yml delete mode 100644 fedora-build/Dockerfile delete mode 100644 fedora-test/Dockerfile delete mode 100644 ubuntu-build/Dockerfile delete mode 100644 ubuntu-gcc/Dockerfile delete mode 100644 ubuntu-test-func/Dockerfile delete mode 100644 ubuntu-test/Dockerfile diff --git a/.drone.jsonnet b/.drone.jsonnet deleted file mode 100644 index 62fc7cb..0000000 --- a/.drone.jsonnet +++ /dev/null @@ -1,385 +0,0 @@ -local ci_image = 'rspamd/ci'; -local pkg_image = 'rspamd/pkg'; -local rbldnsd_image = 'rspamd/rbldnsd'; - -local ALPINE_VERSION = '3.17.0'; -local FEDORA_VERSION = '38'; -local UBUNTU_VERSION = '22.04'; - -local docker_defaults = { - username: { - from_secret: 'docker_username', - }, - password: { - from_secret: 'docker_password', - }, -}; - -local pipeline_defaults = { - kind: 'pipeline', - type: 'docker', -}; - -local trigger = { - trigger: { - branch: [ - 'master', - ], - event: [ - 'push', - 'tag', - 'custom', - ], - }, -}; - -local tidyall_pipeline = { - name: 'tidyall', - steps: [ - { - name: 'perl_tidyall_image', - image: 'plugins/docker', - settings: { - dockerfile: 'perl-tidyall/Dockerfile', - label_schema: [ - 'docker.dockerfile=perl-tidyall/Dockerfile', - ], - build_args: [ - 'ALPINE_VERSION=' + ALPINE_VERSION, - ], - repo: ci_image, - tags: [ - 'perl-tidyall', - ], - } + docker_defaults, - }, - ], -} + trigger + pipeline_defaults; - -local platform(arch) = { - platform: { - os: 'linux', - arch: arch, - }, -}; - -local build_base_image(arch) = { - name: 'base_image_' + arch, - steps: [ - { - name: 'base_image', - image: 'plugins/docker', - settings: { - dockerfile: 'ubuntu-gcc/Dockerfile', - label_schema: [ - 'docker.dockerfile=ubuntu-gcc/Dockerfile', - ], - build_args: [ - 'UBUNTU_VERSION=' + UBUNTU_VERSION, - ], - repo: ci_image, - tags: [ - 'ubuntu-gcc-' + arch, - ], - } + docker_defaults, - }, - ], -} + platform(arch) + trigger + pipeline_defaults; - -local build_rbldnsd_image(arch) = { - name: 'rbldnsd-' + arch, - steps: [ - { - name: 'base_image', - image: 'plugins/docker', - settings: { - dockerfile: 'rbldnsd-build/Dockerfile', - label_schema: [ - 'docker.dockerfile=rbldnsd-build/Dockerfile', - ], - build_args: [ - 'DEBIAN_VERSION=bookworm', - ], - repo: rbldnsd_image, - tags: [ - 'build-' + arch, - ], - } + docker_defaults, - }, - ], -} + platform(arch) + trigger + pipeline_defaults; - -local build_test_image(arch) = { - depends_on: [ - 'base_image_' + arch, - 'build_image_' + arch, - ], - name: 'test_image_' + arch, - steps: [ - { - name: 'test_image', - image: 'plugins/docker', - settings: { - dockerfile: 'ubuntu-test/Dockerfile', - build_args: [ - std.format('UBUNTU_BUILD_IMAGE=%s:ubuntu-build-%s', [ci_image, arch]), - std.format('UBUNTU_GCC_IMAGE=%s:ubuntu-gcc-%s', [ci_image, arch]), - ], - label_schema: [ - 'docker.dockerfile=ubuntu-test/Dockerfile', - ], - repo: ci_image, - tags: [ - 'ubuntu-test-' + arch, - ], - volumes: [ - { - name: 'dump-ubuntu', - path: '/dump', - }, - ], - } + docker_defaults, - }, - ], - volumes: [ - { - name: 'dump-ubuntu', - temp: {}, - }, - ], -} + platform(arch) + trigger + pipeline_defaults; - -local build_build_image(arch) = { - depends_on: [ - 'base_image_' + arch, - ], - name: 'build_image_' + arch, - steps: [ - { - name: 'build_image', - image: 'plugins/docker', - settings: { - dockerfile: 'ubuntu-build/Dockerfile', - build_args: [ - std.format('UBUNTU_GCC_IMAGE=%s:ubuntu-gcc-%s', [ci_image, arch]), - ], - label_schema: [ - 'docker.dockerfile=ubuntu-build/Dockerfile', - ], - repo: ci_image, - tags: [ - 'ubuntu-build-' + arch, - ], - } + docker_defaults, - }, - ], -} + platform(arch) + trigger + pipeline_defaults; - -local build_fedora_build_image(arch) = { - name: 'fedora_build_image_' + arch, - steps: [ - { - name: 'fedora_build_image', - image: 'plugins/docker', - settings: { - dockerfile: 'fedora-build/Dockerfile', - label_schema: [ - 'docker.dockerfile=fedora-build/Dockerfile', - ], - build_args: [ - 'FEDORA_VERSION=' + FEDORA_VERSION, - ], - repo: ci_image, - tags: [ - 'fedora-build-' + arch, - ], - } + docker_defaults, - }, - ], -} + platform(arch) + trigger + pipeline_defaults; - -local build_ci_images(arch) = { - depends_on: [ - 'build_image_' + arch, - 'fedora_build_image_' + arch, - 'test_image_' + arch, - ], - name: 'ci-images-' + arch, - steps: [ - { - name: 'func_test_image', - image: 'plugins/docker', - settings: { - dockerfile: 'ubuntu-test-func/Dockerfile', - build_args: [ - std.format('UBUNTU_TEST_IMAGE=%s:ubuntu-test-%s', [ci_image, arch]), - ], - label_schema: [ - 'docker.dockerfile=ubuntu-test-func/Dockerfile', - ], - repo: ci_image, - tags: [ - 'ubuntu-test-func-' + arch, - ], - } + docker_defaults, - }, - { - name: 'fedora_test_image', - image: 'plugins/docker', - settings: { - dockerfile: 'fedora-test/Dockerfile', - label_schema: [ - 'docker.dockerfile=fedora-test/Dockerfile', - ], - build_args: [ - std.format('FEDORA_BUILD_IMAGE=%s:fedora-build-%s', [ci_image, arch]), - 'FEDORA_VERSION=' + FEDORA_VERSION, - ], - repo: ci_image, - tags: [ - 'fedora-test-' + arch, - ], - volumes: [ - { - name: 'dump-fedora', - path: '/dump', - }, - ], - } + docker_defaults, - }, - ], - volumes: [ - { - name: 'dump-fedora', - temp: {}, - }, - ], -} + platform(arch) + trigger + pipeline_defaults; - -local build_pkg_image(dist, arch) = { - name: std.format('pkg-%s-%s', [dist, arch]), - steps: [ - { - name: std.format('pkg-%s-%s', [dist, arch]), - image: 'plugins/docker', - settings: { - dockerfile: dist + '/Dockerfile', - label_schema: [ - 'docker.dockerfile=' + dist + '/Dockerfile', - ], - repo: pkg_image, - tags: [ - dist + '-' + arch, - ], - } + docker_defaults, - }, - ], -} + platform(arch) + trigger + pipeline_defaults; - -local multiarch_step(step_name, image_name, image_tag) = { - name: step_name, - image: 'plugins/manifest', - settings: { - target: std.format('%s:%s', [image_name, image_tag]), - template: std.format('%s:%s-ARCH', [image_name, image_tag]), - platforms: [ - 'linux/amd64', - 'linux/arm64', - ], - } + docker_defaults, -}; - -local multiarch_rbldnsd_image = { - name: 'multiarch_rbldnsd', - depends_on: [ - 'rbldnsd-amd64', - 'rbldnsd-arm64', - ], - steps: [ - multiarch_step('multiarch_rbldnsd', rbldnsd_image, 'build'), - ], -} + trigger + pipeline_defaults; - -local multiarch_ci_images = { - name: 'multiarch_ci_images', - depends_on: [ - 'ci-images-amd64', - 'ci-images-arm64', - ], - steps: [ - multiarch_step('ci_ubuntu_build', ci_image, 'ubuntu-build'), - multiarch_step('ci_ubuntu_gcc', ci_image, 'ubuntu-gcc'), - multiarch_step('ci_ubuntu_test', ci_image, 'ubuntu-test'), - multiarch_step('ci_ubuntu_test_func', ci_image, 'ubuntu-test-func'), - multiarch_step('ci_fedora_build', ci_image, 'fedora-build'), - multiarch_step('ci_fedora_test', ci_image, 'fedora-test'), - ], -} + trigger + pipeline_defaults; - -local multiarch_pkg_images = { - name: 'multiarch_pkg_images', - depends_on: [ - 'pkg-centos-7-amd64', - 'pkg-centos-7-arm64', - 'pkg-centos-8-amd64', - 'pkg-centos-8-arm64', - 'pkg-centos-9-amd64', - 'pkg-centos-9-arm64', - 'pkg-debian-bullseye-amd64', - 'pkg-debian-bullseye-arm64', - 'pkg-debian-bookworm-amd64', - 'pkg-debian-bookworm-arm64', - 'pkg-ubuntu-focal-amd64', - 'pkg-ubuntu-focal-arm64', - 'pkg-ubuntu-jammy-amd64', - 'pkg-ubuntu-jammy-arm64', - ], - steps: [ - multiarch_step('pkg_centos7', pkg_image, 'centos-7'), - multiarch_step('pkg_centos8', pkg_image, 'centos-8'), - multiarch_step('pkg_centos9', pkg_image, 'centos-9'), - multiarch_step('pkg_ubuntu2004', pkg_image, 'ubuntu-focal'), - multiarch_step('pkg_ubuntu2204', pkg_image, 'ubuntu-jammy'), - multiarch_step('pkg_debian11', pkg_image, 'debian-bullseye'), - multiarch_step('pkg_debian12', pkg_image, 'debian-bookworm'), - ], -} + trigger + pipeline_defaults; - -local signature_placeholder = { - kind: 'signature', - hmac: '0000000000000000000000000000000000000000000000000000000000000000', -}; - -[ - build_base_image('amd64'), - build_base_image('arm64'), - build_build_image('amd64'), - build_build_image('arm64'), - build_fedora_build_image('amd64'), - build_fedora_build_image('arm64'), - build_test_image('amd64'), - build_test_image('arm64'), - build_ci_images('amd64'), - build_ci_images('arm64'), - build_pkg_image('centos-7', 'amd64'), - build_pkg_image('centos-7', 'arm64'), - build_pkg_image('centos-8', 'amd64'), - build_pkg_image('centos-8', 'arm64'), - build_pkg_image('centos-9', 'amd64'), - build_pkg_image('centos-9', 'arm64'), - build_pkg_image('debian-bullseye', 'amd64'), - build_pkg_image('debian-bullseye', 'arm64'), - build_pkg_image('debian-bookworm', 'amd64'), - build_pkg_image('debian-bookworm', 'arm64'), - build_pkg_image('ubuntu-focal', 'amd64'), - build_pkg_image('ubuntu-focal', 'arm64'), - build_pkg_image('ubuntu-jammy', 'amd64'), - build_pkg_image('ubuntu-jammy', 'arm64'), - build_rbldnsd_image('amd64'), - build_rbldnsd_image('arm64'), - multiarch_rbldnsd_image, - multiarch_ci_images, - multiarch_pkg_images, - tidyall_pipeline, - signature_placeholder, -] diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index ba96d44..0000000 --- a/.drone.yml +++ /dev/null @@ -1,1627 +0,0 @@ ---- -{ - "kind": "pipeline", - "name": "base_image_amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "base_image", - "settings": { - "build_args": [ - "UBUNTU_VERSION=22.04" - ], - "dockerfile": "ubuntu-gcc/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-gcc/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "ubuntu-gcc-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "base_image_arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "base_image", - "settings": { - "build_args": [ - "UBUNTU_VERSION=22.04" - ], - "dockerfile": "ubuntu-gcc/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-gcc/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "ubuntu-gcc-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "depends_on": [ - "base_image_amd64" - ], - "kind": "pipeline", - "name": "build_image_amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "build_image", - "settings": { - "build_args": [ - "UBUNTU_GCC_IMAGE=rspamd/ci:ubuntu-gcc-amd64" - ], - "dockerfile": "ubuntu-build/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-build/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "ubuntu-build-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "depends_on": [ - "base_image_arm64" - ], - "kind": "pipeline", - "name": "build_image_arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "build_image", - "settings": { - "build_args": [ - "UBUNTU_GCC_IMAGE=rspamd/ci:ubuntu-gcc-arm64" - ], - "dockerfile": "ubuntu-build/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-build/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "ubuntu-build-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "fedora_build_image_amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "fedora_build_image", - "settings": { - "build_args": [ - "FEDORA_VERSION=38" - ], - "dockerfile": "fedora-build/Dockerfile", - "label_schema": [ - "docker.dockerfile=fedora-build/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "fedora-build-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "fedora_build_image_arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "fedora_build_image", - "settings": { - "build_args": [ - "FEDORA_VERSION=38" - ], - "dockerfile": "fedora-build/Dockerfile", - "label_schema": [ - "docker.dockerfile=fedora-build/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "fedora-build-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "depends_on": [ - "base_image_amd64", - "build_image_amd64" - ], - "kind": "pipeline", - "name": "test_image_amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "test_image", - "settings": { - "build_args": [ - "UBUNTU_BUILD_IMAGE=rspamd/ci:ubuntu-build-amd64", - "UBUNTU_GCC_IMAGE=rspamd/ci:ubuntu-gcc-amd64" - ], - "dockerfile": "ubuntu-test/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-test/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "ubuntu-test-amd64" - ], - "username": { - "from_secret": "docker_username" - }, - "volumes": [ - { - "name": "dump-ubuntu", - "path": "/dump" - } - ] - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker", - "volumes": [ - { - "name": "dump-ubuntu", - "temp": { } - } - ] -} ---- -{ - "depends_on": [ - "base_image_arm64", - "build_image_arm64" - ], - "kind": "pipeline", - "name": "test_image_arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "test_image", - "settings": { - "build_args": [ - "UBUNTU_BUILD_IMAGE=rspamd/ci:ubuntu-build-arm64", - "UBUNTU_GCC_IMAGE=rspamd/ci:ubuntu-gcc-arm64" - ], - "dockerfile": "ubuntu-test/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-test/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "ubuntu-test-arm64" - ], - "username": { - "from_secret": "docker_username" - }, - "volumes": [ - { - "name": "dump-ubuntu", - "path": "/dump" - } - ] - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker", - "volumes": [ - { - "name": "dump-ubuntu", - "temp": { } - } - ] -} ---- -{ - "depends_on": [ - "build_image_amd64", - "fedora_build_image_amd64", - "test_image_amd64" - ], - "kind": "pipeline", - "name": "ci-images-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "func_test_image", - "settings": { - "build_args": [ - "UBUNTU_TEST_IMAGE=rspamd/ci:ubuntu-test-amd64" - ], - "dockerfile": "ubuntu-test-func/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-test-func/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "ubuntu-test-func-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/docker", - "name": "fedora_test_image", - "settings": { - "build_args": [ - "FEDORA_BUILD_IMAGE=rspamd/ci:fedora-build-amd64", - "FEDORA_VERSION=38" - ], - "dockerfile": "fedora-test/Dockerfile", - "label_schema": [ - "docker.dockerfile=fedora-test/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "fedora-test-amd64" - ], - "username": { - "from_secret": "docker_username" - }, - "volumes": [ - { - "name": "dump-fedora", - "path": "/dump" - } - ] - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker", - "volumes": [ - { - "name": "dump-fedora", - "temp": { } - } - ] -} ---- -{ - "depends_on": [ - "build_image_arm64", - "fedora_build_image_arm64", - "test_image_arm64" - ], - "kind": "pipeline", - "name": "ci-images-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "func_test_image", - "settings": { - "build_args": [ - "UBUNTU_TEST_IMAGE=rspamd/ci:ubuntu-test-arm64" - ], - "dockerfile": "ubuntu-test-func/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-test-func/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "ubuntu-test-func-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/docker", - "name": "fedora_test_image", - "settings": { - "build_args": [ - "FEDORA_BUILD_IMAGE=rspamd/ci:fedora-build-arm64", - "FEDORA_VERSION=38" - ], - "dockerfile": "fedora-test/Dockerfile", - "label_schema": [ - "docker.dockerfile=fedora-test/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "fedora-test-arm64" - ], - "username": { - "from_secret": "docker_username" - }, - "volumes": [ - { - "name": "dump-fedora", - "path": "/dump" - } - ] - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker", - "volumes": [ - { - "name": "dump-fedora", - "temp": { } - } - ] -} ---- -{ - "kind": "pipeline", - "name": "pkg-centos-7-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-centos-7-amd64", - "settings": { - "dockerfile": "centos-7/Dockerfile", - "label_schema": [ - "docker.dockerfile=centos-7/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "centos-7-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-centos-7-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-centos-7-arm64", - "settings": { - "dockerfile": "centos-7/Dockerfile", - "label_schema": [ - "docker.dockerfile=centos-7/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "centos-7-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-centos-8-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-centos-8-amd64", - "settings": { - "dockerfile": "centos-8/Dockerfile", - "label_schema": [ - "docker.dockerfile=centos-8/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "centos-8-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-centos-8-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-centos-8-arm64", - "settings": { - "dockerfile": "centos-8/Dockerfile", - "label_schema": [ - "docker.dockerfile=centos-8/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "centos-8-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-centos-9-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-centos-9-amd64", - "settings": { - "dockerfile": "centos-9/Dockerfile", - "label_schema": [ - "docker.dockerfile=centos-9/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "centos-9-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-centos-9-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-centos-9-arm64", - "settings": { - "dockerfile": "centos-9/Dockerfile", - "label_schema": [ - "docker.dockerfile=centos-9/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "centos-9-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-debian-bullseye-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-debian-bullseye-amd64", - "settings": { - "dockerfile": "debian-bullseye/Dockerfile", - "label_schema": [ - "docker.dockerfile=debian-bullseye/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "debian-bullseye-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-debian-bullseye-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-debian-bullseye-arm64", - "settings": { - "dockerfile": "debian-bullseye/Dockerfile", - "label_schema": [ - "docker.dockerfile=debian-bullseye/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "debian-bullseye-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-debian-bookworm-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-debian-bookworm-amd64", - "settings": { - "dockerfile": "debian-bookworm/Dockerfile", - "label_schema": [ - "docker.dockerfile=debian-bookworm/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "debian-bookworm-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-debian-bookworm-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-debian-bookworm-arm64", - "settings": { - "dockerfile": "debian-bookworm/Dockerfile", - "label_schema": [ - "docker.dockerfile=debian-bookworm/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "debian-bookworm-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-ubuntu-focal-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-ubuntu-focal-amd64", - "settings": { - "dockerfile": "ubuntu-focal/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-focal/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "ubuntu-focal-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-ubuntu-focal-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-ubuntu-focal-arm64", - "settings": { - "dockerfile": "ubuntu-focal/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-focal/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "ubuntu-focal-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-ubuntu-jammy-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-ubuntu-jammy-amd64", - "settings": { - "dockerfile": "ubuntu-jammy/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-jammy/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "ubuntu-jammy-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "pkg-ubuntu-jammy-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "pkg-ubuntu-jammy-arm64", - "settings": { - "dockerfile": "ubuntu-jammy/Dockerfile", - "label_schema": [ - "docker.dockerfile=ubuntu-jammy/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/pkg", - "tags": [ - "ubuntu-jammy-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "rbldnsd-amd64", - "platform": { - "arch": "amd64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "base_image", - "settings": { - "build_args": [ - "DEBIAN_VERSION=bookworm" - ], - "dockerfile": "rbldnsd-build/Dockerfile", - "label_schema": [ - "docker.dockerfile=rbldnsd-build/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/rbldnsd", - "tags": [ - "build-amd64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "rbldnsd-arm64", - "platform": { - "arch": "arm64", - "os": "linux" - }, - "steps": [ - { - "image": "plugins/docker", - "name": "base_image", - "settings": { - "build_args": [ - "DEBIAN_VERSION=bookworm" - ], - "dockerfile": "rbldnsd-build/Dockerfile", - "label_schema": [ - "docker.dockerfile=rbldnsd-build/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/rbldnsd", - "tags": [ - "build-arm64" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "depends_on": [ - "rbldnsd-amd64", - "rbldnsd-arm64" - ], - "kind": "pipeline", - "name": "multiarch_rbldnsd", - "steps": [ - { - "image": "plugins/manifest", - "name": "multiarch_rbldnsd", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/rbldnsd:build", - "template": "rspamd/rbldnsd:build-ARCH", - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "depends_on": [ - "ci-images-amd64", - "ci-images-arm64" - ], - "kind": "pipeline", - "name": "multiarch_ci_images", - "steps": [ - { - "image": "plugins/manifest", - "name": "ci_ubuntu_build", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/ci:ubuntu-build", - "template": "rspamd/ci:ubuntu-build-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "ci_ubuntu_gcc", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/ci:ubuntu-gcc", - "template": "rspamd/ci:ubuntu-gcc-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "ci_ubuntu_test", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/ci:ubuntu-test", - "template": "rspamd/ci:ubuntu-test-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "ci_ubuntu_test_func", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/ci:ubuntu-test-func", - "template": "rspamd/ci:ubuntu-test-func-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "ci_fedora_build", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/ci:fedora-build", - "template": "rspamd/ci:fedora-build-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "ci_fedora_test", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/ci:fedora-test", - "template": "rspamd/ci:fedora-test-ARCH", - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "depends_on": [ - "pkg-centos-7-amd64", - "pkg-centos-7-arm64", - "pkg-centos-8-amd64", - "pkg-centos-8-arm64", - "pkg-centos-9-amd64", - "pkg-centos-9-arm64", - "pkg-debian-bullseye-amd64", - "pkg-debian-bullseye-arm64", - "pkg-debian-bookworm-amd64", - "pkg-debian-bookworm-arm64", - "pkg-ubuntu-focal-amd64", - "pkg-ubuntu-focal-arm64", - "pkg-ubuntu-jammy-amd64", - "pkg-ubuntu-jammy-arm64" - ], - "kind": "pipeline", - "name": "multiarch_pkg_images", - "steps": [ - { - "image": "plugins/manifest", - "name": "pkg_centos7", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/pkg:centos-7", - "template": "rspamd/pkg:centos-7-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "pkg_centos8", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/pkg:centos-8", - "template": "rspamd/pkg:centos-8-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "pkg_centos9", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/pkg:centos-9", - "template": "rspamd/pkg:centos-9-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "pkg_ubuntu2004", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/pkg:ubuntu-focal", - "template": "rspamd/pkg:ubuntu-focal-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "pkg_ubuntu2204", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/pkg:ubuntu-jammy", - "template": "rspamd/pkg:ubuntu-jammy-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "pkg_debian11", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/pkg:debian-bullseye", - "template": "rspamd/pkg:debian-bullseye-ARCH", - "username": { - "from_secret": "docker_username" - } - } - }, - { - "image": "plugins/manifest", - "name": "pkg_debian12", - "settings": { - "password": { - "from_secret": "docker_password" - }, - "platforms": [ - "linux/amd64", - "linux/arm64" - ], - "target": "rspamd/pkg:debian-bookworm", - "template": "rspamd/pkg:debian-bookworm-ARCH", - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "kind": "pipeline", - "name": "tidyall", - "steps": [ - { - "image": "plugins/docker", - "name": "perl_tidyall_image", - "settings": { - "build_args": [ - "ALPINE_VERSION=3.17.0" - ], - "dockerfile": "perl-tidyall/Dockerfile", - "label_schema": [ - "docker.dockerfile=perl-tidyall/Dockerfile" - ], - "password": { - "from_secret": "docker_password" - }, - "repo": "rspamd/ci", - "tags": [ - "perl-tidyall" - ], - "username": { - "from_secret": "docker_username" - } - } - } - ], - "trigger": { - "branch": [ - "master" - ], - "event": [ - "push", - "tag", - "custom" - ] - }, - "type": "docker" -} ---- -{ - "hmac": "4821c1bcdc1664a1cb551d6337ccdb16b4766bb11b8a6bbb3ee7c43317a8e192", - "kind": "signature" -} -... diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ce2023..eebed5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,3 +20,76 @@ jobs: permissions: packages: write contents: read + + perl_tidyall: + uses: ./.github/workflows/docker_build.yml + with: + name: "perl-tidyall" + platforms: linux/amd64 + permissions: + packages: write + contents: read + + centos_7: + uses: ./.github/workflows/docker_build.yml + with: + name: "centos-7" + permissions: + packages: write + contents: read + + centos_8: + uses: ./.github/workflows/docker_build.yml + with: + name: "centos-8" + permissions: + packages: write + contents: read + + centos_9: + uses: ./.github/workflows/docker_build.yml + with: + name: "centos-9" + permissions: + packages: write + contents: read + + debian_bullseye: + uses: ./.github/workflows/docker_build.yml + with: + name: "debian-bullseye" + permissions: + packages: write + contents: read + + debian_bookworm: + uses: ./.github/workflows/docker_build.yml + with: + name: "debian-bookworm" + permissions: + packages: write + contents: read + + rbldnsd_build: + uses: ./.github/workflows/docker_build.yml + with: + name: "rbldnsd-build" + permissions: + packages: write + contents: read + + ubuntu_focal: + uses: ./.github/workflows/docker_build.yml + with: + name: "ubuntu-focal" + permissions: + packages: write + contents: read + + ubuntu_jammy: + uses: ./.github/workflows/docker_build.yml + with: + name: "ubuntu-jammy" + permissions: + packages: write + contents: read diff --git a/fedora-build/Dockerfile b/fedora-build/Dockerfile deleted file mode 100644 index 08e9991..0000000 --- a/fedora-build/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# Fedora with clang and build dependencies for rspamd -ARG FEDORA_VERSION=38 - -FROM fedora:${FEDORA_VERSION} - -ARG c_compiler=clang -ARG cxx_compiler=clang++ -ENV c_compiler=$c_compiler -ENV cxx_compiler=$cxx_compiler - -# clang-plugin build dependencies: -# * clang-devel -# * llvm-devel -RUN set -x; \ - yum -qy --setopt install_weak_deps=False upgrade-minimal && \ - yum -y --setopt install_weak_deps=False install clang compiler-rt lld cmake make pkgconf-pkg-config \ - perl ragel file-devel glib2-devel libarchive-devel libevent-devel libicu-devel luajit-devel openssl-devel sqlite-devel zlib-devel \ - clang-devel llvm-devel libsodium-devel ninja-build && \ - rm /var/log/*.log && rm -r /var/cache/dnf - -RUN set -x; \ - sysArch="$(uname -m)" && \ - case "$sysArch" in \ - x86_64) \ - yum -y --setopt install_weak_deps=False install hyperscan-devel && mkdir /vectorscan ; \ - ;; \ - aarch64) \ - rm -fr /vectorscan-src/ /vectorscan && \ - yum -y --setopt install_weak_deps=False install boost-devel git python3-devel && \ - git clone https://github.com/VectorCamp/vectorscan --depth 1 --branch vectorscan/5.4.9 /vectorscan-src && \ - (cd /vectorscan-src ; mkdir build ; cd build ; cmake .. -DCMAKE_C_COMPILER="$c_compiler" -DCMAKE_CXX_COMPILER="$cxx_compiler" -DCMAKE_INSTALL_PREFIX=/vectorscan -DCMAKE_BUILD_TYPE=Release -DFAT_RUNTIME=ON -DCMAKE_C_FLAGS="-fpic -fPIC" -DCMAKE_CXX_FLAGS="-fPIC -fpic" -DPCRE_SUPPORT_LIBBZ2=OFF; make -j4 ; make install) && \ - rm -fr /vectorscan-src/ ; \ - ;; \ - *) \ - ;; \ - esac - -USER nobody diff --git a/fedora-test/Dockerfile b/fedora-test/Dockerfile deleted file mode 100644 index cc02c06..0000000 --- a/fedora-test/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -# Fedora with runtime dependencies for rspamd -ARG FEDORA_BUILD_IMAGE=rspamd/ci:fedora-build -ARG FEDORA_VERSION=29 - -FROM $FEDORA_BUILD_IMAGE as fedora-build-image -ARG FEDORA_VERSION -FROM fedora:${FEDORA_VERSION} -# Copy vectorscan from build image on arm64 -# /dump should be mounted as a volume to avoid polluting the image -COPY --from=fedora-build-image /vectorscan /dump/vectorscan - -# rspamd runtime dependencies: -# file-libs -# glib2 -# libevent -# libicu -# luajit -# openssl-libs -# pcre -# sqlite-libs -# hyperscan - -# tools; -# dnf-plugins-core - for yum debuginfo-install -# gdb -# llvm - for llvm-symbolizer - -RUN set -x; \ - sysArch="$(uname -m)" && \ - case "$sysArch" in \ - x86_64) \ - yum -y --setopt install_weak_deps=False install hyperscan ; \ - ;; \ - aarch64) \ - yum -y --setopt install_weak_deps=False install libatomic ; \ - cp -R /dump/* / ; \ - ;; \ - *) \ - ;; \ - esac - -RUN set -x; \ - yum -qy --setopt install_weak_deps=False upgrade-minimal && \ - yum -y --setopt install_weak_deps=False install \ - dnf-plugins-core gdb llvm libarchive \ - file-libs glib2 libevent libicu libsodium luajit openssl-libs pcre sqlite-libs && \ - yum -qy --setopt install_weak_deps=False debuginfo-install \ - glibc glib2 libsodium luajit && \ - yum -qy remove dnf-plugins-core && \ - rm /var/log/*.log && rm -r /var/cache/dnf - -USER nobody diff --git a/ubuntu-build/Dockerfile b/ubuntu-build/Dockerfile deleted file mode 100644 index b0625f5..0000000 --- a/ubuntu-build/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -# Ubuntu with build dependencies for rspamd - -ARG UBUNTU_GCC_IMAGE=rspamd/ci:ubuntu-gcc -FROM $UBUNTU_GCC_IMAGE - -ARG build_deps="binutils-dev cmake make pkg-config ragel libarchive-dev libc6-dev libevent-dev libglib2.0-dev libicu-dev libluajit-5.1-dev libmagic-dev libsqlite3-dev libssl-dev libunwind-dev libsodium-dev ninja-build" -ARG c_compiler=gcc -ARG cxx_compiler=g++ - -RUN set -x; \ - apt-get -q update && \ - dpkgArch="$(dpkg --print-architecture)" && \ - case "$dpkgArch" in \ - amd64) \ - apt-get -qy --no-install-recommends install libhyperscan-dev libjemalloc-dev && mkdir /vectorscan ; \ - ;; \ - arm64) \ - rm -fr /vectorscan-src/ /vectorscan && \ - apt-get -qy install python3-dev libboost-dev git cmake ragel && \ - git clone https://github.com/VectorCamp/vectorscan --depth 1 --branch vectorscan/5.4.9 /vectorscan-src && \ - (cd /vectorscan-src ; mkdir build ; cd build ; cmake .. -DCMAKE_C_COMPILER="$c_compiler" -DCMAKE_CXX_COMPILER="$cxx_compiler" -DCMAKE_INSTALL_PREFIX=/vectorscan -DCMAKE_BUILD_TYPE=Release -DFAT_RUNTIME=ON -DCMAKE_C_FLAGS="-fpic -fPIC" -DCMAKE_CXX_FLAGS="-fPIC -fpic" -DPCRE_SUPPORT_LIBBZ2=OFF; make -j4 ; make install) && \ - rm -fr /vectorscan-src/ ; \ - ;; \ - *) \ - ;; \ - esac && \ - apt-get -qy --no-install-recommends install $build_deps && \ - apt-get -q clean && \ - rm -rf /var/cache/debconf /var/lib/apt/lists - -USER nobody diff --git a/ubuntu-gcc/Dockerfile b/ubuntu-gcc/Dockerfile deleted file mode 100644 index c112282..0000000 --- a/ubuntu-gcc/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# Ubuntu with gcc -# Base layer for other iamges -ARG UBUNTU_VERSION=22.04 -FROM ubuntu:${UBUNTU_VERSION} - -ENV DEBIAN_FRONTEND noninteractive - -RUN set -x; \ - apt-get -q update && \ - apt-get -qy upgrade && \ - apt-get -qy --no-install-recommends install gcc g++ make ninja-build && \ - apt-get -q clean && \ - rm -rf /var/cache/debconf /var/lib/apt/lists diff --git a/ubuntu-test-func/Dockerfile b/ubuntu-test-func/Dockerfile deleted file mode 100644 index 9ad1394..0000000 --- a/ubuntu-test-func/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# Ubuntu with all dependencies for running rspamd functional tests - -ARG UBUNTU_TEST_IMAGE=rspamd/ci:ubuntu-test -FROM $UBUNTU_TEST_IMAGE - -ARG test_deps="$coveralls_deps clickhouse-server redis-server opendkim-tools miltertest" -ARG robot_test_deps="python3 python3-pip python3-setuptools python3-demjson python3-psutil python3-requests" - -USER root - -RUN set -x; \ - apt-get -qq update && \ - apt-get -qy --no-install-recommends install wget ca-certificates gpg gpg-agent && \ - apt-get -qy --no-install-recommends install apt-transport-https ca-certificates dirmngr && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754 && \ - echo "deb https://packages.clickhouse.com/deb stable main" | tee /etc/apt/sources.list.d/clickhouse.list && \ - apt-get -q update && \ - apt-get -qy --no-install-recommends install $test_deps $robot_test_deps && \ - pip3 install --no-cache --disable-pip-version-check --no-binary :all: robotframework tornado && \ - luarocks install luacheck && \ - apt-get -qy remove gpg gpg-agent && \ - apt-get -qy autoremove && \ - apt-get -q clean && \ - mkdir -p /var/lib/rspamd && \ - rm -rf /var/cache/debconf /var/lib/apt/lists diff --git a/ubuntu-test/Dockerfile b/ubuntu-test/Dockerfile deleted file mode 100644 index da6d4f9..0000000 --- a/ubuntu-test/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -# Ubuntu with runtime dependencies for rspamd -# and tools/dependencies to run test/rspamd-test - -ARG UBUNTU_BUILD_IMAGE=rspamd/ci:ubuntu-build -ARG UBUNTU_GCC_IMAGE=rspamd/ci:ubuntu-gcc - -FROM $UBUNTU_BUILD_IMAGE as ubuntu-build-image - -# 1. gcc is required for installing luacov-coveralls from luarocks -# 2. gcc provides gcov used by gcov_coveralls.py -ARG UBUNTU_GCC_IMAGE -FROM $UBUNTU_GCC_IMAGE -# Copy vectorscan from build image on arm64 -# /dump should be mounted as a volume to avoid polluting the image -COPY --from=ubuntu-build-image /vectorscan /dump/vectorscan - -ARG c_compiler=gcc -ARG cxx_compiler=g++ -# rspamd runtime dependencies (and also debug symbols to get more useful backtraces) -ARG run_deps="libarchive13 libevent-2.1 libglib2.0-0 libglib2.0-dev libicu70 libluajit-5.1-2 libmagic1 libsqlite3-0 libssl3 libunwind8 libsodium23" -# test dependencies: -# * luarocks used to install luacov and luacov-coveralls -# * python3-requests used by merge_coveralls.py -ARG test_deps="luarocks gdb python3 python3-requests" - -RUN set -x; \ - apt-get -q update && \ - dpkgArch="$(dpkg --print-architecture)" && \ - case "$dpkgArch" in \ - amd64) \ - apt-get -qy --no-install-recommends install libhyperscan5 ; \ - ;; \ - arm64) \ - cp -R /dump/* / ; \ - ;; \ - *) \ - ;; \ - esac && \ - apt-get -qy install ubuntu-dbgsym-keyring && \ - . /etc/os-release && \ - printf "deb http://ddebs.ubuntu.com ${VERSION_CODENAME} main\ndeb http://ddebs.ubuntu.com ${VERSION_CODENAME}-updates main\n" > /etc/apt/sources.list.d/ddebs.list && \ - apt-get -q update && \ - apt-get -qy --no-install-recommends install $run_deps $test_deps && \ - luarocks install luacov && \ - luarocks install luacov-coveralls && \ - apt-get -q clean && \ - rm -rf /var/cache/debconf /var/lib/apt/lists - -USER nobody From 81a8fcda48ceb69b17ff98d149ddb59abaaa506a Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Fri, 15 Mar 2024 16:31:15 +0200 Subject: [PATCH 2/2] Update README --- README.md | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6091de7..11a1126 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,5 @@ -# Docker Images for testing rspamd using Drone.io +# Docker Images for building & testing rspamd using Docker -[![Build status](https://ci.rspamd.com/api/badges/rspamd/rspamd-build-docker/status.svg)](https://ci.rspamd.com/rspamd/rspamd-build-docker) +[![Build status](https://github.com/rspamd/rspamd-build-docker/actions/workflows/ci.yml/badge.svg)](https://github.com/rspamd/rspamd-build-docker/actions/workflows/ci.yml) -This repo contains Dockerfiles for testing [rspamd](https://github.com/rspamd/rspamd) using [Drone](https://drone.io/). - -## Images - -* [![Image size and layers](https://images.microbadger.com/badges/image/rspamd/ci-ubuntu-gcc.svg)](https://microbadger.com/images/rspamd/ci-ubuntu-gcc) [![Commit](https://images.microbadger.com/badges/commit/rspamd/ci-ubuntu-gcc.svg)](https://microbadger.com/images/rspamd/ci-ubuntu-gcc) [rspamd/ci-ubuntu-gcc](https://hub.docker.com/r/rspamd/ci-ubuntu-gcc/) -* [![Image size and layers](https://images.microbadger.com/badges/image/rspamd/ci-ubuntu-build.svg)](https://microbadger.com/images/rspamd/ci-ubuntu-build) [![Commit](https://images.microbadger.com/badges/commit/rspamd/ci-ubuntu-build.svg)](https://microbadger.com/images/rspamd/ci-ubuntu-build) [rspamd/ci-ubuntu-build](https://hub.docker.com/r/rspamd/ci-ubuntu-build/) -* [![Image size and layers](https://images.microbadger.com/badges/image/rspamd/ci-ubuntu-test.svg)](https://microbadger.com/images/rspamd/ci-ubuntu-test) [![Commit](https://images.microbadger.com/badges/commit/rspamd/ci-ubuntu-test.svg)](https://microbadger.com/images/rspamd/ci-ubuntu-test) [rspamd/ci-ubuntu-test](https://hub.docker.com/r/rspamd/ci-ubuntu-test/) -* [![Image size and layers](https://images.microbadger.com/badges/image/rspamd/ci-ubuntu-test-func.svg)](https://microbadger.com/images/rspamd/ci-ubuntu-test-func) [![Commit](https://images.microbadger.com/badges/commit/rspamd/ci-ubuntu-test-func.svg)](https://microbadger.com/images/rspamd/ci-ubuntu-test-func) [rspamd/ci-ubuntu-test-func](https://hub.docker.com/r/rspamd/ci-ubuntu-test-func/) -* [![Image size and layers](https://images.microbadger.com/badges/image/rspamd/ci-perl-tidyall.svg)](https://microbadger.com/images/rspamd/ci-perl-tidyall) [![Commit](https://images.microbadger.com/badges/commit/rspamd/ci-perl-tidyall.svg)](https://microbadger.com/images/rspamd/ci-perl-tidyall) [rspamd/ci-perl-tidyall](https://hub.docker.com/r/rspamd/ci-perl-tidyall/) -* [![Image size and layers](https://images.microbadger.com/badges/image/rspamd/ci-fedora-build.svg)](https://microbadger.com/images/rspamd/ci-fedora-build) [![Commit](https://images.microbadger.com/badges/commit/rspamd/ci-fedora-build.svg)](https://microbadger.com/images/rspamd/ci-fedora-build) [rspamd/ci-fedora-build](https://hub.docker.com/r/rspamd/ci-fedora-build/) -* [![Image size and layers](https://images.microbadger.com/badges/image/rspamd/ci-fedora-test.svg)](https://microbadger.com/images/rspamd/ci-fedora-test) [![Commit](https://images.microbadger.com/badges/commit/rspamd/ci-fedora-test.svg)](https://microbadger.com/images/rspamd/ci-fedora-test) [rspamd/ci-fedora-test](https://hub.docker.com/r/rspamd/ci-fedora-test/) +This repo contains Dockerfiles for testing [rspamd](https://github.com/rspamd/rspamd) using [Github Actions](https://docs.github.com/en/actions) & building packages.