public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] The artwork of the ipfire project. branch, master, updated. eb63f4a0888ca810b083ed492faacc29ae3fc471
Date: Thu, 03 Dec 2026 16:48:48 +0000 (UTC)	[thread overview]
Message-ID: <4jgLDc5cpYz2xg0@people01.haj.ipfire.org> (raw)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The artwork of the ipfire project.".

The branch, master has been updated
       via  eb63f4a0888ca810b083ed492faacc29ae3fc471 (commit)
       via  c6d111a663895a33b1efd10347081ad6ec57764b (commit)
       via  71231713b19adb0c4465debb0d04d4be04739915 (commit)
       via  0d21d11dc238b216027713c05269d792790c7f71 (commit)
       via  d88ec2bcb2920b8023605edb774b7efcba170462 (commit)
       via  f9097c0077489b6d7148e243a451970c054ff903 (commit)
       via  f333fa8a117081a0499532f642b87714e545c68e (commit)
       via  d8896805c2001bcbe928aca677cd22cd92650c35 (commit)
      from  95a5bb87caf4ef1f96658e3d9de48231699bbdd1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit eb63f4a0888ca810b083ed492faacc29ae3fc471
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 16:42:31 2026 +0000

    jenkins: Add a pipeline to build and publish all assets
    
    All assets are being rendered in a Debian container. Since the Prompt
    font is not packaged in Debian, it is being downloaded from Google
    Fonts, and the build fails if it cannot be found, because Inkscape
    would otherwise silently use a different font.
    
    Builds of the master branch are being published on
    https://artwork.ipfire.org/.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit c6d111a663895a33b1efd10347081ad6ec57764b
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 16:42:31 2026 +0000

    gitignore: Ignore the public/ directory
    
    This is where the CI pipeline collects all files before they are being
    published.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 71231713b19adb0c4465debb0d04d4be04739915
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 16:42:31 2026 +0000

    upload: Make the destination configurable
    
    This allows to upload the files somewhere else, or to collect them in a
    local directory, by running "make upload UPLOAD_DEST=...".
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 0d21d11dc238b216027713c05269d792790c7f71
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 16:36:46 2026 +0000

    clean: Remove all intermediate files
    
    The list of intermediate files was maintained by hand and was missing
    all standalone SVG files, while listing favicon variants that are
    never built. Compute the list from LOGOS instead.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit d88ec2bcb2920b8023605edb774b7efcba170462
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 16:36:46 2026 +0000

    gitignore: Ignore social media and intermediate files
    
    The LinkedIn banner and the intermediate SVG files generated in the
    top-level directory showed up as untracked after a build.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit f9097c0077489b6d7148e243a451970c054ff903
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 16:34:34 2026 +0000

    upload: Anchor rsync filters to the top-level directory
    
    Unanchored patterns match a directory of the same name at any depth.
    Since we run rsync with --delete-excluded, be precise about what we
    include.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit f333fa8a117081a0499532f642b87714e545c68e
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 16:34:34 2026 +0000

    make: Fail pipelines if any command fails
    
    The BIOS boot logo is rendered through a pipe, where only the exit
    status of the last command was checked. A failing rsvg-convert went
    unnoticed and could produce a broken image.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit d8896805c2001bcbe928aca677cd22cd92650c35
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Dec 3 16:34:34 2026 +0000

    make: Delete partially written targets on error
    
    Recipes write their output using shell redirection, which leaves an
    empty or truncated file behind if the command fails. Make would then
    consider this target up to date on the next run and upload would
    publish the broken file.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 .gitignore  |   7 ++-
 Jenkinsfile | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Makefile    |  31 ++++++++----
 3 files changed, 185 insertions(+), 12 deletions(-)
 create mode 100644 Jenkinsfile

