Skip to content
Snippets Groups Projects
Commit f2204b7f authored by Greg Fodor's avatar Greg Fodor
Browse files

Try building with yarn in hubs build

parent ffde0501
No related branches found
No related tags found
No related merge requests found
import groovy.json.JsonOutput
// From https://issues.jenkins-ci.org/browse/JENKINS-44231
// Given arbitrary string returns a strongly escaped shell string literal.
// I.e. it will be in single quotes which turns off interpolation of $(...), etc.
// E.g.: 1'2\3\'4 5"6 (groovy string) -> '1'\''2\3\'\''4 5"6' (groovy string which can be safely pasted into shell command).
def shellString(s) {
// Replace ' with '\'' (https://unix.stackexchange.com/a/187654/260156). Then enclose with '...'.
// 1) Why not replace \ with \\? Because '...' does not treat backslashes in a special way.
// 2) And why not use ANSI-C quoting? I.e. we could replace ' with \'
// and enclose using $'...' (https://stackoverflow.com/a/8254156/4839573).
// Because ANSI-C quoting is not yet supported by Dash (default shell in Ubuntu & Debian) (https://unix.stackexchange.com/a/371873).
'\'' + s.replace('\'', '\'\\\'\'') + '\''
}
pipeline {
agent any
......@@ -6,9 +22,20 @@ pipeline {
}
stages {
stage('pre-build') {
steps {
checkout scm: [$class: 'GitSCM', clean: false, clearWorkspace: false]
sh 'rm -rf ./build ./tmp'
}
}
stage('build') {
steps {
build 'reticulum'
script {
def baseAssetsPath = "https://assets-dev.reticium.io/"
sh "GENERATE_SMOKE_TEST=true BASE_ASSETS_PATH=${shellString(baseAssetsPath)} yarn build -- --output-path build"
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment