Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jenkinsfile: fix paths for all steps #597

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 38 additions & 18 deletions apps/connector/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,60 @@ pipeline {

stages {
stage('Install') {
steps { script {
nix.shell('yarn install --frozen-lockfile', pure: false)
} }
steps {
dir("${env.WORKSPACE}/apps/connector") {
script {
withEnv(["WORKSPACE=${env.WORKSPACE}/apps/connector"]) { // Override WORKSPACE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's way too overcomplicated. Wouldn't it be better to just add support for an entrypoint argument for nix.shell() and other commands in status-jenkins-lib?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that, will fix it right away

nix.shell('yarn install --frozen-lockfile', pure: false)
}
}
}
}
}

stage('Build') {
steps { script {
nix.shell('yarn build:chrome', pure: false)
} }
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 {
zip(
zipFile: env.ZIP_NAME,
dir: 'build/chrome-mv3-prod',
archive: false,
)
dir("${env.WORKSPACE}/apps/connector") { // Set the working directory to 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") { // Set the working directory to 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") { // Set the working directory to apps/connector
script {
env.PKG_URL = s5cmd.upload(env.ZIP_NAME)
}
}
}
}
}

Expand Down
Loading