Difference in files:
diff --git a/.gitignore b/.gitignore
index 8645a5e..1b40999 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,5 +9,8 @@ monochrome/*.svg
 standard/*.pdf
 standard/*.png
 standard/*.svg
-/logo-inverted.svg
-/logo-monochrome.svg
+social/
+/*-standalone.svg
+/*-inverted.svg
+/*-monochrome.svg
+/public/
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..00a28cf
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,159 @@
+pipeline {
+	agent none
+
+	options {
+		// Only build one commit at a time. Whatever is being pushed in the
+		// meantime waits and is then being built together by the next build.
+		disableConcurrentBuilds()
+	}
+
+	stages {
+		/*
+			Renders all assets and collects them in public/ with exactly
+			the same layout that they will have on the server
+		*/
+		stage("Build") {
+			agent {
+				docker {
+					image "debian:trixie"
+
+					// Run as root inside the container to install dependencies
+					args "--init -u root"
+
+					customWorkspace "${JOB_NAME}/${BUILD_ID}/build"
+				}
+			}
+
+			steps {
+				script {
+					installBuildDeps()
+				}
+
+				sh "make -j\$(nproc) all"
+
+				// Use the filters of "make upload" to copy the assets into public/
+				sh "make upload UPLOAD_DEST=public/"
+
+				archiveArtifacts artifacts: "public/**/*"
+				stash name: "artwork", includes: "public/**/*"
+			}
+
+			// Cleanup the workspace afterwards
+			post {
+				always {
+					script {
+						cleanupWorkspace()
+					}
+				}
+			}
+		}
+
+		/*
+			Publish the assets on https://artwork.ipfire.org/
+		*/
+		stage("Publish") {
+			agent any
+
+			// We don't need to check out the source for this stage
+			options {
+				skipDefaultCheckout()
+
+				// Only one build publishes at a time
+				lock("artwork-publish")
+			}
+
+			environment {
+				KRB5CCNAME = "${WORKSPACE}/.krb5cc"
+			}
+
+			// Only what is in the master branch goes online
+			when {
+				beforeAgent true
+				beforeOptions true
+
+				branch "master"
+			}
+
+			steps {
+				// Cleanup the workspace
+				cleanWs()
+
+				// Fetch the assets that have been built before
+				unstash "artwork"
+
+				// Fetch a Kerberos ticket
+				withCredentials([file(credentialsId: "jenkins.keytab", variable: "KEYTAB")]) {
+					sh 'kinit -kV -t $KEYTAB jenkins@IPFIRE.ORG'
+				}
+
+				// Publish files. Every build renders all files again, so
+				// compare checksums to only transfer what has actually changed.
+				sh """
+					rsync \
+						--verbose \
+						--recursive \
+						--checksum \
+						--perms \
+						--chmod=D2775,F664 \
+						--delete \
+						--delay-updates \
+						public/ \
+						pakfire@fs01.haj.ipfire.org:/pub/artwork/
+				"""
+
+				// Destroy the Kerberos credentials
+				sh "kdestroy"
+			}
+		}
+	}
+}
+
+/*
+	Installs everything that is needed to render the assets
+*/
+def installBuildDeps() {
+	// Don't wait for fsync() and don't install any recommended packages
+	sh """
+		echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/unsafe-io
+		echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/90-no-recommends
+	"""
+
+	sh """
+		apt-get update
+		apt-get install -y \
+			ca-certificates \
+			curl \
+			fontconfig \
+			imagemagick \
+			inkscape \
+			librsvg2-bin \
+			make \
+			rsync
+	"""
+
+	// The logo uses Prompt Bold, which is not packaged in Debian. Without it,
+	// Inkscape would silently convert the text using a different font.
+	sh """
+		mkdir -p /usr/local/share/fonts/prompt
+		curl --fail --silent --show-error --location \
+			--output /usr/local/share/fonts/prompt/Prompt-Bold.ttf \
+			https://github.com/google/fonts/raw/main/ofl/prompt/Prompt-Bold.ttf
+		fc-cache -f
+
+		# Fail if the font cannot be found
+		fc-list | grep -q "Prompt:style=Bold"
+	"""
+}
+
+/*
+	Removes the workspace of a stage that has been running in a container.
+
+	Whatever has been created in there belongs to root, but the agent runs as
+	an unprivileged user and cannot remove it. That is why we have to remove it
+	from the inside where we are root.
+*/
+def cleanupWorkspace() {
+	sh "find . -xdev -mindepth 1 -delete || :"
+
+	cleanWs()
+}
diff --git a/Makefile b/Makefile
index 06fbf7b..4260d0f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,10 @@
+# Remove partially written targets when a recipe fails
+.DELETE_ON_ERROR:
+
+# Make pipelines fail if any command in them fails
+SHELL := /bin/bash
+.SHELLFLAGS := -o pipefail -c
+
 STYLES = \
 	standard \
 	inverted \
@@ -40,6 +47,16 @@ OBJECTS += \
 OBJECTS += \
 	social/linkedin/banner.png
 
+# Intermediate files generated in the top-level directory
+INTERMEDIATES = \
+	favicon-standalone.svg \
+	$(foreach logo,$(LOGOS),$(logo)-standalone.svg) \
+	$(foreach logo,$(LOGOS),$(logo)-inverted.svg $(logo)-inverted-standalone.svg) \
+	$(foreach logo,$(LOGOS),$(logo)-monochrome.svg $(logo)-monochrome-standalone.svg)
+
+# Where to upload the rendered files
+UPLOAD_DEST ?= people.ipfire.org:/pub/artwork/
+
 # Colors
 PRIMARY = ff2e52
 DARK    = 363636
@@ -208,18 +225,12 @@ social/linkedin/banner.png:
 clean:
 	# Remove all generated objects
 	rm -vf $(OBJECTS)
-	rm -vf \
-		logo-inverted.svg \
-		logo-monochrome.svg \
-		logo-small-inverted.svg \
-		logo-small-monochrome.svg \
-		favicon-inverted.svg \
-		favicon-monochrome.svg
+	rm -vf $(INTERMEDIATES)
 
 .PHONY: upload
 upload: $(OBJECTS)
 	rsync -avHz --progress --delete --delete-excluded \
-		$(addprefix --filter="+ ",$(call parents,$(OBJECTS))) \
-		$(addprefix --filter="+ ",$(OBJECTS)) \
+		$(addprefix --filter="+ /",$(call parents,$(OBJECTS))) \
+		$(addprefix --filter="+ /",$(OBJECTS)) \
 		--filter="- */" --filter="- *" \
-		. people.ipfire.org:/pub/artwork/
+		. $(UPLOAD_DEST)


hooks/post-receive
--
The artwork of the ipfire project.


                 reply	other threads:[~2026-12-03 16:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4jgLDc5cpYz2xg0@people01.haj.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox