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/03/30 14:53:58 UTC

[comdev-site] branch testhugo updated: Trying

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch testhugo
in repository https://gitbox.apache.org/repos/asf/comdev-site.git


The following commit(s) were added to refs/heads/testhugo by this push:
     new 1217495  Trying
1217495 is described below

commit 12174958c7cff7c644402210c03de216bd1c7b1d
Author: Sebb <se...@apache.org>
AuthorDate: Thu Mar 30 15:53:49 2023 +0100

    Trying
---
 Jenkinsfile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 48ea0ed..db194dd 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -35,6 +35,7 @@ pipeline {
                     // Capture last commit hash for final commit message
                     env.LAST_SHA = sh(script:'git log -n 1 --pretty=format:\'%H\'', returnStdout: true).trim()
 
+                    env.HUGO_DIR = sh(script:'mktemp -d', returnStdout: true).trim()
                     // Download Pagefind
                     env.PAGEFIND_DIR = sh(script:'mktemp -d', returnStdout: true).trim()
                     sh "mkdir -p ${env.PAGEFIND_DIR}/bin"
@@ -56,9 +57,13 @@ pipeline {
         stage('Build') {
             steps {
                 script {
-                    sh "which -a hugo"
                     sh "echo $PATH"
-                    sh "hugo --destination ${env.OUT_DIR}"
+                    withEnv(["PATH=\\$PATH:${env.HUGO_DIR}/bin"]) {
+                        sh "echo $PATH"
+                        sh "which -a hugo"
+                        sh "hugo version"
+                        sh "hugo --destination ${env.OUT_DIR}"
+                    }
                     sh "${env.PAGEFIND_DIR}/bin/pagefind --source ${env.OUT_DIR}"
                 }
             }