Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
sarora1
Creator
Creator

CICD using Jenkins - How to build a job and have post build steps

Currently I am building the job in Jenkins using this command under Goals and Options

 

clean deploy -Pcloud-publisher -pl jobs/process/job_name_0.1 -fae -am

But this is build and deploy if the build succeeds.

 

What I would like to do is,

1: Build the job

2: Post Build - Run a process for some verification (This is a different talend job that checks some stuff) 

3: Post Build Step 2 - Deploy the job based on outcome of Step 2. 

 

Questions:

- For #1, What do I change in my deploy command so that it only builds but doesn't deploy

             Is it changing deploy to package?

- For #2,  In Post Steps under Jenkins Job configuration, Shall I execute my verification Talend Job as "Execute shell"

- For #3, In the same "Execute shell" task in #2, add maven command to deploy whatever was build in #1?

 

 

Labels (1)
  • v7.x

2 Replies
Anonymous
Not applicable

Hello,

 

Maybe what you can try is:

 

1) mvn install (instead of deploy)

clean install -Pcloud-publisher -pl jobs/process/job_name_0.1 -fae -am

(build / install artifacts locally)

2) launch your tests

3) execute the mvn deploy as before, but with one more argument: -Dcommandline.skip=true

 

The 3rd step should normally not rebuild anything since everything was built before (almost all the steps should be skipped, except the deploy)

The additional argument will avoid the commandline to start / re-generate the source code.

 

Nicolas

sarora1
Creator
Creator
Author

I ended up using

package

instead of 

install

in step 1.

Then used Post Steps in Jenkins for step 2. 

And, then created a separate job for deploy using

deploy

without clean option