[FOLIO-2664] Build mod-ldp Created: 29/Jun/20  Updated: 03/Aug/20  Resolved: 24/Jul/20

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Story Priority: TBD
Reporter: Ian Hardy Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to FOLIO-2711 Deploy mod-ldp Closed
Sprint: DevOps: sprint 92
Development Team: FOLIO DevOps

 Description   

Publish to folio repo, and docker hub:

https://github.com/library-data-platform/mod-ldp



 Comments   
Comment by Ian Hardy [ 29/Jun/20 ]

Hi Roman Ruiz-Esparza and Nassib Nassar Any reason not to have this in the folio-org github organization or should it stay in library-data-project?

Comment by Nassib Nassar [ 29/Jun/20 ]

It is not FOLIO-specific and should stay in library-data-project.

Comment by Ian Hardy [ 17/Jul/20 ]

I've added the library-data-platform org on Jenkins so we can build projects from that organization. It's temporarily building anything with a config at Jenkinsfile.tst (will remove tst suffix when we're happy with the setup).

Here's the first build (failing): https://jenkins-aws.indexdata.com/job/library-data-platform/job/mod-ldp/job/test-jenkinsfile/1/console

A few questions.

1.) On the readme, the instructions specify we should use mvnw to build. What's getting added by using the wrapper. Generally it would be nice if we could use "mvn install" since thats what the Jenkins pipelines we have configured will do. Its not a problem to do something else if necessary though.

2.) I see that there's also an instruction to set an environment variable SPRING_DATASOURCE_PASSWORD. The readme says set this before building--is this necessary? Can this be set at runtime? What is the datasource that's getting set here, a FOLIO DB or an LDP DB?

Comment by Roman Ruiz-Esparza [ 17/Jul/20 ]

1) Regular mvn will work, no need to worry about mvnw
2) The datasource is a separately hosted LDP DB (Postgres). I can message you the password over Slack.

Comment by Ian Hardy [ 21/Jul/20 ]

Hi again. I noticed a couple of things in test builds that we may want to address:

  1. the namespace here is com.folio, the convention is org.folio. May want to update that
  2. Would be good to use templates to produce the descriptors. You can check out the pom.xml files of other modules to see how this is done: https://github.com/folio-org/mod-circulation/blob/master/pom.xml#L299
  3. Most other maven builds use the shade plugin to produce a "fat" jar. I gather spring does something like this for us. One other thing the shade plugin does is produce one artifact with a consistent name which is picked up by the Docker build. I tried just using a maven plugin to create a jar with a consistent name.
  4. Needs Dockerfile (I can add this)

I took a shot at addressing these on the test-jenkinsfile branch. I hesitate to mess with the pom and build details myself too much since I'm not a developer. If you get a chance, check out those changes. We can either use them or if you prefer you can address the issues above another way.

Thanks,

Ian

Comment by Ian Hardy [ 24/Jul/20 ]

Roman Ruiz-Esparza and Nassib Nassar, Thanks for your patience. Jenkins will now attempt to build any repo in the library-data-project repository with a file called "Jenkinsfile". You can rename to Jenkinsfile.xxxxx if you don't want a particular repo to build. I've resovled the webhook issue so it should notice changes to all branches now. I'll close one now.

Generated at Thu Feb 08 23:22:20 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.