From 7d7b8c09b7cafd4412c187426de6b42a97f7967e Mon Sep 17 00:00:00 2001 From: Roxedus Date: Mon, 27 Jan 2025 11:27:17 +0100 Subject: [PATCH 1/5] Restructure files Use catatonit Remove CI server page --- Dockerfile | 16 +++++--- Dockerfile.aarch64 | 16 +++++--- .../filter_plugins}/admonition.py | 0 generate.yml => ansible/generate.yml | 0 .../roles}/generate-jenkins/defaults/main.yml | 0 .../roles}/generate-jenkins/tasks/main.yml | 2 +- .../roles}/generate-jenkins/templates.yml | 0 .../generate-jenkins/templates/.editorconfig | 0 .../templates/.editorconfig.j2 | 0 .../templates/99-deprecation.j2 | 0 .../templates/CALL_ISSUE_PR_TRACKER.j2 | 0 .../templates/CALL_WORKFLOW_ISSUES_CRON.j2 | 0 .../templates/CONTRIBUTING.j2 | 0 .../templates/DOCUMENTATION.j2 | 0 .../templates/DOCUMENTATION.j2-CUSTOM | 0 .../generate-jenkins/templates/DONATE.j2 | 0 .../templates/EXTERNAL_TRIGGER.j2 | 0 .../templates/EXTERNAL_TRIGGER_SCHEDULER.j2 | 0 .../generate-jenkins/templates/FUNDING.j2 | 0 .../templates/ISSUE_TEMPLATE.bug.j2 | 0 .../templates/ISSUE_TEMPLATE.config.j2 | 0 .../templates/ISSUE_TEMPLATE.feature.j2 | 0 .../generate-jenkins/templates/Jenkinsfile.j2 | 0 .../generate-jenkins/templates/LICENSE.j2 | 0 .../templates/PACKAGE_TRIGGER_SCHEDULER.j2 | 0 .../templates/PULL_REQUEST_TEMPLATE.j2 | 0 .../generate-jenkins/templates/README.j2 | 0 .../templates/README.j2-CUSTOM | 0 .../README_SNIPPETS/APPLICATION_SETUP.j2 | 0 .../README_SNIPPETS/BUILDING_LOCALLY.j2 | 0 .../templates/README_SNIPPETS/DEPRECATION.j2 | 0 .../templates/README_SNIPPETS/DOCKER_CLI.j2 | 0 .../README_SNIPPETS/DOCKER_COMPOSE.j2 | 0 .../templates/README_SNIPPETS/DOCKER_MODS.j2 | 0 .../templates/README_SNIPPETS/DO_NOT_EDIT.j2 | 0 .../README_SNIPPETS/ENV_VAR_FILES.j2 | 0 .../templates/README_SNIPPETS/GROUP_BADGES.j2 | 0 .../templates/README_SNIPPETS/GROUP_INFO.j2 | 0 .../templates/README_SNIPPETS/HWACCEL.j2 | 0 .../templates/README_SNIPPETS/KASM.j2 | 0 .../templates/README_SNIPPETS/KEYBOARD.j2 | 0 .../templates/README_SNIPPETS/MEDIA.j2 | 0 .../templates/README_SNIPPETS/NONROOT.j2 | 0 .../README_SNIPPETS/OPTIONAL_PARAMETERS.j2 | 0 .../README_SNIPPETS/PROJECT_BADGES.j2 | 0 .../templates/README_SNIPPETS/READONLY.j2 | 0 .../templates/README_SNIPPETS/SECCOMP.j2 | 0 .../templates/README_SNIPPETS/STRICT_PROXY.j2 | 0 .../SUPPORTED_ARCHITECTURES.j2 | 0 .../templates/README_SNIPPETS/SUPPORT_INFO.j2 | 0 .../templates/README_SNIPPETS/UMASK.j2 | 0 .../README_SNIPPETS/UPDATING_INFO.j2 | 0 .../templates/README_SNIPPETS/USAGE.j2 | 0 .../README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 | 0 .../templates/README_SNIPPETS/VERSIONS.j2 | 0 .../templates/README_SNIPPETS/VERSION_TAGS.j2 | 0 .../templates/UNRAID_TEMPLATE.j2 | 0 .../templates/common_macros.j2 | 0 .../generate-jenkins/templates/greetings.j2 | 0 .../roles}/generate-jenkins/templates/lite.j2 | 0 .../generate-jenkins/templates/lite.j2-CUSTOM | 0 .../generate-jenkins/templates/permissions.j2 | 0 {vars => ansible/vars}/_container-vars-blank | 0 {vars => ansible/vars}/common | 0 entrypoint.sh | 6 +-- jenkins-vars.yml | 2 +- jenkins/.placeholder | 0 root/etc/services.d/fake/run | 5 --- server.py | 38 ------------------- 69 files changed, 25 insertions(+), 60 deletions(-) rename {filter_plugins => ansible/filter_plugins}/admonition.py (100%) rename generate.yml => ansible/generate.yml (100%) rename {roles => ansible/roles}/generate-jenkins/defaults/main.yml (100%) rename {roles => ansible/roles}/generate-jenkins/tasks/main.yml (99%) rename {roles => ansible/roles}/generate-jenkins/templates.yml (100%) rename {roles => ansible/roles}/generate-jenkins/templates/.editorconfig (100%) rename {roles => ansible/roles}/generate-jenkins/templates/.editorconfig.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/99-deprecation.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/CALL_ISSUE_PR_TRACKER.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/CALL_WORKFLOW_ISSUES_CRON.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/CONTRIBUTING.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/DOCUMENTATION.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM (100%) rename {roles => ansible/roles}/generate-jenkins/templates/DONATE.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/EXTERNAL_TRIGGER_SCHEDULER.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/FUNDING.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/ISSUE_TEMPLATE.config.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/Jenkinsfile.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/LICENSE.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/PACKAGE_TRIGGER_SCHEDULER.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README.j2-CUSTOM (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/APPLICATION_SETUP.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/DOCKER_CLI.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/DOCKER_MODS.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/DO_NOT_EDIT.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/ENV_VAR_FILES.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/GROUP_BADGES.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/GROUP_INFO.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/HWACCEL.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/KASM.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/KEYBOARD.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/MEDIA.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/PROJECT_BADGES.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/READONLY.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/SECCOMP.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/STRICT_PROXY.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/SUPPORT_INFO.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/UMASK.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/USAGE.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/VERSIONS.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/README_SNIPPETS/VERSION_TAGS.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/UNRAID_TEMPLATE.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/common_macros.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/greetings.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/lite.j2 (100%) rename {roles => ansible/roles}/generate-jenkins/templates/lite.j2-CUSTOM (100%) rename {roles => ansible/roles}/generate-jenkins/templates/permissions.j2 (100%) rename {vars => ansible/vars}/_container-vars-blank (100%) rename {vars => ansible/vars}/common (100%) delete mode 100644 jenkins/.placeholder delete mode 100755 root/etc/services.d/fake/run delete mode 100644 server.py diff --git a/Dockerfile b/Dockerfile index 492725c5..d5cb0945 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,27 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-alpine:3.20 +FROM ghcr.io/linuxserver/baseimage-alpine:3.21 # set version label ARG BUILD_DATE ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="homer, thelamer" +LABEL maintainer="roxedus, thelamer" RUN \ echo "**** install build packages ****" && \ - VERSION=v4.34.1 &&\ - wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_amd64 -O /usr/bin/yq &&\ + YQ_VERSION=v4.45.1 &&\ + wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/bin/yq &&\ chmod +x /usr/bin/yq && \ apk add --no-cache --upgrade \ ansible && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}\n" > /build_version && \ apk del \ alpine-release -COPY . /ansible +COPY /ansible /app +COPY entrypoint.sh entrypoint.sh -ENTRYPOINT [ "/ansible/entrypoint.sh" ] +WORKDIR /app + +ENTRYPOINT ["catatonit", "--", "/entrypoint.sh"] diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 5273e15f..c4b01857 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,23 +1,27 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.21 # set version label ARG BUILD_DATE ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="homer, thelamer" +LABEL maintainer="roxedus, thelamer" RUN \ echo "**** install build packages ****" && \ - VERSION=v4.34.1 &&\ - wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_arm64 -O /usr/bin/yq &&\ + YQ_VERSION=v4.45.1 &&\ + wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_arm64 -O /usr/bin/yq &&\ chmod +x /usr/bin/yq && \ apk add --no-cache --upgrade \ ansible && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}\n" > /build_version && \ apk del \ alpine-release -COPY . /ansible +COPY /ansible /app +COPY entrypoint.sh entrypoint.sh -ENTRYPOINT [ "/ansible/entrypoint.sh" ] +WORKDIR /app + +ENTRYPOINT ["catatonit", "--", "/entrypoint.sh"] diff --git a/filter_plugins/admonition.py b/ansible/filter_plugins/admonition.py similarity index 100% rename from filter_plugins/admonition.py rename to ansible/filter_plugins/admonition.py diff --git a/generate.yml b/ansible/generate.yml similarity index 100% rename from generate.yml rename to ansible/generate.yml diff --git a/roles/generate-jenkins/defaults/main.yml b/ansible/roles/generate-jenkins/defaults/main.yml similarity index 100% rename from roles/generate-jenkins/defaults/main.yml rename to ansible/roles/generate-jenkins/defaults/main.yml diff --git a/roles/generate-jenkins/tasks/main.yml b/ansible/roles/generate-jenkins/tasks/main.yml similarity index 99% rename from roles/generate-jenkins/tasks/main.yml rename to ansible/roles/generate-jenkins/tasks/main.yml index 70a7c35b..90088259 100644 --- a/roles/generate-jenkins/tasks/main.yml +++ b/ansible/roles/generate-jenkins/tasks/main.yml @@ -26,7 +26,7 @@ - name: include template loop variables include_vars: - file: "/ansible/roles/generate-jenkins/templates.yml" + file: "/app/roles/generate-jenkins/templates.yml" ############################ # Directory Management # diff --git a/roles/generate-jenkins/templates.yml b/ansible/roles/generate-jenkins/templates.yml similarity index 100% rename from roles/generate-jenkins/templates.yml rename to ansible/roles/generate-jenkins/templates.yml diff --git a/roles/generate-jenkins/templates/.editorconfig b/ansible/roles/generate-jenkins/templates/.editorconfig similarity index 100% rename from roles/generate-jenkins/templates/.editorconfig rename to ansible/roles/generate-jenkins/templates/.editorconfig diff --git a/roles/generate-jenkins/templates/.editorconfig.j2 b/ansible/roles/generate-jenkins/templates/.editorconfig.j2 similarity index 100% rename from roles/generate-jenkins/templates/.editorconfig.j2 rename to ansible/roles/generate-jenkins/templates/.editorconfig.j2 diff --git a/roles/generate-jenkins/templates/99-deprecation.j2 b/ansible/roles/generate-jenkins/templates/99-deprecation.j2 similarity index 100% rename from roles/generate-jenkins/templates/99-deprecation.j2 rename to ansible/roles/generate-jenkins/templates/99-deprecation.j2 diff --git a/roles/generate-jenkins/templates/CALL_ISSUE_PR_TRACKER.j2 b/ansible/roles/generate-jenkins/templates/CALL_ISSUE_PR_TRACKER.j2 similarity index 100% rename from roles/generate-jenkins/templates/CALL_ISSUE_PR_TRACKER.j2 rename to ansible/roles/generate-jenkins/templates/CALL_ISSUE_PR_TRACKER.j2 diff --git a/roles/generate-jenkins/templates/CALL_WORKFLOW_ISSUES_CRON.j2 b/ansible/roles/generate-jenkins/templates/CALL_WORKFLOW_ISSUES_CRON.j2 similarity index 100% rename from roles/generate-jenkins/templates/CALL_WORKFLOW_ISSUES_CRON.j2 rename to ansible/roles/generate-jenkins/templates/CALL_WORKFLOW_ISSUES_CRON.j2 diff --git a/roles/generate-jenkins/templates/CONTRIBUTING.j2 b/ansible/roles/generate-jenkins/templates/CONTRIBUTING.j2 similarity index 100% rename from roles/generate-jenkins/templates/CONTRIBUTING.j2 rename to ansible/roles/generate-jenkins/templates/CONTRIBUTING.j2 diff --git a/roles/generate-jenkins/templates/DOCUMENTATION.j2 b/ansible/roles/generate-jenkins/templates/DOCUMENTATION.j2 similarity index 100% rename from roles/generate-jenkins/templates/DOCUMENTATION.j2 rename to ansible/roles/generate-jenkins/templates/DOCUMENTATION.j2 diff --git a/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM b/ansible/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM similarity index 100% rename from roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM rename to ansible/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM diff --git a/roles/generate-jenkins/templates/DONATE.j2 b/ansible/roles/generate-jenkins/templates/DONATE.j2 similarity index 100% rename from roles/generate-jenkins/templates/DONATE.j2 rename to ansible/roles/generate-jenkins/templates/DONATE.j2 diff --git a/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 b/ansible/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 similarity index 100% rename from roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 rename to ansible/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 diff --git a/roles/generate-jenkins/templates/EXTERNAL_TRIGGER_SCHEDULER.j2 b/ansible/roles/generate-jenkins/templates/EXTERNAL_TRIGGER_SCHEDULER.j2 similarity index 100% rename from roles/generate-jenkins/templates/EXTERNAL_TRIGGER_SCHEDULER.j2 rename to ansible/roles/generate-jenkins/templates/EXTERNAL_TRIGGER_SCHEDULER.j2 diff --git a/roles/generate-jenkins/templates/FUNDING.j2 b/ansible/roles/generate-jenkins/templates/FUNDING.j2 similarity index 100% rename from roles/generate-jenkins/templates/FUNDING.j2 rename to ansible/roles/generate-jenkins/templates/FUNDING.j2 diff --git a/roles/generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 b/ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 similarity index 100% rename from roles/generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 rename to ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 diff --git a/roles/generate-jenkins/templates/ISSUE_TEMPLATE.config.j2 b/ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.config.j2 similarity index 100% rename from roles/generate-jenkins/templates/ISSUE_TEMPLATE.config.j2 rename to ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.config.j2 diff --git a/roles/generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 b/ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 similarity index 100% rename from roles/generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 rename to ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 diff --git a/roles/generate-jenkins/templates/Jenkinsfile.j2 b/ansible/roles/generate-jenkins/templates/Jenkinsfile.j2 similarity index 100% rename from roles/generate-jenkins/templates/Jenkinsfile.j2 rename to ansible/roles/generate-jenkins/templates/Jenkinsfile.j2 diff --git a/roles/generate-jenkins/templates/LICENSE.j2 b/ansible/roles/generate-jenkins/templates/LICENSE.j2 similarity index 100% rename from roles/generate-jenkins/templates/LICENSE.j2 rename to ansible/roles/generate-jenkins/templates/LICENSE.j2 diff --git a/roles/generate-jenkins/templates/PACKAGE_TRIGGER_SCHEDULER.j2 b/ansible/roles/generate-jenkins/templates/PACKAGE_TRIGGER_SCHEDULER.j2 similarity index 100% rename from roles/generate-jenkins/templates/PACKAGE_TRIGGER_SCHEDULER.j2 rename to ansible/roles/generate-jenkins/templates/PACKAGE_TRIGGER_SCHEDULER.j2 diff --git a/roles/generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 b/ansible/roles/generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 similarity index 100% rename from roles/generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 rename to ansible/roles/generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 diff --git a/roles/generate-jenkins/templates/README.j2 b/ansible/roles/generate-jenkins/templates/README.j2 similarity index 100% rename from roles/generate-jenkins/templates/README.j2 rename to ansible/roles/generate-jenkins/templates/README.j2 diff --git a/roles/generate-jenkins/templates/README.j2-CUSTOM b/ansible/roles/generate-jenkins/templates/README.j2-CUSTOM similarity index 100% rename from roles/generate-jenkins/templates/README.j2-CUSTOM rename to ansible/roles/generate-jenkins/templates/README.j2-CUSTOM diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/APPLICATION_SETUP.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/APPLICATION_SETUP.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/APPLICATION_SETUP.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/APPLICATION_SETUP.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_CLI.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_CLI.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_CLI.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_CLI.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_MODS.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_MODS.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_MODS.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_MODS.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/DO_NOT_EDIT.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DO_NOT_EDIT.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/DO_NOT_EDIT.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/DO_NOT_EDIT.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/ENV_VAR_FILES.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/ENV_VAR_FILES.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/ENV_VAR_FILES.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/ENV_VAR_FILES.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_BADGES.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_BADGES.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/GROUP_BADGES.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_BADGES.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_INFO.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_INFO.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/GROUP_INFO.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_INFO.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/HWACCEL.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/HWACCEL.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/HWACCEL.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/HWACCEL.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/KASM.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/KASM.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/KASM.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/KASM.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/KEYBOARD.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/KEYBOARD.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/KEYBOARD.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/KEYBOARD.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/MEDIA.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/MEDIA.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/MEDIA.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/MEDIA.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/PROJECT_BADGES.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/PROJECT_BADGES.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/PROJECT_BADGES.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/PROJECT_BADGES.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/READONLY.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/READONLY.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/READONLY.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/READONLY.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/SECCOMP.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/SECCOMP.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/SECCOMP.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/SECCOMP.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/STRICT_PROXY.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/STRICT_PROXY.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/STRICT_PROXY.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/STRICT_PROXY.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORT_INFO.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORT_INFO.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/SUPPORT_INFO.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORT_INFO.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/UMASK.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/UMASK.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/UMASK.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/UMASK.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/USAGE.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/USAGE.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/USAGE.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/USAGE.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/VERSIONS.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/VERSIONS.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/VERSIONS.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/VERSIONS.j2 diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/VERSION_TAGS.j2 b/ansible/roles/generate-jenkins/templates/README_SNIPPETS/VERSION_TAGS.j2 similarity index 100% rename from roles/generate-jenkins/templates/README_SNIPPETS/VERSION_TAGS.j2 rename to ansible/roles/generate-jenkins/templates/README_SNIPPETS/VERSION_TAGS.j2 diff --git a/roles/generate-jenkins/templates/UNRAID_TEMPLATE.j2 b/ansible/roles/generate-jenkins/templates/UNRAID_TEMPLATE.j2 similarity index 100% rename from roles/generate-jenkins/templates/UNRAID_TEMPLATE.j2 rename to ansible/roles/generate-jenkins/templates/UNRAID_TEMPLATE.j2 diff --git a/roles/generate-jenkins/templates/common_macros.j2 b/ansible/roles/generate-jenkins/templates/common_macros.j2 similarity index 100% rename from roles/generate-jenkins/templates/common_macros.j2 rename to ansible/roles/generate-jenkins/templates/common_macros.j2 diff --git a/roles/generate-jenkins/templates/greetings.j2 b/ansible/roles/generate-jenkins/templates/greetings.j2 similarity index 100% rename from roles/generate-jenkins/templates/greetings.j2 rename to ansible/roles/generate-jenkins/templates/greetings.j2 diff --git a/roles/generate-jenkins/templates/lite.j2 b/ansible/roles/generate-jenkins/templates/lite.j2 similarity index 100% rename from roles/generate-jenkins/templates/lite.j2 rename to ansible/roles/generate-jenkins/templates/lite.j2 diff --git a/roles/generate-jenkins/templates/lite.j2-CUSTOM b/ansible/roles/generate-jenkins/templates/lite.j2-CUSTOM similarity index 100% rename from roles/generate-jenkins/templates/lite.j2-CUSTOM rename to ansible/roles/generate-jenkins/templates/lite.j2-CUSTOM diff --git a/roles/generate-jenkins/templates/permissions.j2 b/ansible/roles/generate-jenkins/templates/permissions.j2 similarity index 100% rename from roles/generate-jenkins/templates/permissions.j2 rename to ansible/roles/generate-jenkins/templates/permissions.j2 diff --git a/vars/_container-vars-blank b/ansible/vars/_container-vars-blank similarity index 100% rename from vars/_container-vars-blank rename to ansible/vars/_container-vars-blank diff --git a/vars/common b/ansible/vars/common similarity index 100% rename from vars/common rename to ansible/vars/common diff --git a/entrypoint.sh b/entrypoint.sh index 2ce96685..41204c3a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,9 +1,9 @@ #! /bin/bash +cat /build_version + if [[ -z "${CI_RUN}" ]]; then - cd /ansible - ansible-playbook generate.yml ${EXTRA_PLAYBOOK_PARAM} + ansible-playbook generate.yml "$@" else echo '[ls.io-init] done.' - python3 /ansible/server.py fi diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 0d499901..821d5baa 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -16,7 +16,7 @@ repo_vars: - DIST_IMAGE='alpine' - MULTIARCH='true' - CI='true' - - CI_WEB='true' + - CI_WEB='false' - CI_PORT='8000' - CI_SSL='false' - CI_DELAY='60' diff --git a/jenkins/.placeholder b/jenkins/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/root/etc/services.d/fake/run b/root/etc/services.d/fake/run deleted file mode 100755 index a525dc7f..00000000 --- a/root/etc/services.d/fake/run +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/python - -I only exist to loop test our shell checking system. - -echo $TEST > /test/testfile.txt diff --git a/server.py b/server.py deleted file mode 100644 index dcdb5702..00000000 --- a/server.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python - -from http.server import BaseHTTPRequestHandler,HTTPServer - -class Hello(BaseHTTPRequestHandler): - def do_GET(serv): - serv.send_response(200) - serv.send_header('Content-type', 'text/html; charset=utf-8') - serv.end_headers() - serv.wfile.write(bytes(''' - - - - - - -
- LINUXSERVER CI PAGE -
- - - ''', "utf8")) - -server = ('0.0.0.0', 8000) -httpd = HTTPServer(server, Hello) -httpd.serve_forever() From f0f96ab391b9d4a09556b15b1eabec8f2522b2ef Mon Sep 17 00:00:00 2001 From: Roxedus Date: Mon, 27 Jan 2025 16:29:20 +0000 Subject: [PATCH 2/5] Move away from template loop --- ansible/README.md | 19 ++ ansible/ansible.cfg | 2 + .../templates => }/common_macros.j2 | 0 ansible/generate.yml | 78 ++++- ansible/inventory.ini | 2 + ansible/roles/deprecate/tasks/main.yml | 41 +++ .../templates/deprecation.j2} | 0 ansible/roles/documentation/tasks/main.yml | 69 +++++ .../README_SNIPPETS/APPLICATION_SETUP.j2 | 0 .../README_SNIPPETS/BUILDING_LOCALLY.j2 | 0 .../templates/README_SNIPPETS/DEPRECATION.j2 | 0 .../templates/README_SNIPPETS/DOCKER_CLI.j2 | 0 .../README_SNIPPETS/DOCKER_COMPOSE.j2 | 0 .../templates/README_SNIPPETS/DOCKER_MODS.j2 | 0 .../templates/README_SNIPPETS/DO_NOT_EDIT.j2 | 0 .../README_SNIPPETS/ENV_VAR_FILES.j2 | 0 .../templates/README_SNIPPETS/GROUP_BADGES.j2 | 0 .../templates/README_SNIPPETS/GROUP_INFO.j2 | 0 .../templates/README_SNIPPETS/HWACCEL.j2 | 0 .../templates/README_SNIPPETS/KASM.j2 | 0 .../templates/README_SNIPPETS/KEYBOARD.j2 | 0 .../templates/README_SNIPPETS/MEDIA.j2 | 0 .../templates/README_SNIPPETS/NONROOT.j2 | 0 .../README_SNIPPETS/OPTIONAL_PARAMETERS.j2 | 0 .../README_SNIPPETS/PROJECT_BADGES.j2 | 0 .../templates/README_SNIPPETS/READONLY.j2 | 0 .../templates/README_SNIPPETS/SECCOMP.j2 | 0 .../templates/README_SNIPPETS/STRICT_PROXY.j2 | 0 .../SUPPORTED_ARCHITECTURES.j2 | 0 .../templates/README_SNIPPETS/SUPPORT_INFO.j2 | 0 .../templates/README_SNIPPETS/UMASK.j2 | 0 .../README_SNIPPETS/UPDATING_INFO.j2 | 0 .../templates/README_SNIPPETS/USAGE.j2 | 0 .../README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 | 0 .../templates/README_SNIPPETS/VERSIONS.j2 | 0 .../templates/README_SNIPPETS/VERSION_TAGS.j2 | 0 .../templates/documentation-custom.md.j2} | 0 .../templates/documentation.md.j2} | 0 .../templates/lite-custom.md.j2} | 0 .../templates/lite.md.j2} | 0 .../templates/readme-custom.md.j2} | 0 .../templates/readme.md.j2} | 0 .../templates/unraid.xml.j2} | 0 ansible/roles/generate-jenkins/tasks/main.yml | 288 ------------------ ansible/roles/generate-jenkins/templates.yml | 24 -- .../generate-jenkins/templates/.editorconfig | 16 - ansible/roles/github/tasks/main.yml | 69 +++++ .../templates/CONTRIBUTING.md.j2} | 0 .../templates/FUNDING.yml.j2} | 0 .../templates/PULL_REQUEST_TEMPLATE.md.j2} | 2 +- .../templates/call_issue_pr_tracker.yml.j2} | 0 .../templates/call_issues_cron.yml.j2} | 0 .../templates/config.yml.j2} | 0 .../templates/external_trigger.yml.j2} | 0 .../external_trigger_scheduler.yml.j2} | 0 .../templates/greetings.yml.j2} | 0 .../templates/issue.bug.yml.j2} | 2 +- .../templates/issue.feature.yml.j2} | 2 +- .../package_trigger_scheduler.yml.j2} | 0 .../templates/permissions.yml.j2} | 0 ansible/roles/repository/tasks/main.yml | 34 +++ .../templates/.editorconfig.j2 | 0 .../templates/Jenkinsfile.j2 | 0 .../templates/LICENSE.j2 | 0 .../templates/donate.txt.j2} | 0 ansible/vars/{common => common.yml} | 0 .../defaults/main.yml => vars/default.yml} | 7 +- 67 files changed, 316 insertions(+), 339 deletions(-) create mode 100644 ansible/README.md create mode 100644 ansible/ansible.cfg rename ansible/{roles/generate-jenkins/templates => }/common_macros.j2 (100%) create mode 100644 ansible/inventory.ini create mode 100644 ansible/roles/deprecate/tasks/main.yml rename ansible/roles/{generate-jenkins/templates/99-deprecation.j2 => deprecate/templates/deprecation.j2} (100%) create mode 100644 ansible/roles/documentation/tasks/main.yml rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/APPLICATION_SETUP.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/DEPRECATION.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/DOCKER_CLI.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/DOCKER_MODS.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/DO_NOT_EDIT.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/ENV_VAR_FILES.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/GROUP_BADGES.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/GROUP_INFO.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/HWACCEL.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/KASM.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/KEYBOARD.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/MEDIA.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/NONROOT.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/PROJECT_BADGES.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/READONLY.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/SECCOMP.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/STRICT_PROXY.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/SUPPORT_INFO.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/UMASK.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/UPDATING_INFO.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/USAGE.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/VERSIONS.j2 (100%) rename ansible/roles/{generate-jenkins => documentation}/templates/README_SNIPPETS/VERSION_TAGS.j2 (100%) rename ansible/roles/{generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM => documentation/templates/documentation-custom.md.j2} (100%) rename ansible/roles/{generate-jenkins/templates/DOCUMENTATION.j2 => documentation/templates/documentation.md.j2} (100%) rename ansible/roles/{generate-jenkins/templates/lite.j2-CUSTOM => documentation/templates/lite-custom.md.j2} (100%) rename ansible/roles/{generate-jenkins/templates/lite.j2 => documentation/templates/lite.md.j2} (100%) rename ansible/roles/{generate-jenkins/templates/README.j2-CUSTOM => documentation/templates/readme-custom.md.j2} (100%) rename ansible/roles/{generate-jenkins/templates/README.j2 => documentation/templates/readme.md.j2} (100%) rename ansible/roles/{generate-jenkins/templates/UNRAID_TEMPLATE.j2 => documentation/templates/unraid.xml.j2} (100%) delete mode 100644 ansible/roles/generate-jenkins/tasks/main.yml delete mode 100644 ansible/roles/generate-jenkins/templates.yml delete mode 100644 ansible/roles/generate-jenkins/templates/.editorconfig create mode 100644 ansible/roles/github/tasks/main.yml rename ansible/roles/{generate-jenkins/templates/CONTRIBUTING.j2 => github/templates/CONTRIBUTING.md.j2} (100%) rename ansible/roles/{generate-jenkins/templates/FUNDING.j2 => github/templates/FUNDING.yml.j2} (100%) rename ansible/roles/{generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 => github/templates/PULL_REQUEST_TEMPLATE.md.j2} (97%) rename ansible/roles/{generate-jenkins/templates/CALL_ISSUE_PR_TRACKER.j2 => github/templates/call_issue_pr_tracker.yml.j2} (100%) rename ansible/roles/{generate-jenkins/templates/CALL_WORKFLOW_ISSUES_CRON.j2 => github/templates/call_issues_cron.yml.j2} (100%) rename ansible/roles/{generate-jenkins/templates/ISSUE_TEMPLATE.config.j2 => github/templates/config.yml.j2} (100%) rename ansible/roles/{generate-jenkins/templates/EXTERNAL_TRIGGER.j2 => github/templates/external_trigger.yml.j2} (100%) rename ansible/roles/{generate-jenkins/templates/EXTERNAL_TRIGGER_SCHEDULER.j2 => github/templates/external_trigger_scheduler.yml.j2} (100%) rename ansible/roles/{generate-jenkins/templates/greetings.j2 => github/templates/greetings.yml.j2} (100%) rename ansible/roles/{generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 => github/templates/issue.bug.yml.j2} (97%) rename ansible/roles/{generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 => github/templates/issue.feature.yml.j2} (95%) rename ansible/roles/{generate-jenkins/templates/PACKAGE_TRIGGER_SCHEDULER.j2 => github/templates/package_trigger_scheduler.yml.j2} (100%) rename ansible/roles/{generate-jenkins/templates/permissions.j2 => github/templates/permissions.yml.j2} (100%) create mode 100644 ansible/roles/repository/tasks/main.yml rename ansible/roles/{generate-jenkins => repository}/templates/.editorconfig.j2 (100%) rename ansible/roles/{generate-jenkins => repository}/templates/Jenkinsfile.j2 (100%) rename ansible/roles/{generate-jenkins => repository}/templates/LICENSE.j2 (100%) rename ansible/roles/{generate-jenkins/templates/DONATE.j2 => repository/templates/donate.txt.j2} (100%) rename ansible/vars/{common => common.yml} (100%) rename ansible/{roles/generate-jenkins/defaults/main.yml => vars/default.yml} (94%) diff --git a/ansible/README.md b/ansible/README.md new file mode 100644 index 00000000..434a833a --- /dev/null +++ b/ansible/README.md @@ -0,0 +1,19 @@ +# Ansible + +## filter_plugins/ + +Houses custom jinja filters. + +- admonition.py + - Creates admonitions in different syntax' based on the markdown output format + +## Roles + + +## ansible.cfg + +This overwrites/sets some Ansible configuration, mainly the inventory in this case. + +## inventory.ini + +This file sets up the localhost host, the same way Ansible would without the file, without logging "implicit localhost" in the output. diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 00000000..1da4684b --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1,2 @@ +[defaults] +inventory = inventory.ini diff --git a/ansible/roles/generate-jenkins/templates/common_macros.j2 b/ansible/common_macros.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/common_macros.j2 rename to ansible/common_macros.j2 diff --git a/ansible/generate.yml b/ansible/generate.yml index f20cca7a..4a06e39c 100644 --- a/ansible/generate.yml +++ b/ansible/generate.yml @@ -1,13 +1,85 @@ --- - hosts: localhost vars_files: - - vars/common + - vars/common.yml + - vars/default.yml pre_tasks: - name: Set container_name + tags: [ "always" ] + changed_when: false set_fact: container_name: "{{ lookup('env', 'CONTAINER_NAME' ) | default(omit) }}" + - name: Set github_branch + tags: [ "always" ] + changed_when: false set_fact: github_branch: "{{ lookup('env', 'GITHUB_BRANCH' ) | default(omit) }}" - roles: - - { role: roles/generate-jenkins } + + - name: Set UID + tags: [ "always" ] + changed_when: false + when: lookup('env', 'PUID') + user: + name: abc + non_unique: yes + uid: "{{ lookup('env', 'PUID') | int }}" + + - name: Set GID + tags: [ "always" ] + changed_when: false + when: lookup('env', 'PGID') + group: + name: abc + non_unique: yes + gid: "{{ lookup('env', 'PGID') | int }}" + + - name: Set noter + tags: [ "always" ] + changed_when: false + set_fact: + noter: "{{ lookup('template', 'common_macros.j2') | trim}}" + + - name: Include var files for this project + tags: [ "always" ] + include_vars: + file: "/tmp/{{ item }}" + loop: + - 'jenkins-vars.yml' + - 'readme-vars.yml' + + tasks: + + - name: Add deprecation in S6 + ansible.builtin.include_role: + name: deprecate + when: + project_deprecation_status == true + + - name: Setup .github meta directory + tags: + - github + ansible.builtin.include_role: + name: github + apply: + tags: + - github + + - name: Generate documentation + tags: + - documentation + - external + - mkdocs + - readme + - unraid + ansible.builtin.include_role: + name: documentation + + - name: Generate Repository + tags: + - repository + ansible.builtin.include_role: + name: repository + apply: + tags: + - repository diff --git a/ansible/inventory.ini b/ansible/inventory.ini new file mode 100644 index 00000000..e03c771c --- /dev/null +++ b/ansible/inventory.ini @@ -0,0 +1,2 @@ +[local] +localhost ansible_connection=local ansible_python_interpreter={{ansible_playbook_python}} diff --git a/ansible/roles/deprecate/tasks/main.yml b/ansible/roles/deprecate/tasks/main.yml new file mode 100644 index 00000000..d064f8b4 --- /dev/null +++ b/ansible/roles/deprecate/tasks/main.yml @@ -0,0 +1,41 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks + +- name: Create deprecation directories + file: + path: "/tmp/{{ item }}" + state: directory + owner: "abc" + group: "abc" + mode: "0755" + loop: + - root/etc/s6-overlay/s6-rc.d/init-deprecate/dependencies.d + - root/etc/s6-overlay/s6-rc.d/init-services/dependencies.d + +- name: Create deprecation files + file: + path: "/tmp/{{ item }}" + state: touch + owner: "abc" + group: "abc" + loop: + - root/etc/s6-overlay/s6-rc.d/init-deprecate/dependencies.d/init-config-end + - root/etc/s6-overlay/s6-rc.d/init-deprecate/up + - root/etc/s6-overlay/s6-rc.d/init-services/dependencies.d/init-deprecate + - root/etc/s6-overlay/s6-rc.d/user/contents.d/init-deprecate + +- name: Populate file for init-deprecate/type + copy: + dest: /tmp/root/etc/s6-overlay/s6-rc.d/init-deprecate/type + content: | + oneshot + owner: "abc" + group: "abc" + +- name: Populate file for init-deprecate/up + template: + src: deprecation.j2 + dest: /tmp/root/etc/s6-overlay/s6-rc.d/init-deprecate/run + owner: "abc" + group: "abc" + mode: "0755" diff --git a/ansible/roles/generate-jenkins/templates/99-deprecation.j2 b/ansible/roles/deprecate/templates/deprecation.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/99-deprecation.j2 rename to ansible/roles/deprecate/templates/deprecation.j2 diff --git a/ansible/roles/documentation/tasks/main.yml b/ansible/roles/documentation/tasks/main.yml new file mode 100644 index 00000000..59c660e6 --- /dev/null +++ b/ansible/roles/documentation/tasks/main.yml @@ -0,0 +1,69 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks + +- name: Create Jenkins external directories + tags: + - documentation + - external + - mkdocs + - readme + - unraid + file: + path: "/tmp/.jenkins-external" + state: directory + owner: "abc" + group: "abc" + mode: "0755" + +- name: Template Unraid template + tags: + - external + - unraid + when: + - unraid_template + - item.unraid_template is defined + - full_custom_readme is not defined + - '"baseimage" not in project_name' + - '"jenkins-builder" not in project_name' + template: + src: unraid.xml.j2 + dest: "/tmp/.jenkins-external/{{ project_name | lower }}.xml" + owner: "abc" + group: "abc" + mode: "0644" + +- name: Template MkDocs page + tags: + - documentation + - external + - mkdocs + template: + src: documentation{{'-custom' if full_custom_readme is defined }}.md.j2 + dest: "/tmp/.jenkins-external/{{ project_repo_name }}.md" + owner: "abc" + group: "abc" + mode: "0644" + +- name: Template lite README + tags: + - documentation + - external + - readme + template: + src: lite{{'-custom' if full_custom_readme is defined }}.md.j2 + dest: "/tmp/.jenkins-external/README.lite" + owner: "abc" + group: "abc" + mode: "0644" + +- name: Template README + tags: + - documentation + - external + - readme + template: + src: readme{{'-custom' if full_custom_readme is defined }}.md.j2 + dest: "/tmp/README.md" + owner: "abc" + group: "abc" + mode: "0644" diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/APPLICATION_SETUP.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/APPLICATION_SETUP.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/APPLICATION_SETUP.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/APPLICATION_SETUP.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/BUILDING_LOCALLY.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/DEPRECATION.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/DEPRECATION.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_CLI.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/DOCKER_CLI.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_CLI.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/DOCKER_CLI.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/DOCKER_COMPOSE.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_MODS.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/DOCKER_MODS.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/DOCKER_MODS.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/DOCKER_MODS.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/DO_NOT_EDIT.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/DO_NOT_EDIT.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/DO_NOT_EDIT.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/DO_NOT_EDIT.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/ENV_VAR_FILES.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/ENV_VAR_FILES.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/ENV_VAR_FILES.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/ENV_VAR_FILES.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_BADGES.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/GROUP_BADGES.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_BADGES.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/GROUP_BADGES.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_INFO.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/GROUP_INFO.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/GROUP_INFO.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/GROUP_INFO.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/HWACCEL.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/HWACCEL.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/HWACCEL.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/HWACCEL.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/KASM.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/KASM.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/KASM.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/KASM.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/KEYBOARD.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/KEYBOARD.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/KEYBOARD.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/KEYBOARD.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/MEDIA.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/MEDIA.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/NONROOT.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/NONROOT.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/OPTIONAL_PARAMETERS.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/PROJECT_BADGES.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/PROJECT_BADGES.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/PROJECT_BADGES.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/PROJECT_BADGES.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/READONLY.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/READONLY.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/READONLY.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/READONLY.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/SECCOMP.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/SECCOMP.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/SECCOMP.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/SECCOMP.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/STRICT_PROXY.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/STRICT_PROXY.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/STRICT_PROXY.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/STRICT_PROXY.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/SUPPORTED_ARCHITECTURES.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORT_INFO.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/SUPPORT_INFO.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/SUPPORT_INFO.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/SUPPORT_INFO.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/UMASK.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/UMASK.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/UMASK.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/UMASK.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/UPDATING_INFO.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/UPDATING_INFO.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/USAGE.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/USAGE.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/USAGE.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/USAGE.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/USER_GROUP_IDENTIFIERS.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/VERSIONS.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/VERSIONS.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/VERSIONS.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/VERSIONS.j2 diff --git a/ansible/roles/generate-jenkins/templates/README_SNIPPETS/VERSION_TAGS.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/VERSION_TAGS.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README_SNIPPETS/VERSION_TAGS.j2 rename to ansible/roles/documentation/templates/README_SNIPPETS/VERSION_TAGS.j2 diff --git a/ansible/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM b/ansible/roles/documentation/templates/documentation-custom.md.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM rename to ansible/roles/documentation/templates/documentation-custom.md.j2 diff --git a/ansible/roles/generate-jenkins/templates/DOCUMENTATION.j2 b/ansible/roles/documentation/templates/documentation.md.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/DOCUMENTATION.j2 rename to ansible/roles/documentation/templates/documentation.md.j2 diff --git a/ansible/roles/generate-jenkins/templates/lite.j2-CUSTOM b/ansible/roles/documentation/templates/lite-custom.md.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/lite.j2-CUSTOM rename to ansible/roles/documentation/templates/lite-custom.md.j2 diff --git a/ansible/roles/generate-jenkins/templates/lite.j2 b/ansible/roles/documentation/templates/lite.md.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/lite.j2 rename to ansible/roles/documentation/templates/lite.md.j2 diff --git a/ansible/roles/generate-jenkins/templates/README.j2-CUSTOM b/ansible/roles/documentation/templates/readme-custom.md.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README.j2-CUSTOM rename to ansible/roles/documentation/templates/readme-custom.md.j2 diff --git a/ansible/roles/generate-jenkins/templates/README.j2 b/ansible/roles/documentation/templates/readme.md.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/README.j2 rename to ansible/roles/documentation/templates/readme.md.j2 diff --git a/ansible/roles/generate-jenkins/templates/UNRAID_TEMPLATE.j2 b/ansible/roles/documentation/templates/unraid.xml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/UNRAID_TEMPLATE.j2 rename to ansible/roles/documentation/templates/unraid.xml.j2 diff --git a/ansible/roles/generate-jenkins/tasks/main.yml b/ansible/roles/generate-jenkins/tasks/main.yml deleted file mode 100644 index 90088259..00000000 --- a/ansible/roles/generate-jenkins/tasks/main.yml +++ /dev/null @@ -1,288 +0,0 @@ ---- -####################### -# Set UID and GID # -####################### - -- name: set UID - when: lookup('env', 'PUID') - user: - name: abc - non_unique: yes - uid: "{{ lookup('env', 'PUID') | int }}" -- name: set GID - when: lookup('env', 'PGID') - group: - name: abc - non_unique: yes - gid: "{{ lookup('env', 'PGID') | int }}" - -###################################### -# Grab the Variables from github # -###################################### -- name: include var files for this project - include_vars: - file: "/tmp/{{ item }}" - loop: "{{ templated_vars }}" - -- name: include template loop variables - include_vars: - file: "/app/roles/generate-jenkins/templates.yml" - -############################ -# Directory Management # -############################ -- name: create destination dir for generated github files - file: - path: "/tmp/.github" - state: directory - owner: "abc" - group: "abc" - -- name: set basefolder - set_fact: - project_base: "/tmp" - -- name: set vars basefolder - set_fact: - dl_vars_project_base: /tmp - -- name: create destination dir for generated github workflow files - file: - path: "/tmp/.github/workflows" - state: directory - owner: "abc" - group: "abc" - -- name: create destination dir for generated github ISSUE_TEMPLATE files - file: - path: "/tmp/.github/ISSUE_TEMPLATE" - state: directory - owner: "abc" - group: "abc" - -- name: create destination dir for generated donate.txt - when: - - sponsor_links is defined - file: - path: "/tmp/root" - state: directory - owner: "abc" - group: "abc" - -- name: create destination dir for generated 99-deprecation - when: - - project_deprecation_status == true - file: - path: "/tmp/root/etc/cont-init.d" - state: directory - owner: "abc" - group: "abc" - -- name: deprecate - create dir for init-services/dependencies.d - when: - - project_deprecation_status == true - file: - path: "/tmp/root/etc/s6-overlay/s6-rc.d/init-services/dependencies.d" - state: directory - owner: "abc" - group: "abc" - -- name: deprecate - create file for init-services/dependencies.d/init-deprecate - when: - - project_deprecation_status == true - file: - path: "/tmp/root/etc/s6-overlay/s6-rc.d/init-services/dependencies.d/init-deprecate" - state: touch - owner: "abc" - group: "abc" - -- name: deprecate - create dir for init-deprecate/dependencies.d - when: - - project_deprecation_status == true - file: - path: "/tmp/root/etc/s6-overlay/s6-rc.d/init-deprecate/dependencies.d" - state: directory - owner: "abc" - group: "abc" - -- name: deprecate - create file for init-deprecate/dependencies.d/init-config-end - when: - - project_deprecation_status == true - file: - path: "/tmp/root/etc/s6-overlay/s6-rc.d/init-deprecate/dependencies.d/init-config-end" - state: touch - owner: "abc" - group: "abc" - -- name: deprecate - create file for init-deprecate/type - when: - - project_deprecation_status == true - file: - path: "/tmp/root/etc/s6-overlay/s6-rc.d/init-deprecate/type" - state: touch - owner: "abc" - group: "abc" - -- name: deprecate - populate file for init-deprecate/type - when: - - project_deprecation_status == true - copy: - dest: "/tmp/root/etc/s6-overlay/s6-rc.d/init-deprecate/type" - content: | - oneshot - -- name: deprecate - create file for init-deprecate/up - when: - - project_deprecation_status == true - file: - path: "/tmp/root/etc/s6-overlay/s6-rc.d/init-deprecate/up" - state: touch - owner: "abc" - group: "abc" - -- name: deprecate - populate file for init-deprecate/up - when: - - project_deprecation_status == true - copy: - dest: "/tmp/root/etc/s6-overlay/s6-rc.d/init-deprecate/up" - content: | - /etc/s6-overlay/s6-rc.d/init-deprecate/run - -- name: deprecate - create file for user/contents.d/init-deprecate - when: - - project_deprecation_status == true - file: - path: "/tmp/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-deprecate" - state: touch - owner: "abc" - group: "abc" - -- name: create destination dir for generated external files - file: - path: "/tmp/.jenkins-external" - state: directory - owner: "abc" - group: "abc" - -############################## -# Loop Through Templates # -############################## - -# Normal Files - -- name: write templates - when: - - item.readme is not defined - - item.donate is not defined - - item.deprecation is not defined - - item.unraid_template is not defined - - item.package_trigger is not defined - - item.external_trigger is not defined - template: - src: "../templates/{{ item.src }}" - dest: "/tmp/{{ item.dest }}" - owner: "abc" - group: "abc" - delegate_to: localhost - loop: "{{ templated_files }}" - -# Readme templating - -- name: write readme normal - when: - - item.readme is defined - - full_custom_readme is not defined - template: - src: "../templates/{{ item.src }}" - dest: "/tmp/{{ item.dest }}" - owner: "abc" - group: "abc" - delegate_to: localhost - loop: "{{ templated_files }}" - -- name: write readme full custom - when: - - item.readme is defined - - full_custom_readme is defined - template: - src: "../templates/{{ item.src }}-CUSTOM" - dest: "/tmp/{{ item.dest }}" - owner: "abc" - group: "abc" - delegate_to: localhost - loop: "{{ templated_files }}" - -# Donation links templating - -- name: write donation links - when: - - item.donate is defined - - sponsor_links is defined - template: - src: "../templates/{{ item.src }}" - dest: "/tmp/{{ item.dest }}" - owner: "abc" - group: "abc" - delegate_to: localhost - loop: "{{ templated_files }}" - -# Deprecation init script templating - -- name: write deprecation init script - when: - - item.deprecation is defined - - project_deprecation_status == true - template: - src: "../templates/{{ item.src }}" - dest: "/tmp/{{ item.dest }}" - owner: "abc" - group: "abc" - mode: 0755 - delegate_to: localhost - loop: "{{ templated_files }}" - - -# Unraid template templating - -- name: write Unraid template - when: - - unraid_template - - item.unraid_template is defined - - full_custom_readme is not defined - - '"baseimage" not in project_name' - - '"jenkins-builder" not in project_name' - template: - src: "../templates/{{ item.src }}" - dest: "/tmp/{{ item.dest }}" - owner: "abc" - group: "abc" - delegate_to: localhost - loop: "{{ templated_files }}" - -# Package trigger templating - -- name: write package trigger - when: - - item.package_trigger is defined - - custom_package_trigger != true - template: - src: "../templates/{{ item.src }}" - dest: "/tmp/{{ item.dest }}" - owner: "abc" - group: "abc" - delegate_to: localhost - loop: "{{ templated_files }}" - -# External trigger templating - -- name: write external trigger - when: - - item.external_trigger is defined - - custom_external_trigger != true - template: - src: "../templates/{{ item.src }}" - dest: "/tmp/{{ item.dest }}" - owner: "abc" - group: "abc" - delegate_to: localhost - loop: "{{ templated_files }}" diff --git a/ansible/roles/generate-jenkins/templates.yml b/ansible/roles/generate-jenkins/templates.yml deleted file mode 100644 index 779fa664..00000000 --- a/ansible/roles/generate-jenkins/templates.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -templated_files: - - { src: '.editorconfig.j2', dest: '.editorconfig' } - - { src: '99-deprecation.j2', dest: 'root/etc/s6-overlay/s6-rc.d/init-deprecate/run', deprecation: 'true' } - - { src: 'CONTRIBUTING.j2', dest: '.github/CONTRIBUTING.md' } - - { src: 'DOCUMENTATION.j2', dest: '.jenkins-external/{{ project_repo_name }}.md' , readme: 'true' } - - { src: 'DONATE.j2', dest: 'root/donate.txt' , donate: 'true' } - - { src: 'EXTERNAL_TRIGGER_SCHEDULER.j2', dest: '.github/workflows/external_trigger_scheduler.yml' } - - { src: 'EXTERNAL_TRIGGER.j2', dest: '.github/workflows/external_trigger.yml', external_trigger: 'true' } - - { src: 'FUNDING.j2', dest: '.github/FUNDING.yml' } - - { src: 'greetings.j2', dest: '.github/workflows/greetings.yml' } - - { src: 'ISSUE_TEMPLATE.bug.j2', dest: '.github/ISSUE_TEMPLATE/issue.bug.yml' } - - { src: 'ISSUE_TEMPLATE.config.j2', dest: '.github/ISSUE_TEMPLATE/config.yml' } - - { src: 'ISSUE_TEMPLATE.feature.j2', dest: '.github/ISSUE_TEMPLATE/issue.feature.yml' } - - { src: 'Jenkinsfile.j2', dest: 'Jenkinsfile' } - - { src: 'LICENSE.j2', dest: 'LICENSE' } - - { src: 'lite.j2', dest: '.jenkins-external/README.lite' , readme: 'true' } - - { src: 'PACKAGE_TRIGGER_SCHEDULER.j2', dest: '.github/workflows/package_trigger_scheduler.yml' } - - { src: 'PULL_REQUEST_TEMPLATE.j2', dest: '.github/PULL_REQUEST_TEMPLATE.md' } - - { src: 'README.j2', dest: 'README.md' , readme: 'true' } - - { src: 'UNRAID_TEMPLATE.j2', dest: '.jenkins-external/{{ project_name | lower }}.xml' , unraid_template: 'true' } - - { src: 'CALL_ISSUE_PR_TRACKER.j2', dest: '.github/workflows/call_issue_pr_tracker.yml' } - - { src: 'permissions.j2', dest: '.github/workflows/permissions.yml' } - - { src: 'CALL_WORKFLOW_ISSUES_CRON.j2', dest: '.github/workflows/call_issues_cron.yml' } diff --git a/ansible/roles/generate-jenkins/templates/.editorconfig b/ansible/roles/generate-jenkins/templates/.editorconfig deleted file mode 100644 index d9e6ac39..00000000 --- a/ansible/roles/generate-jenkins/templates/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -# This file is globally distributed to all container image projects from -# https://github.com/linuxserver/docker-jenkins-builder/blob/master/.editorconfig - -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*] -end_of_line = lf -insert_final_newline = true -# trim_trailing_whitespace may cause unintended issues and should not be globally set true -trim_trailing_whitespace = false - -[{**.yml,**.yml.j2}] -indent_style = space -indent_size = 2 diff --git a/ansible/roles/github/tasks/main.yml b/ansible/roles/github/tasks/main.yml new file mode 100644 index 00000000..e56820c1 --- /dev/null +++ b/ansible/roles/github/tasks/main.yml @@ -0,0 +1,69 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks + +- name: Create .github directories + file: + path: "/tmp/{{ item }}" + state: directory + owner: "abc" + group: "abc" + mode: "0755" + loop: + - .github/ISSUE_TEMPLATE + - .github/workflows + +- name: Populate Github workflows + template: + src: "{{ item }}.j2" + dest: "/tmp/.github/workflows/{{ item }}" + owner: "abc" + group: "abc" + mode: "0644" + loop: + - call_issue_pr_tracker.yml + - call_issues_cron.yml + - external_trigger_scheduler.yml + - external_trigger.yml + - greetings.yml + - package_trigger_scheduler.yml + - permissions.yml + +- name: Populate conditional Github workflows + when: item.when + template: + src: "{{ item.file }}.j2" + dest: "/tmp/.github/workflows/{{ item.file }}" + owner: "abc" + group: "abc" + mode: "0644" + loop: + - file: package_trigger_scheduler.yml + when: custom_package_trigger != true + - file: external_trigger_scheduler.yml + when: custom_external_trigger != true + - file: external_trigger.yml + when: custom_external_trigger != true + +- name: Populate Github issue templates + template: + src: "{{ item }}.j2" + dest: "/tmp/.github/ISSUE_TEMPLATE/{{ item }}" + owner: "abc" + group: "abc" + mode: "0644" + loop: + - issue.bug.yml + - config.yml + - issue.feature.yml + +- name: Populate Github metadata + template: + src: "{{ item }}.j2" + dest: "/tmp/.github/{{ item }}" + owner: "abc" + group: "abc" + mode: "0644" + loop: + - CONTRIBUTING.md + - FUNDING.yml + - PULL_REQUEST_TEMPLATE.md diff --git a/ansible/roles/generate-jenkins/templates/CONTRIBUTING.j2 b/ansible/roles/github/templates/CONTRIBUTING.md.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/CONTRIBUTING.j2 rename to ansible/roles/github/templates/CONTRIBUTING.md.j2 diff --git a/ansible/roles/generate-jenkins/templates/FUNDING.j2 b/ansible/roles/github/templates/FUNDING.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/FUNDING.j2 rename to ansible/roles/github/templates/FUNDING.yml.j2 diff --git a/ansible/roles/generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 b/ansible/roles/github/templates/PULL_REQUEST_TEMPLATE.md.j2 similarity index 97% rename from ansible/roles/generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 rename to ansible/roles/github/templates/PULL_REQUEST_TEMPLATE.md.j2 index 3fb4abad..c7991823 100644 --- a/ansible/roles/generate-jenkins/templates/PULL_REQUEST_TEMPLATE.j2 +++ b/ansible/roles/github/templates/PULL_REQUEST_TEMPLATE.md.j2 @@ -1,5 +1,5 @@ {%- set markdown="gfm" -%} -{% from 'common_macros.j2' import noter with context %} +{{- noter -}} {% if project_deprecation_status %} {% include "README_SNIPPETS/DEPRECATION.j2" | trim %} diff --git a/ansible/roles/generate-jenkins/templates/CALL_ISSUE_PR_TRACKER.j2 b/ansible/roles/github/templates/call_issue_pr_tracker.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/CALL_ISSUE_PR_TRACKER.j2 rename to ansible/roles/github/templates/call_issue_pr_tracker.yml.j2 diff --git a/ansible/roles/generate-jenkins/templates/CALL_WORKFLOW_ISSUES_CRON.j2 b/ansible/roles/github/templates/call_issues_cron.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/CALL_WORKFLOW_ISSUES_CRON.j2 rename to ansible/roles/github/templates/call_issues_cron.yml.j2 diff --git a/ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.config.j2 b/ansible/roles/github/templates/config.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.config.j2 rename to ansible/roles/github/templates/config.yml.j2 diff --git a/ansible/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 b/ansible/roles/github/templates/external_trigger.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/EXTERNAL_TRIGGER.j2 rename to ansible/roles/github/templates/external_trigger.yml.j2 diff --git a/ansible/roles/generate-jenkins/templates/EXTERNAL_TRIGGER_SCHEDULER.j2 b/ansible/roles/github/templates/external_trigger_scheduler.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/EXTERNAL_TRIGGER_SCHEDULER.j2 rename to ansible/roles/github/templates/external_trigger_scheduler.yml.j2 diff --git a/ansible/roles/generate-jenkins/templates/greetings.j2 b/ansible/roles/github/templates/greetings.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/greetings.j2 rename to ansible/roles/github/templates/greetings.yml.j2 diff --git a/ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 b/ansible/roles/github/templates/issue.bug.yml.j2 similarity index 97% rename from ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 rename to ansible/roles/github/templates/issue.bug.yml.j2 index a63705c7..7e7b5bfa 100644 --- a/ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.bug.j2 +++ b/ansible/roles/github/templates/issue.bug.yml.j2 @@ -1,5 +1,5 @@ {%- set markdown="gfm" -%} -{% from 'common_macros.j2' import noter with context %} +{{- noter -}} # Based on the issue template name: Bug report description: Create a report to help us improve diff --git a/ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 b/ansible/roles/github/templates/issue.feature.yml.j2 similarity index 95% rename from ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 rename to ansible/roles/github/templates/issue.feature.yml.j2 index 008102df..446e68ea 100644 --- a/ansible/roles/generate-jenkins/templates/ISSUE_TEMPLATE.feature.j2 +++ b/ansible/roles/github/templates/issue.feature.yml.j2 @@ -1,5 +1,5 @@ {%- set markdown="gfm" -%} -{% from 'common_macros.j2' import noter with context %} +{{- noter -}} # Based on the issue template name: Feature request description: Suggest an idea for this project diff --git a/ansible/roles/generate-jenkins/templates/PACKAGE_TRIGGER_SCHEDULER.j2 b/ansible/roles/github/templates/package_trigger_scheduler.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/PACKAGE_TRIGGER_SCHEDULER.j2 rename to ansible/roles/github/templates/package_trigger_scheduler.yml.j2 diff --git a/ansible/roles/generate-jenkins/templates/permissions.j2 b/ansible/roles/github/templates/permissions.yml.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/permissions.j2 rename to ansible/roles/github/templates/permissions.yml.j2 diff --git a/ansible/roles/repository/tasks/main.yml b/ansible/roles/repository/tasks/main.yml new file mode 100644 index 00000000..fa00edc4 --- /dev/null +++ b/ansible/roles/repository/tasks/main.yml @@ -0,0 +1,34 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks + +- name: Create Root directory for donation + when: + - sponsor_links is defined + file: + path: "/tmp/root" + state: directory + owner: "abc" + group: "abc" + mode: "0755" + +- name: Populate donation file + when: + - sponsor_links is defined + template: + src: donate.yml.j2 + dest: /tmp/donate.txt + owner: "abc" + group: "abc" + mode: "0644" + +- name: Populate Repository files + template: + src: "{{ item }}.j2" + dest: "/tmp/{{ item }}" + owner: "abc" + group: "abc" + mode: "0644" + loop: + - .editorconfig + - Jenkinsfile + - LICENSE diff --git a/ansible/roles/generate-jenkins/templates/.editorconfig.j2 b/ansible/roles/repository/templates/.editorconfig.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/.editorconfig.j2 rename to ansible/roles/repository/templates/.editorconfig.j2 diff --git a/ansible/roles/generate-jenkins/templates/Jenkinsfile.j2 b/ansible/roles/repository/templates/Jenkinsfile.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/Jenkinsfile.j2 rename to ansible/roles/repository/templates/Jenkinsfile.j2 diff --git a/ansible/roles/generate-jenkins/templates/LICENSE.j2 b/ansible/roles/repository/templates/LICENSE.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/LICENSE.j2 rename to ansible/roles/repository/templates/LICENSE.j2 diff --git a/ansible/roles/generate-jenkins/templates/DONATE.j2 b/ansible/roles/repository/templates/donate.txt.j2 similarity index 100% rename from ansible/roles/generate-jenkins/templates/DONATE.j2 rename to ansible/roles/repository/templates/donate.txt.j2 diff --git a/ansible/vars/common b/ansible/vars/common.yml similarity index 100% rename from ansible/vars/common rename to ansible/vars/common.yml diff --git a/ansible/roles/generate-jenkins/defaults/main.yml b/ansible/vars/default.yml similarity index 94% rename from ansible/roles/generate-jenkins/defaults/main.yml rename to ansible/vars/default.yml index 8402d8e0..f4b9b6a7 100644 --- a/ansible/roles/generate-jenkins/defaults/main.yml +++ b/ansible/vars/default.yml @@ -1,10 +1,7 @@ --- - github_branch: master github_user: linuxserver -templated_vars: - - 'jenkins-vars.yml' - - 'readme-vars.yml' + project_blurb_optional_extras_enabled: false project_blurb_optional_extras: [] available_architectures: [] @@ -60,5 +57,5 @@ armhf_native: false build_armhf: false image_provenance: true image_sbom: true -image_builder: 'container' +image_builder: "container" project_categories: "" From 3fc622fa28f9a60c09b5257c84d55fa6086e0797 Mon Sep 17 00:00:00 2001 From: Roxedus Date: Mon, 27 Jan 2025 16:31:44 +0000 Subject: [PATCH 3/5] Run this builder --- .github/FUNDING.yml | 0 .github/ISSUE_TEMPLATE/issue.bug.yml | 0 .github/ISSUE_TEMPLATE/issue.feature.yml | 0 .github/workflows/call_issue_pr_tracker.yml | 0 .github/workflows/call_issues_cron.yml | 0 .github/workflows/greetings.yml | 0 .github/workflows/permissions.yml | 0 Jenkinsfile | 2 +- LICENSE | 0 9 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 .github/FUNDING.yml mode change 100755 => 100644 .github/ISSUE_TEMPLATE/issue.bug.yml mode change 100755 => 100644 .github/ISSUE_TEMPLATE/issue.feature.yml mode change 100755 => 100644 .github/workflows/call_issue_pr_tracker.yml mode change 100755 => 100644 .github/workflows/call_issues_cron.yml mode change 100755 => 100644 .github/workflows/greetings.yml mode change 100755 => 100644 .github/workflows/permissions.yml mode change 100755 => 100644 LICENSE diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/issue.bug.yml b/.github/ISSUE_TEMPLATE/issue.bug.yml old mode 100755 new mode 100644 diff --git a/.github/ISSUE_TEMPLATE/issue.feature.yml b/.github/ISSUE_TEMPLATE/issue.feature.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/call_issue_pr_tracker.yml b/.github/workflows/call_issue_pr_tracker.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/call_issues_cron.yml b/.github/workflows/call_issues_cron.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml old mode 100755 new mode 100644 diff --git a/Jenkinsfile b/Jenkinsfile index 638df50a..4ecabec0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ pipeline { DIST_IMAGE='alpine' MULTIARCH='true' CI='true' - CI_WEB='true' + CI_WEB='false' CI_PORT='8000' CI_SSL='false' CI_DELAY='60' diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 From 62486a5a649cda395c19f494931c69f5d91237ab Mon Sep 17 00:00:00 2001 From: Roxedus Date: Mon, 27 Jan 2025 16:35:29 +0000 Subject: [PATCH 4/5] Fix donation --- ansible/roles/repository/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/repository/tasks/main.yml b/ansible/roles/repository/tasks/main.yml index fa00edc4..c9b59a58 100644 --- a/ansible/roles/repository/tasks/main.yml +++ b/ansible/roles/repository/tasks/main.yml @@ -15,8 +15,8 @@ when: - sponsor_links is defined template: - src: donate.yml.j2 - dest: /tmp/donate.txt + src: donate.txt.j2 + dest: /tmp/root/donate.txt owner: "abc" group: "abc" mode: "0644" From 3a2ab13dac0a7d5ca65a755efd5d4d95d21a2e71 Mon Sep 17 00:00:00 2001 From: thespad Date: Sun, 9 Feb 2025 17:58:18 +0000 Subject: [PATCH 5/5] Prune all images after selective system prune to avoid CI test image buildup --- ansible/roles/repository/templates/Jenkinsfile.j2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ansible/roles/repository/templates/Jenkinsfile.j2 b/ansible/roles/repository/templates/Jenkinsfile.j2 index b987116e..5fd48071 100644 --- a/ansible/roles/repository/templates/Jenkinsfile.j2 +++ b/ansible/roles/repository/templates/Jenkinsfile.j2 @@ -56,7 +56,9 @@ pipeline { fi done fi - docker system prune -f --volumes || : ''' + docker system prune -f --volumes || : + docker image prune -af || : + ''' script{ env.EXIT_STATUS = '' env.LS_RELEASE = sh( @@ -977,7 +979,8 @@ pipeline { if [[ -n "${containers}" ]]; then docker stop ${containers} fi - docker system prune -af --volumes || : + docker system prune -f --volumes || : + docker image prune -af || : ''' } } @@ -1472,6 +1475,7 @@ EOF done fi docker system prune -f --volumes || : + docker image prune -af || : ''' cleanWs() }