Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mayo
Contributor III
Contributor III

Jenkins CI build job, missing reference project

With Jenkins my build job (generate sources) successfully downloads a BitBucket repository, however eventually the job gives the following error when invoking CI Builder:

[INFO] exception : org.talend.commandline.client.command.CommandStatusWrapException: org.talend.commons.exception.LoginException: Missing the reference project for "SANDBOX", please make sure the reference projects must be existed in same workspace too.

 

What's the proper way to handle reference projects in my Jenkin's build job?  

 

Build

Talend 6.3.1

Jenkins 2.60.2

Maven 3.5.0

Nexus 2.11.3

 

Error stack



To see the whole post, download it here
Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Tested this, i can reproduce it and fix it. The issue here is in fact that when you have the project defined like below:

  • MAIN: 
    http://localhost:8181/git/r/MAIN.git
  • REFERENCE: 
    http://localhost:8181/git/r/REFERENCE.git

Even if you defined the two URL in your buildSource definition, see the screenshot attached. With that only one project
is checked, I had to manually copy paste the second project missing. To avoid this issue related to 
jenkins i had to use one single repository for the two projects: 

http://localhost:8181/git/r/tac631.git

 


ref-main-git-ci.png

View solution in original post

5 Replies
Anonymous
Not applicable

Tested this, i can reproduce it and fix it. The issue here is in fact that when you have the project defined like below:

  • MAIN: 
    http://localhost:8181/git/r/MAIN.git
  • REFERENCE: 
    http://localhost:8181/git/r/REFERENCE.git

Even if you defined the two URL in your buildSource definition, see the screenshot attached. With that only one project
is checked, I had to manually copy paste the second project missing. To avoid this issue related to 
jenkins i had to use one single repository for the two projects: 

http://localhost:8181/git/r/tac631.git

 


ref-main-git-ci.png
mayo
Contributor III
Contributor III
Author

Thank you for the response eTechman!

So when you say you had to use one single repo for 2 projects, does this mean you created 1 repository in BitBucket and referenced it from 2 different projects within TAC? Or does this mean there's some way within BitBucket to create a git URL reference that points to 2 different BitBucket repos?
mayo
Contributor III
Contributor III
Author

Submitted a support ticket and they gave some great advice.

 

Created By: Evan Teitelbaum (8/8/2017 11:27 AM)
Hello Al, 

Jenkins can only checkout one project at a time and this is why you are getting this issue. The solution here is to checkout the project so that under the workspace folder you have the project folder for the main and the reference project. Or you can do a git checkout anywhere else and then copy the project folder over into the CI's cmdline workspace folder. Then after you build again after this step please let us know if you still have this issue. 


I did a checkout in another directory and copied it to the other project.  You have to make sure you copy the reference project root to match the original talend project, the parent folder of all the talend-generated folders.  I ran my Jenkins job and it built successfully.

 

I will now attempt to automate this into a pre-build script.

 

mayo
Contributor III
Contributor III
Author

Accepted eTechman answer as solution since he had the same advice, to copy-paste the project.
mayo
Contributor III
Contributor III
Author

Successfully created a batch script that is called as a pre-build step that will

  • clone the reference project repository into a temp directory
  • move the folder into the workspace of the original Talend project
  • clean-up of temp directory