Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768210
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/webserver-content/org/nasqueron/docs.sls b/roles/webserver-content/org/nasqueron/docs.sls
index 0d902cf..7b690a0 100644
--- a/roles/webserver-content/org/nasqueron/docs.sls
+++ b/roles/webserver-content/org/nasqueron/docs.sls
@@ -1,68 +1,92 @@
# -------------------------------------------------------------
# Salt — Provision docs.nasqueron.org website
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% if salt['node.has_web_content'](".org/nasqueron/docs") %}
-{% from "map.jinja" import packages with context %}
+{% from "map.jinja" import dirs, packages with context %}
# -------------------------------------------------------------
# Base directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/var/wwwroot/nasqueron.org/docs:
file.directory:
- user: deploy
- group: web
- dir_mode: 755
+# -------------------------------------------------------------
+# Software to build the docs
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+sphinx:
+ pkg.installed:
+ - name: {{ packages.sphinx }}
+
+{{ dirs.bin }}/deploy-docker-registry-api-doc:
+ file.managed:
+ - source: salt://roles/webserver-content/org/nasqueron/files/build-docs-salt-wrapper.sh
+ - user: deploy
+ - mode: 755
+
# -------------------------------------------------------------
# Deploy a rSW docs dir HTML build to docs.n.o/salt-wrapper
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/var/wwwroot/nasqueron.org/docs/salt-wrapper:
file.directory:
- user: deploy
- group: web
- dir_mode: 755
salt_wrapper_doc_build:
cmd.script:
- source: salt://roles/webserver-legacy/org/nasqueron/files/build-docs-salt-wrapper.sh
- args: /var/wwwroot/nasqueron.org/docs/salt-wrapper
- cwd: /tmp
- runas: deploy
- require:
- file: /var/wwwroot/nasqueron.org/docs/salt-wrapper
- pkg: sphinx
# -------------------------------------------------------------
# Deploy a rLF docs dir HTML build to docs.n.o/limiting-factor
#
# Job: https://cd.nasqueron.org/job/limiting-factor-doc/
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/var/wwwroot/nasqueron.org/docs/limiting-factor/rust:
file.directory:
- user: deploy
- group: web
- dir_mode: 755
- makedirs: True
limiting_factor_doc_build:
module.run:
- name: jenkins.build_job
- m_name: limiting-factor-doc
# -------------------------------------------------------------
-# Software to build the docs
+# Deploy a rAPIREG docs dir HTML build to docs.n.o/docker-registry-api
+#
+# Job: https://cd.nasqueron.org/job/docker-registry-api-doc/
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-sphinx:
- pkg.installed:
- - name: {{ packages.sphinx }}
+/var/wwwroot/nasqueron.org/docs/docker-registry-api/rust:
+ file.directory:
+ - user: deploy
+ - group: web
+ - dir_mode: 755
+ - makedirs: True
+
+docker_registry_api_doc_build:
+ module.run:
+ - name: jenkins.build_job
+ - m_name: docker-registry-api
{% endif %}
diff --git a/roles/webserver-content/org/nasqueron/files/deploy-docker-registry-api-doc.sh b/roles/webserver-content/org/nasqueron/files/deploy-docker-registry-api-doc.sh
new file mode 100755
index 0000000..d32aaf7
--- /dev/null
+++ b/roles/webserver-content/org/nasqueron/files/deploy-docker-registry-api-doc.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# Nasqueron Docs
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/webserver-content/org/nasqueron/files/build-docs-salt-wrapper.sh
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+PROJECT=docker-registry-api
+JENKINS_JOB=$PROJECT-doc
+SOURCE=https://cd.nasqueron.org/job/$JENKINS_JOB
+TARBALL_PATH=~deploy/workspace
+DOC_PATH=/var/wwwroot/nasqueron.org/docs/$PROJECT
+EXIT_CODE=0
+DL=fetch
+DL_ARGS="-o"
+
+if [ "$#" -eq 0 ]; then
+ echo "Usage: $0 <build number>" 1>&2;
+ exit 1
+fi
+BUILD=$1
+
+case $BUILD in
+ ''|*[!0-9]*)
+ echo "Build number argument must be an integer."
+ exit 1
+ ;;
+ *) echo "Deploying documentation for build #$BUILD..." ;;
+esac
+
+# Fetch files
+
+$DL $DL_ARGS $TARBALL_PATH/doc-$PROJECT-rust.tar.gz "$SOURCE/$BUILD/artifact/target/doc-rust.tar.gz"
+$DL $DL_ARGS $TARBALL_PATH/doc-$PROJECT-openapi.tar.gz "$SOURCE/$BUILD/artifact/target/doc-openapi.tar.gz"
+exit
+
+# Deploy
+
+if [ -f $TARBALL_PATH/doc-$PROJECT-rust.tar.gz ]; then
+ tar xzf $TARBALL_PATH/doc-$PROJECT-rust.tar.gz -C $DOC_PATH/rust/
+ rm $TARBALL_PATH/doc-$PROJECT-rust.tar.gz
+else
+ >&2 echo "Artifact not found: crate documentation archive (doc-$PROJECT-rust.tar.gz)"
+ EXIT_CODE=2
+fi
+
+if [ -f $TARBALL_PATH/doc-$PROJECT-openapi.tar.gz ]; then
+ tar xzf $TARBALL_PATH/doc-$PROJECT-openapi.tar.gz -C $DOC_PATH/
+ rm $TARBALL_PATH/doc-$PROJECT-openapi.tar.gz
+else
+ >&2 echo "Artifact not found: OpenAPI Spectacle documentation archive (doc-$PROJECT-openapi.tar.gz)"
+ EXIT_CODE=$((EXIT_CODE+4))
+fi
+
+exit $EXIT_CODE
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Nov 25, 07:10 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258427
Default Alt Text
(5 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment