[FOLIO-2267] Jenkins pipeline to deploy backend module preview artifacts Created: 17/Sep/19  Updated: 03/Jun/20  Resolved: 08/Oct/19

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

Type: Task Priority: P2
Reporter: Ian Hardy Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: ci, devops, platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
blocks UXPROD-2066 CI architecture and process to allow ... Closed
is blocked by FOLIO-2275 create a docker registry in nexus for... Closed
Sprint: CP: sprint 73
Story Points: 3
Development Team: Core: Platform

 Description   

When a pr is created on a backend module, a jenknis pipeline needs to:

  • build the docker image
  • create a kubernetes deployment for the image in the preview namespace
  • post a deployment descriptor to the preview okapi

These modules can use the same module db as the snapshot/release modules.

How the image is built and deployed will depend on the outcome of FOLIO-2266 Closed . Much of this should be able to re-use or at least build on existing jenkins work.



 Comments   
Comment by Ian Hardy [ 01/Oct/19 ]

Will need some way to get the module descriptor registered on the preview okapi. Current kubeDeploy pipeline for backend modules relies on getting the MD from the registry. Could either have a registry for preview artificats, or just post directly to the preview okapi. I'm leaning towards posting directly to preview okapi. Thinking if the doKubeDeploy variable on the buildMvn pipline is set to true then post MD to preview okapi. Open to suggestions of course.

Comment by Ian Hardy [ 07/Oct/19 ]

Added pipeline to vars section to post preview MD, re-used kuebDeploy to deploy to kubernetes, and extended buildJavaDocker to publish preview image.

For versioning, I'm appending the build number and the pr number for backend modules: mod-courses-0.0.1-SNAPSHOT.4.11. Would like to confirm versioning before merging.

There's a note in UXPROD-2066 Closed about versioning:

The snapshot artifacts will use a standard preRelease versioning: 1.2.3-alpha.1, 1.2.3-alpha.2, ...

Not sure how to achieve a sequence of alpha.1,2,3 between PRs since build numbers reset from PR to PR. John Malconianwhat do you think of using pr#.build# ?

Comment by John Malconian [ 07/Oct/19 ]

Ian Hardy My recommendation for versioning is the following is similar to what you describe above. I would just add 'pr-' to make it clearer, e.g. mod-courses-0.0.1-SNAPSHOT.pr-4.11, with the caveat that it's compliant with SemVer practices which I think it is. I think the UXPROD-2066 Closed references to snapshot artifacts, 'alpha', applies to NPM artifacts only.

Comment by Ian Hardy [ 08/Oct/19 ]

Thank you, ended up w/just the numbers, mod-courses-0.0.1-SNAPSHOT.4.11. Adding in pr- didn't end up complying w/okapi's semvar check.

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