Skip to content

Commit

Permalink
Update Jenkinsfile example
Browse files Browse the repository at this point in the history
While our team was trying to migrate to Nx, we found out this issue: nrwl#2170
The documentation doesn't mention about this behaviour but in our case setting the --base to origin/{current_branch} fixed it. I've set the env variable accordingly in the md file.
  • Loading branch information
echonax authored Feb 4, 2022
1 parent 4a9be34 commit 8a1639f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/shared/monorepo-ci-jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ pipeline {
steps {
sh "npm install"
sh "npx nx-cloud start-ci-run"
sh "npx nx affected --target=build --parallel --max-parallel=3"
sh "npx nx affected --target=test --parallel --max-parallel=2"
sh "npx nx affected --base origin/${CHANGE_TARGET:-main} --target=build --parallel --max-parallel=3"
sh "npx nx affected --base origin/${CHANGE_TARGET:-main} --target=test --parallel --max-parallel=2"
sh "npx nx-cloud stop-all-agents"
}
}
Expand Down

0 comments on commit 8a1639f

Please sign in to comment.