From 62860275590daa0f58a25ec47755e95e31ed9b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Bur=C4=8Dul?= <39484255+markoburcul@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:47:34 +0200 Subject: [PATCH] jenkinsfile: fix paths for all steps (#597) * jenkinsfile: fix paths for all steps Use newest jenkins lib tag which adds the entryPoint as an argument to the nix shell function. Referenced issue: https://github.com/status-im/status-web/issues/590 Signed-off-by: markoburcul --- apps/connector/Jenkinsfile | 62 ++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/apps/connector/Jenkinsfile b/apps/connector/Jenkinsfile index e807577c..5baed3a2 100644 --- a/apps/connector/Jenkinsfile +++ b/apps/connector/Jenkinsfile @@ -1,5 +1,5 @@ #!/usr/bin/env groovy -library 'status-jenkins-lib@v1.9.1' +library 'status-jenkins-lib@v1.9.11' pipeline { agent { label 'linux' } @@ -28,40 +28,64 @@ pipeline { stages { stage('Install') { - steps { script { - nix.shell('yarn install --frozen-lockfile', pure: false) - } } + steps { + dir("${env.WORKSPACE}/apps/connector") { + script { + nix.shell( + 'yarn install --frozen-lockfile', + pure: false, + entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix" + ) + } + } + } } stage('Build') { - steps { script { - nix.shell('yarn build:chrome', pure: false) - } } + steps { + dir("${env.WORKSPACE}/apps/connector") { + script { + nix.shell( + 'yarn build:chrome', + pure: false, + entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix" + ) + } + } + } } stage('Zip') { steps { - zip( - zipFile: env.ZIP_NAME, - dir: 'build/chrome-mv3-prod', - archive: false, - ) + dir("${env.WORKSPACE}/apps/connector") { + zip( + zipFile: env.ZIP_NAME, + dir: 'build/chrome-mv3-prod', + archive: false, + ) + } } } stage('Archive') { steps { - archiveArtifacts( - artifacts: env.ZIP_NAME, - fingerprint: true, - ) + dir("${env.WORKSPACE}/apps/connector") { + archiveArtifacts( + artifacts: env.ZIP_NAME, + fingerprint: true, + ) + } } } stage('Upload') { - steps { script { - env.PKG_URL = s5cmd.upload(env.ZIP_NAME) - } } + steps { + dir("${env.WORKSPACE}/apps/connector") { + script { + env.PKG_URL = s5cmd.upload(env.ZIP_NAME) + } + } + } } }