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 <marko@status.im>
This commit is contained in:
Marko Burčul 2024-10-10 17:47:34 +02:00 committed by GitHub
parent 6bf4d487f3
commit 6286027559
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 43 additions and 19 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.1' library 'status-jenkins-lib@v1.9.11'
pipeline { pipeline {
agent { label 'linux' } agent { label 'linux' }
@ -28,19 +28,36 @@ pipeline {
stages { stages {
stage('Install') { stage('Install') {
steps { script { steps {
nix.shell('yarn install --frozen-lockfile', pure: false) dir("${env.WORKSPACE}/apps/connector") {
} } script {
nix.shell(
'yarn install --frozen-lockfile',
pure: false,
entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix"
)
}
}
}
} }
stage('Build') { stage('Build') {
steps { script { steps {
nix.shell('yarn build:chrome', pure: false) dir("${env.WORKSPACE}/apps/connector") {
} } script {
nix.shell(
'yarn build:chrome',
pure: false,
entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix"
)
}
}
}
} }
stage('Zip') { stage('Zip') {
steps { steps {
dir("${env.WORKSPACE}/apps/connector") {
zip( zip(
zipFile: env.ZIP_NAME, zipFile: env.ZIP_NAME,
dir: 'build/chrome-mv3-prod', dir: 'build/chrome-mv3-prod',
@ -48,20 +65,27 @@ pipeline {
) )
} }
} }
}
stage('Archive') { stage('Archive') {
steps { steps {
dir("${env.WORKSPACE}/apps/connector") {
archiveArtifacts( archiveArtifacts(
artifacts: env.ZIP_NAME, artifacts: env.ZIP_NAME,
fingerprint: true, fingerprint: true,
) )
} }
} }
}
stage('Upload') { stage('Upload') {
steps { script { steps {
dir("${env.WORKSPACE}/apps/connector") {
script {
env.PKG_URL = s5cmd.upload(env.ZIP_NAME) env.PKG_URL = s5cmd.upload(env.ZIP_NAME)
} } }
}
}
} }
} }