Skip to content

Commit

Permalink
jenkinsfile: fix paths for all steps (#597)
Browse files Browse the repository at this point in the history
* 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: #590

Signed-off-by: markoburcul <[email protected]>
  • Loading branch information
markoburcul authored Oct 10, 2024
1 parent 6bf4d48 commit 6286027
Showing 1 changed file with 43 additions and 19 deletions.
62 changes: 43 additions & 19 deletions apps/connector/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library '[email protected].1'
library '[email protected].11'

pipeline {
agent { label 'linux' }
Expand Down Expand Up @@ -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)
}
}
}
}
}

Expand Down

0 comments on commit 6286027

Please sign in to comment.