From 3b230093f60383ed977101691ead22b4a1b68edd Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 22 Nov 2023 10:08:30 -0600 Subject: [PATCH 1/4] Tidied docker build documentation --- generator/build/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/generator/build/README.md b/generator/build/README.md index c3af1a309..8a392e579 100644 --- a/generator/build/README.md +++ b/generator/build/README.md @@ -14,14 +14,13 @@ You will need to have the following repos checked out: * enterprise (used for changelog) * masterfiles (used to document masterfies) * documentation -* documentation/generator (this repo) Usage ----- If you have buildah installed: -1. clone the above repos +1. clone the above repos (run `clone.sh`) 2. export the following env variables: @@ -30,11 +29,11 @@ If you have buildah installed: * `$PACKAGE_JOB` - where to take CFEngine HUB package from, a dir at http://buildcache.cloud.cfengine.com/packages/, - usually testing-pr + usually `testing-pr` * `$PACKAGE_UPLOAD_DIRECTORY` - where to take CFEngine HUB package from, a dir at http://buildcache.cloud.cfengine.com/packages/testing-pr/, - for example, jenkins-master-nightly-pipeline-943 + for example, `jenkins-master-nightly-pipeline-943` * `$PACKAGE_BUILD` - RELEASE of the build to be downloaded, usually 1 From 08fe00c6c756127f2b8afd21d88083fc5a6327c7 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 22 Nov 2023 10:08:59 -0600 Subject: [PATCH 2/4] Added clone script --- generator/build/clone.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 generator/build/clone.sh diff --git a/generator/build/clone.sh b/generator/build/clone.sh new file mode 100755 index 000000000..95aa156b5 --- /dev/null +++ b/generator/build/clone.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +for repo in core nova enterprise masterfiles documentation; do + git clone "git@github.com:cfengine/$repo.git" +done From fc83bf39929f97557eaabb02ba5e83fb2969cd74 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Wed, 22 Nov 2023 10:09:20 -0600 Subject: [PATCH 3/4] Fixed docker build Installing redcarpet tried to pull in a newer version of execjs which wanted newer ruby. This simply makes sure that execjs is installed at our needed version first. --- generator/build/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/build/install.sh b/generator/build/install.sh index df7af8f4b..1991d30e0 100644 --- a/generator/build/install.sh +++ b/generator/build/install.sh @@ -70,9 +70,9 @@ gem install jekyll-asset-pipeline --version 0.1.6 gem install closure-compiler --version 1.1.8 gem install yui-compressor --version 0.9.6 gem install albino --version 1.3.3 +gem install execjs --version 1.4.0 gem install redcarpet --version 2.2.2 gem install uglifier --version 1.3.0 -gem install execjs --version 1.4.0 gem install sanitize --version 2.0.3 cat > /tmp/jekyll-0.12.1-cfengine.patch < Date: Wed, 22 Nov 2023 12:48:49 -0600 Subject: [PATCH 4/4] Aligned main.sh with docker file (ubuntu 22) --- generator/build/main.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/build/main.sh b/generator/build/main.sh index e1bdd3abb..cebf800fe 100644 --- a/generator/build/main.sh +++ b/generator/build/main.sh @@ -15,7 +15,7 @@ export PACKAGE_UPLOAD_DIRECTORY=$3 export PACKAGE_BUILD=$4 export JOB_TO_UPLOAD=$PACKAGE_JOB -export FLAG_FILE_URL="http://buildcache.cfengine.com/packages/$PACKAGE_JOB/$PACKAGE_UPLOAD_DIRECTORY/PACKAGES_HUB_x86_64_linux_ubuntu_18/core-commitID" +export FLAG_FILE_URL="http://buildcache.cfengine.com/packages/$PACKAGE_JOB/$PACKAGE_UPLOAD_DIRECTORY/PACKAGES_HUB_x86_64_linux_ubuntu_22/core-commitID" export NO_OUTPUT_DIR=1 env @@ -74,7 +74,7 @@ done wget -O- $FLAG_FILE_URL echo "Detecting version" -HUB_DIR_NAME=PACKAGES_HUB_x86_64_linux_ubuntu_18 +HUB_DIR_NAME=PACKAGES_HUB_x86_64_linux_ubuntu_22 HUB_DIR_URL="http://buildcache.cfengine.com/packages/$PACKAGE_JOB/$PACKAGE_UPLOAD_DIRECTORY/$HUB_DIR_NAME/" HUB_PACKAGE_NAME="$(wget $HUB_DIR_URL -O- | sed '/deb/!d;s/.*"\([^"]*\.deb\)".*/\1/')"