Jenkins and ABE

Hi,

We are on 9.10. We are planning to setup Automatic Build and Deployment for webMethods.
We have Git repo configured.
I’m able to do a check-out from Git and able to create .acdl file also but later it fails with below error

[DEBUG] [17 Aug 2016 10:27:21,790] (RepoServerAlias.java:listComposites:348)
[exec] Error invoking Service wm.deployer.gui.UIFlatFile:listComposites on server localhost:5555
[exec]
[exec] [ERROR] [17 Aug 2016 10:27:21,790] (RepoServerAlias.java:listComposites:351)
[exec] Error retrieving repo objects from Repo Server DEMO_Repository : Repository Index is missing. Please create the index for the Repository.

When we click on ‘crete Index’ button on IS Admin page and then re-run the Jenkins, we are getting below error.
[DEBUG] [17 Aug 2016 09:22:29,996] (RepoServerAlias.java:listComposites:329)
[exec] Error invoking Service wm.deployer.gui.UIRepository:listComposites on server localhost:5555
[exec]
[exec] [ERROR] [17 Aug 2016 09:22:29,996] (RepoServerAlias.java:listComposites:332)
[exec] Error getting list of composites from Integration Server Alias DEMO_Repository

Attached is the Jenkins Console output and projectAutomatorReport.xml.
Please suggest.

Thanks,
Monica
projectAutomatorReport.xml (1.1 KB)
JenkinsConsoleOutput.txt (8.41 KB)

Hi Monica!
From the message I’d guess you don’t have the repo ready.
One thing is to have assets in GIT, another thing is to create a build using ABE - that is the repository. Index is automatically created when you build with ABE.
ABE takes the source directory (assets you should have in GIT), zip them etc and prepares this “repository index”.

ProjectAutomator is just a next step and it is there for preparing “deployer project” which you would/could otherwise create manually through Integration sever/Solutions/Deployer. One option is to take repository as a source - and repository is exactly that ABE-built stuff…

Jenkins can be just a orchestration tool for running those tools, but it also can do much more - like store the repository of builds, promote them etc. That depends on how complex you set it up.

Let me know if that helped…

Thanks Lukas.

I’m able to create build successfully. Once the build is created I’m able to see _assets.obj, Zipfile and .acdl file created.
After creating build , I’m facing issues in target ‘CreateProject’.

Below is the Jenkins Console Output after creating build:

createNewBuildNumber:

createBuildNumber:
[propertyfile] Updating property file: /opt/softwareag/common/AssetBuildEnvironment/master_build/build.number

createOutputDir:
[echo] The directory /opt/ABE/Builds/output already exists.
[echo] Started Integration Server Build…

buildIS:

validate:

build:

iterate_multi_project_folders:

build_projects:

generate-composites:
[java] Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=128M; support was removed in 8.0
[java] [8/18/16 5:33 AM][MESSAGE] ispackage.ispackage: Starting to read packages Test1,replicate,.git.
[java] [8/18/16 5:33 AM][MESSAGE] ispackage.ispackage: Starting to read package [Test1].
[java] [8/18/16 5:33 AM][WARNING] ispackage.Test1: Configuration data is missing. Cannot export ACL information for package Test1
[java] [8/18/16 5:33 AM][MESSAGE] ispackage.ispackage: Completed creation of ACDL and binary for a package [Test1].
[java] [8/18/16 5:33 AM][MESSAGE] ispackage.ispackage: Starting to read package [replicate].
[java] [8/18/16 5:33 AM][MESSAGE] ispackage.ispackage: [replicate] is not an Integration Server package.
[java] [8/18/16 5:33 AM][MESSAGE] ispackage.ispackage: Starting to read package [.git].
[java] [8/18/16 5:33 AM][MESSAGE] ispackage.ispackage: [.git] is not an Integration Server package.
[java] [8/18/16 5:33 AM][MESSAGE] ispackage.ispackage: Completed all packages.

iterate_single_project_folders:
[echo] Integration Server Build complete…

createIndex:
[createIndex] RepoIndexer is processing composite Test1 from composite file /opt/ABE/Builds/output/IS/Test1.acdl

BUILD SUCCESSFUL
Total time: 2 seconds
Finished: SUCCESS

Please suggest.

Thanks,
Monica

I’d need to see your ABE & ProjectAutomator config files and see what you’re exactly trying to do.
Also you should have only real packages you’re trying to build in your ABE “code source directory”.
Did you try adding and using this repository in IS/solutions/deployer and MANUALLY create new project of type “repository”, adding new Deployment Set linked to this repo, and browsing through your IS packages within that build/repo and adding them to your deployment set?
Once it works manually you can start automatizing it…

Thanks Lukas.

When I’m trying to create project manually from IS/solutions/deployer using repository based type I’m unable to see the list of assets inside the repo. Attached screenshot for reference.

But when I run jenkins build.xml, I have assets downloaded from repo to builds/output folder.

Please suggest.

Thanks,
Monica

Hi All,

When I try running the Jenkins I get below error while doing a checkout.


CheckOut:
[taskdef] Could not load definitions from resource org/tigris/subversion/svnant/svnantlib.xml. It could not be found.

BUILD FAILED
/opt/softwareag/common/AssetBuildEnvironment/master_build/build.xml:73: The following error occurred while executing this line:
/opt/softwareag/common/AssetBuildEnvironment/master_build/build-source-checkout.xml:42: Problem: failed to create task or type svnSetting

Can anyone please share the sample build-source-checkout.xml file for SVN. And also please let me know if I’m missing any configurations.
Attached is the screenshot of jars used.

Thanks,
Monica

Hello Monica,

Is there any reason why you are using build-source-checkout.xml? If you are using jenkins you can use the SVN plugin itself.

I can see the issue is related to jars.

If you still want to use this, you also need to place svnant.jar.

Hi Srikanth,

I have Subversion Plug-in installed on Jenkins.
When I give the SVN URL svn://172.29.223.229:3690/C:/Test/trunk, it says repository URL is invalid. Any clue on this.

Hence I was trying to use build-source-checkout.xml file

Thanks,
Monica

Yes, I do…!

SVN will have another URL, that is http/https url. Can you try with that?

Hi Srikanth,

We do not have svn repo configured for http/https. We have the one with svn://XXX.
Does Jenkins work only with of type http/https repo.?

Thanks,
Monica

Hello Monica,

It does work with SVN URL as well.

Can you refer the above link?

Can you ping your SVN server from the Jenkins server?

Hi Srikanth,

Now I’m able to connect to repo from Jenkins. I removed 3690 port from URL and then it worked.
Now I’m getting error like below:
Error retrieving repo objects from Repo Server DEMO_Repository : Repository Index is missing. Please create the index for the Repository.
When I try creating index manually from IS page it says “/opt/ABE/Builds/output/IS/_index (Permission denied)”
I have set permission to /opt/ABE/Builds/output recursively. But when a new asset is created in this, the permission is not taking affect.

Thanks,
Monica

Hello Monica,

This is because, your jenkins process is invoking the ABE scripts to create builds. Now the builds and indexes are created and owned by jenkins. When you invoke the deployer scrips from jenkins, it invokes the deployer process which does not have access to “/opt/ABE/Builds/output/IS/_index”.

Can you run ll command and verify the permissions?

Hi Srikanth,

I have set rwx permission to /opt/ABE/Builds/output folder recursively for user jenkins. This permission apply to assets which are currently in this directory. But when I run jenkins again, it builds assets freshly and the permission which was applied is not affecting these new build files.

Thanks,
Monica

Hello Monica,

Yes, this is expected behavior.

You need to execute the shell command "chmod -R 777 /opt/ABE/Builds/output " after the build step from jenkins.

Thanks Srikanth,

I have added the step but it fails with below error
“chmod: changing permissions of ‘/opt/ABE/Builds/output’: Operation not permitted” since the owner of this folder is root and we are executing chmod from jenkins.
/opt/ABE/Builds/output- This folder needs to be accessed from Deployer as well as Jenkins. How do we manage this.

Monica

Monica,

Owner should not be root but he should be jenkins. If you set to every one Deployer will be able to access the folder.

Can you refer to http://techcommunity.softwareag.com/documents/portlet_file_entry/10157/webMethods_Automated_Build_and_Deployment_Guide_with_Jenkins_v01.pdf/c22ebc67-8ba3-4979-97fe-2f3192c0e565?status=0
section 8.2?

Hi Srikanth,

I’m too facing similar issue.

when I run build.bat in ABE it is generating compositeIndex in output builds folder folder .with reference to your webMethods Automated Build and Deployment Guide with Jenkins document it must generate build in CURRENT_BUILDS directory,but it is generating only compositeIndex in it .

FYI - I ran build.bat manually by placing a IS package(ex: acme.zip)in build.source.dir - JENKINS_WORKSPACE

Please help me how get the build file(acme.zip) file after running build.bat in Deployer Repository

Hello,

You should not place archive files (acme.zip) but you should place the plain IS packages (acme directory).