Build a multiple jobs with maven and talend P2 to deploy it on TMC

Viewed 132

I want to pass multiple job name to Manen script to deploy the job on TMC and we are using Gitlab for that. I can able to do that for single job with below command.

- mvn -s $MAVEN_SETTINGS -U -f ${CI_PROJECT_DIR}/CICD_TEST/poms/pom.xml -Pcloud-publisher clean deploy -fn -e -pl jobs/process/cicd_test_2_0.1 -am

I want to deploy cicd_test_3_0.1 as well

How we can pass multiple jobs name ?

Thanks, Shantanu K

1 Answers

You can pass multiple jobs to be built / published:

-pl jobs/process/cicd_test_2_0.1
-pl jobs/process/cicd_test_2_0.1,cicd_test_3_0.1

Instead of -fn I'd suggest using -fae (fail-at-end)

You can find more information in the official docs: https://help.talend.com/r/en-US/7.3/software-dev-lifecycle-best-practices-guide/ci-mvn-options

Also as a best practice, try to do the generateAllPoms in advance of the build. And make sure you're running the same or newer patch in your CI.

And since you're asking help for TMC, I'd suggest checking out http://community.talend.com and getting touch with Talend Support for similar questions.

Related