sebbASF commented on code in PR #100:
URL: https://github.com/apache/comdev-site/pull/100#discussion_r1155094358


##########
Jenkinsfile:
##########
@@ -56,10 +68,13 @@ pipeline {
         stage('Build') {
             steps {
                 script {
-                    sh 'for i in $(which -a hugo) ; do echo $i; $i version; 
done'
-                    sh 'hugo version'
-                    sh "hugo --destination ${env.OUT_DIR}"
-                    sh "${env.PAGEFIND_DIR}/bin/pagefind --source 
${env.OUT_DIR}"
+                    withEnv(["PATH+HUGO=${env.HUGO_DIR}/bin", 
"PATH+PAGEFIND=${env.PAGEFIND_DIR}/bin"]) {

Review Comment:
   The behaviour is similar, but not identical in all cases.
   
   If for some reason the hugo executable is not present at the first item on 
the path, then the withEnv version will fall back to checking the rest of the 
path. That would not be immediately obvious unless the build failed.
   
   This could happen if a different name was used in the tar, or the file was 
not executable for some reason.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@community.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@community.apache.org
For additional commands, e-mail: dev-h...@community.apache.org

Reply via email to