You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2023/04/02 22:20:03 UTC
[comdev-events-site] 02/02: Merge branch 'pagefind' into preview/test
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch preview/test
in repository https://gitbox.apache.org/repos/asf/comdev-events-site.git
commit 8e1c4f6cb0fc40f88c5019dad5cef8fdc035a606
Merge: ab2b6fe a4fea4c
Author: Sebb <se...@apache.org>
AuthorDate: Sun Apr 2 23:19:49 2023 +0100
Merge branch 'pagefind' into preview/test
Jenkinsfile | 24 ++++++++++++------------
source/_index.md | 9 +++++++++
2 files changed, 21 insertions(+), 12 deletions(-)
diff --cc Jenkinsfile
index 4cd2507,8208e20..ea71331
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@@ -23,8 -23,10 +23,9 @@@ pipeline
}
environment {
-- HUGO_VERSION = '0.63.2'
- DEPLOY_BRANCH = 'asf-site'
- PAGEFIND_VERSION = '0.12.0'
- PAGEFIND_HASH = '3e450176562b65359f855c04894ec2c07ffd30a8d08ef4d5812f8d3469d7a58f'
++ HUGO_VERSION = '0.111.3'
++ HUGO_HASH = 'b382aacb522a470455ab771d0e8296e42488d3ea4e61fe49c11c32ec7fb6ee8b'
+ DEPLOY_BRANCH = 'preview/test-staging'
}
stages {
@@@ -34,15 -36,25 +35,15 @@@
// Capture last commit hash for final commit message
env.LAST_SHA = sh(script:'git log -n 1 --pretty=format:\'%H\'', returnStdout: true).trim()
-- // Setup Hugo
++ // Download Hugo
env.HUGO_DIR = sh(script:'mktemp -d', returnStdout: true).trim()
-- sh """
-- mkdir -p ${env.HUGO_DIR}/bin
-- cd ${env.HUGO_DIR}
-- wget --no-verbose -O hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
-- tar xfzv hugo.tar.gz
-- mv hugo ${env.HUGO_DIR}/bin/
-- """
-
- // Download Pagefind
- env.PAGEFIND_DIR = sh(script:'mktemp -d', returnStdout: true).trim()
- sh "mkdir -p ${env.PAGEFIND_DIR}/bin"
- sh "wget --no-verbose -O ${env.PAGEFIND_DIR}/pagefind.tar.gz https://github.com/CloudCannon/pagefind/releases/download/v${PAGEFIND_VERSION}/pagefind-v${PAGEFIND_VERSION}-x86_64-unknown-linux-musl.tar.gz"
++ sh "mkdir -p ${env.HUGO_DIR}/bin"
++ sh "wget --no-verbose -O ${env.HUGO_DIR}/hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz"
+ // Verify the checksum
- def pagefind_hash = sha256 file: "${env.PAGEFIND_DIR}/pagefind.tar.gz"
- assert pagefind_hash == "${PAGEFIND_HASH}"
- // Unpack Pagefind
- sh "tar -C ${env.PAGEFIND_DIR}/bin -xkf ${env.PAGEFIND_DIR}/pagefind.tar.gz"
++ def hugo_hash = sha256 file: "${env.HUGO_DIR}/hugo.tar.gz"
++ assert hugo_hash == "${HUGO_HASH}"
++ // Unpack Hugo
++ sh "tar -C ${env.HUGO_DIR}/bin -xkf ${env.HUGO_DIR}/hugo.tar.gz"
// Setup directory structure for generated content
env.TMP_DIR = sh(script:'mktemp -d', returnStdout: true).trim()
@@@ -55,9 -67,10 +56,8 @@@
stage('Build') {
steps {
script {
-- withEnv(["PATH+HUGO=${env.HUGO_DIR}/bin"]) {
-- sh "hugo --destination ${env.OUT_DIR}"
-- }
- sh "${env.PAGEFIND_DIR}/bin/pagefind --source ${env.OUT_DIR}"
++ sh "${env.HUGO_DIR}/bin/hugo --destination ${env.OUT_DIR}"
++ sh "npx -y pagefind --source ${env.OUT_DIR}"
}
}
}