Compare commits

..

6 Commits

Author SHA1 Message Date
Dustin bf0374ec70 ci: Mount ssh_known_hosts in rsync container
dustin/dustin.web/pipeline/head This commit looks good Details
The problem with having stages that only run in some situations is that
they don't get tested.

Need to mount the SSH host key database file in the _rsync_ container so
the host key of the web server can be verified when publishing.
2025-08-26 08:02:15 -05:00
Dustin 914ce34521 ci: Update for new ruamel.yaml API
dustin/dustin.web/pipeline/head There was a failure building this commit Details
The old `safe_load` and similar PyYAML compatibility functions have been
removed from recent(-ish) versions of _ruamel.yaml_.
2025-08-26 07:59:12 -05:00
Dustin 313bc6805e ci: Always archive artifacts, only publish master
Sometimes, I want to see what the built site looks like before
publishing it.  For that, I'll push changes to a dev branch and let
Jenkins build the site as a tarball that I can download, extract, and
view locally.  Once I am satisfied, I'll merge the dev branch to master,
which Jenkins will build and publish to the live site.
2025-08-26 07:59:12 -05:00
Dustin 59ef8ff5ad ci: Fix container entry points
* The _zola_ container image no longer contains Python, but it does
  contain `pause`.
* When using `python` as the entry point, we need to explicitly register
  a signal handler for SIGTERM, otherwise `signal.pause()` will never
  return.
* The _rsync_ container image now has a default pause entry point.
2025-08-26 07:59:12 -05:00
Dustin f04323c694 projects/dynk8s: New cover image
I never liked the old one, and AI image generators are _way_ better now.
2025-08-25 22:24:52 -05:00
Dustin 84aee99b4e projects: Improve project card style
Possibly the main reason I haven't published the _Projects_ section of
my website, despite having worked on it for several years, is I never
felt good about how the cards on the index page looked.  I think this
new style looks _much_ better, to the point where I'm thinking about
publishing it finally!
2025-08-25 22:21:38 -05:00
8 changed files with 62 additions and 45 deletions

8
ci/Jenkinsfile vendored
View File

@ -26,9 +26,17 @@ pipeline {
sh '. ci/build.sh' sh '. ci/build.sh'
} }
} }
post {
success {
archiveArtifacts 'dustin.web.tar.xz'
}
}
} }
stage('Publish') { stage('Publish') {
when {
branch 'master'
}
steps { steps {
container('rsync') { container('rsync') {
sshagent(['jenkins-web']) { sshagent(['jenkins-web']) {

View File

@ -1,7 +1,10 @@
python3 -m pip install --user ruamel.yaml python3 -m pip install --user ruamel.yaml
python3 /dev/fd/3 < songquotes.yml > public/songquotes.json 3<<EOF python3 /dev/fd/3 < songquotes.yml > public/songquotes.json 3<<EOF
from ruamel.yaml import safe_load as load from ruamel.yaml import YAML
from json import dump from json import dump
import sys import sys
dump(load(sys.stdin), sys.stdout) yaml = YAML()
dump(yaml.load(sys.stdin), sys.stdout)
EOF EOF
tar -cJf dustin.web.tar.xz -C public .

View File

@ -5,16 +5,19 @@ spec:
- name: zola - name: zola
image: git.pyrocufflink.net/containerimages/zola image: git.pyrocufflink.net/containerimages/zola
- name: python - name: python
image: docker.io/python:3.10 image: docker.io/python:3
command: command:
- python - python
args: args:
- -c - -c
- import signal; signal.pause() - |-
import signal
signal.signal(signal.SIGTERM, lambda x, y: None)
signal.pause()
- name: rsync - name: rsync
image: git.pyrocufflink.net/containerimages/rsync image: git.pyrocufflink.net/containerimages/rsync
command: volumeMounts:
- python3 - mountPath: /etc/ssh/ssh_known_hosts
args: name: volume-0
- -c subPath: ssh_known_hosts
- import signal; signal.pause() readOnly: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

@ -1,10 +0,0 @@
+++
title = "Home Network"
description = """\
VM hosts, shared storage, firewall, switches, access points, Raspberry Pis, and
more
"""
[extra]
image = "projects/home-network/server-rack01.jpg"
+++

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 MiB

View File

@ -353,7 +353,6 @@ article.post .post-date {
width: 100%; width: 100%;
background-color: $panel-color-dark; background-color: $panel-color-dark;
margin: 0.75em; margin: 0.75em;
padding: 0 0.75em;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
} }
@ -376,14 +375,24 @@ article.post .post-date {
.project-card a { .project-card a {
text-decoration: none; text-decoration: none;
display: flex;
flex-direction: column;
} }
.project-card h2 { .project-card h2 {
text-align: center; text-align: center;
margin: 0.75em;
font-size: 1.1em;
} }
.project-card img { .project-card img {
max-width: 100%; width: 100%;
aspect-ratio: 640 / 480;
object-fit: cover;
}
.project-card p {
margin: 0.75em;
} }
/* CV */ /* CV */

View File

@ -1,37 +1,41 @@
{% extends "base.html" %} {% extends "base.html" %}
{% macro project_card(path, permalink, title, description, image_path) %}
<div class="project-card">
<a href="{{ permalink }}">
{% if image_path is defined %}
{% set image = resize_image(path=image_path, width=640, height=480, op="fit") %}
<img src="{{ image.url }}" />
{% else %}
<img src="//picsum.photos/seed/{{ path | slugify }}/320/240" />
{% endif %}
<h2>{{ title }}</h2>
<p>{{ description }}</p>
</a>
</div>
{% endmacro %}
{% block content %} {% block content %}
<article class="post panel"> <article class="post panel">
<h1 class="post-title">{{ section.title }}</h1> <h1 class="post-title">{{ section.title }}</h1>
{{ section.content | safe }} {{ section.content | safe }}
<div class="project-cards"> <div class="project-cards">
{% for path in section.subsections %} {% for path in section.subsections %}
<div class="project-card">
{% set sect = get_section(path=path) %} {% set sect = get_section(path=path) %}
<a href="{{ sect.permalink }}"> {{ self::project_card(
<h2>{{ sect.title }}</h2> path=path,
{% if sect.extra.image is defined %} permalink=sect.permalink,
{% set image = resize_image(path=sect.extra.image, width=640, height=480, op="fit") %} title=sect.title,
<img src="{{ image.url }}" /> description=sect.description,
{% else %} image_path=sect.extra.image,
<img src="//picsum.photos/seed/{{ path | slugify }}/320/240" /> ) }}
{% endif %}
<p>{{ sect.description }}</p>
</a>
</div>
{% endfor %} {% endfor %}
{% for page in section.pages %} {% for page in section.pages %}
<div class="project-card"> {{ self::project_card(
<a href="{{ page.permalink }}"> path=page.path,
<h2>{{ page.title }}</h2> permalink=page.permalink,
{% if page.extra.image is defined %} title=page.title,
{% set image = resize_image(path=page.extra.image, width=640, height=480, op="fit") %} description=page.description,
<img src="{{ image.url }}" /> image_path=page.extra.image,
{% else %} ) }}
<img src="//picsum.photos/seed/{{ page.path | slugify }}/320/240" />
{% endif %}
<p>{{ page.description }}</p>
</a>
</div>
{% endfor %} {% endfor %}
</div> </div>
</article> </article>