From eaec10c401b0c1a0906ba090870355a272216b74 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 15 Feb 2022 15:35:17 +0100 Subject: [PATCH] use new s6-rc layout --- .editorconfig | 9 -------- .gitlab-ci.yml | 21 ++++++++++++------- .../cont-init.d/02-murmur => bin/admin-pw} | 2 +- .../s6-overlay/s6-rc.d/admin-pw/dependencies | 1 + rootfs/etc/s6-overlay/s6-rc.d/admin-pw/type | 1 + rootfs/etc/s6-overlay/s6-rc.d/admin-pw/up | 1 + .../s6-overlay/s6-rc.d/murmur/dependencies | 2 ++ .../s6-rc.d}/murmur/run | 2 +- rootfs/etc/s6-overlay/s6-rc.d/murmur/type | 1 + .../s6-overlay/s6-rc.d/user/contents.d/murmur | 0 10 files changed, 21 insertions(+), 19 deletions(-) delete mode 100644 .editorconfig rename rootfs/{etc/cont-init.d/02-murmur => bin/admin-pw} (65%) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/admin-pw/dependencies create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/admin-pw/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/admin-pw/up create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/murmur/dependencies rename rootfs/etc/{services.d => s6-overlay/s6-rc.d}/murmur/run (59%) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/murmur/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/murmur diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index d741e40..0000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 4 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index caf1629..04eda13 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,18 @@ variables: - IMAGE_NAME: thallian/murmur + CONTAINER_NAME: thallian/murmur build: stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] 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 + - 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/cont-init.d/02-murmur b/rootfs/bin/admin-pw similarity index 65% rename from rootfs/etc/cont-init.d/02-murmur rename to rootfs/bin/admin-pw index a2e14e7..1b382e2 100644 --- a/rootfs/etc/cont-init.d/02-murmur +++ b/rootfs/bin/admin-pw @@ -1,3 +1,3 @@ -#!/usr/bin/with-contenv sh +#!/bin/sh murmurd -ini /etc/murmur.ini -supw $ADMIN_PASSWORD diff --git a/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/dependencies b/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/dependencies new file mode 100644 index 0000000..7ba7514 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/dependencies @@ -0,0 +1 @@ +confd diff --git a/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/type b/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/type @@ -0,0 +1 @@ +oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/up b/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/up new file mode 100644 index 0000000..2dce5c3 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/admin-pw/up @@ -0,0 +1 @@ +admin-pw diff --git a/rootfs/etc/s6-overlay/s6-rc.d/murmur/dependencies b/rootfs/etc/s6-overlay/s6-rc.d/murmur/dependencies new file mode 100644 index 0000000..055f681 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/murmur/dependencies @@ -0,0 +1,2 @@ +confd +admin-pw diff --git a/rootfs/etc/services.d/murmur/run b/rootfs/etc/s6-overlay/s6-rc.d/murmur/run similarity index 59% rename from rootfs/etc/services.d/murmur/run rename to rootfs/etc/s6-overlay/s6-rc.d/murmur/run index 2150096..8142f0d 100644 --- a/rootfs/etc/services.d/murmur/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/murmur/run @@ -1,3 +1,3 @@ -#!/usr/bin/with-contenv sh +#!/bin/sh exec murmurd -fg -ini /etc/murmur.ini diff --git a/rootfs/etc/s6-overlay/s6-rc.d/murmur/type b/rootfs/etc/s6-overlay/s6-rc.d/murmur/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/murmur/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/murmur b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/murmur new file mode 100644 index 0000000..e69de29