jenkinsfile: fix paths for all steps
Since nix shell function from jenkins librarz uses WORKSPACE env variable to find shell.nix we need to override it for steps using nix shell. For all of the steps I'm using dir directive to change cwd to the apps/connector. Referenced issue: https://github.com/status-im/status-web/issues/590 Signed-off-by: markoburcul <marko@status.im>
This commit is contained in:
parent
8cf67b1419
commit
0d89bf4683
|
@ -28,19 +28,32 @@ pipeline {
|
|||
|
||||
stages {
|
||||
stage('Install') {
|
||||
steps { script {
|
||||
steps {
|
||||
dir("${env.WORKSPACE}/apps/connector") {
|
||||
script {
|
||||
withEnv(["WORKSPACE=${env.WORKSPACE}/apps/connector"]) { // Override WORKSPACE
|
||||
nix.shell('yarn install --frozen-lockfile', pure: false)
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps { script {
|
||||
steps {
|
||||
dir("${env.WORKSPACE}/apps/connector") {
|
||||
script {
|
||||
withEnv(["WORKSPACE=${env.WORKSPACE}/apps/connector"]) { // Override WORKSPACE
|
||||
nix.shell('yarn build:chrome', pure: false)
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Zip') {
|
||||
steps {
|
||||
dir("${env.WORKSPACE}/apps/connector") { // Set the working directory to apps/connector
|
||||
zip(
|
||||
zipFile: env.ZIP_NAME,
|
||||
dir: 'build/chrome-mv3-prod',
|
||||
|
@ -48,20 +61,27 @@ pipeline {
|
|||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive') {
|
||||
steps {
|
||||
dir("${env.WORKSPACE}/apps/connector") { // Set the working directory to apps/connector
|
||||
archiveArtifacts(
|
||||
artifacts: env.ZIP_NAME,
|
||||
fingerprint: true,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
steps {
|
||||
dir("${env.WORKSPACE}/apps/connector") { // Set the working directory to apps/connector
|
||||
script {
|
||||
env.PKG_URL = s5cmd.upload(env.ZIP_NAME)
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue