New answers tagged

1

Adjust Jenkins job "Build Environment" see https://stackoverflow.com/questions/39829229/how-to-use-exclude-folder-option-in-delete-workspace-before-build-starts-secti/41728663 also add build step with shell/windows script with npm install -D


1

Install the git plugin, add credentials for the account you want it to use, then set the job to use SCM Polling. It will check on a preset interval for changes to that repo and trigger when changes are detected. If you need instant triggering upon push, you're looking for webhooks, which is significantly more difficult to set up. I find that polling every 2 ...


1

@Mkash, don't you know in advance what services you have in your services.yaml file? Maintain a list in groovy, and see whether the input is in that list or not. Something like: availableServices = ["ew_ws_gateway", "ingress"] services = ["a", "b", "c", "ew_ws_gateway"] services.each { svc -> ...


0

If you're using the declarative DSL, you can use when Suppose the branch you're interested in is main, have a stage like: . . . stages { stage('Specific Branch'} when { branch 'main' } steps { // only executed when the main branch is changed } } . . . From the Jenkins docs: Built-in Conditions branch Execute the stage when the branch being ...


2

The scripted equivalent to the declarative steps { // pipeline steps here post { failure { // failure handler here } success { // success handler here } always { // always handler here } } is the native Groovy try { } catch { }: try { // pipeline steps here // success handler here } catch(Exception e) { // failure handler ...


3

Rebuild, using the Rebuilder plugin allows a completed job to be re-executed while allowing you to change the parameters, assuming your job is parameterized. Replay does something similar, except it doesn't show you parameters. Instead, it shows the pipeline code directly. This is helpful when wanting to test changes iteratively as you can click Replay, ...


1

You could use the git credentials.helper feature https://git-scm.com/docs/gitcredentials


-1

Why is your "source repo" 100GB? Admittedly, the article is several years old, but MS reported the windows code base repo was the largest known repo at the time and was 300GB. Is your source really that big? Your Git repo should NOT contain derived artifacts (.class, .jar/war, .o, .dll, .exe, etc), nor 3rd-party libraries. There are other tools ...


Top 50 recent answers are included