From 199bb3ee7a065d36a8c3080da5e4e42c9c70ce90 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Fri, 18 Feb 2022 09:25:48 +0100 Subject: [PATCH] use new s6-rc layout [skip CI] --- .gitlab-ci.yml | 25 +++++++++++-------- .../s6-overlay/s6-rc.d/rspamd/dependencies | 1 + .../s6-rc.d}/rspamd/run | 2 +- rootfs/etc/s6-overlay/s6-rc.d/rspamd/type | 1 + .../s6-overlay/s6-rc.d/user/contents.d/rspamd | 0 5 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/rspamd/dependencies rename rootfs/etc/{services.d => s6-overlay/s6-rc.d}/rspamd/run (65%) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/rspamd/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/rspamd diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6706e1d..914567c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,18 @@ variables: - IMAGE_NAME: thallian/rspamd + CONTAINER_NAME: thallian/rspamd build: - stage: build - script: - - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY - - docker build -t $IMAGE_NAME:$CI_COMMIT_SHA . - - docker build -t $IMAGE_NAME:$CI_COMMIT_REF_NAME . - - docker build -t $IMAGE_NAME:latest . - - docker push $IMAGE_NAME:$CI_COMMIT_SHA - - docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME - - docker push $IMAGE_NAME:latest + stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json + - >- + /kaniko/executor + --context "$CI_PROJECT_DIR" + --dockerfile "$CI_PROJECT_DIR/Dockerfile" + --destination "$CONTAINER_NAME:$CI_COMMIT_SHA" + --destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME" + --destination "$CONTAINER_NAME:latest" diff --git a/rootfs/etc/s6-overlay/s6-rc.d/rspamd/dependencies b/rootfs/etc/s6-overlay/s6-rc.d/rspamd/dependencies new file mode 100644 index 0000000..7ba7514 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/rspamd/dependencies @@ -0,0 +1 @@ +confd diff --git a/rootfs/etc/services.d/rspamd/run b/rootfs/etc/s6-overlay/s6-rc.d/rspamd/run similarity index 65% rename from rootfs/etc/services.d/rspamd/run rename to rootfs/etc/s6-overlay/s6-rc.d/rspamd/run index afd9157..7ca7f5b 100644 --- a/rootfs/etc/services.d/rspamd/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/rspamd/run @@ -1,3 +1,3 @@ -#!/usr/bin/with-contenv sh +#!/bin/sh exec rspamd --no-fork --user rspamd --group rspamd diff --git a/rootfs/etc/s6-overlay/s6-rc.d/rspamd/type b/rootfs/etc/s6-overlay/s6-rc.d/rspamd/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/rspamd/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/rspamd b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/rspamd new file mode 100644 index 0000000..e69de29