diggsweden / DCAT-AP-SE-Processor

GNU General Public License v3.0
9 stars 8 forks source link

Add CI for image and test #16

Closed janderssonse closed 1 year ago

janderssonse commented 1 year ago

This adds an image generation CI and mvn build pipeline for publishing the container image as a package, making it easier to use the app. The image is only built if tests are passed and on main branch. 'the build image is based on the fairly new Chainguard distroless project (please look it up, seems great), which promises small, secure base images with SBOMS available for license compliance.

To cleanly get there: dependencies were bumped maven wrapper was added dev instructions moved to sep standard file

Seem great, but how can I test this flow or see an live example? An example of this running and generating the image can be seen (for a while, will be removed when this is merge) in the fork repo:

https://github.com/janderssonse/DCAT-AP-SE-Processor/pkgs/container/dcat-ap-processor

The pipeline test and build can also be seen in action there.

@jonassodergren But as there were some version bumps, and the dockerfile changed a bit - PLEASE test that the app is still doing what I should - it seems to - but I don't know it well enough 100% to be able to say that:) So run the example docker image, and also just build locally and verify you are happy!

Last note: Upon an eventual merge to main there is still an initial chance the publishing itself will fail first time, I might need to adjust some actions allowance settings for the DIGG-organisation.

Signed-off-by: Josef Andersson josef.andersson@digg.se

jonassodergren commented 1 year ago

This is good! Will try as soon as possible. No major risk to try in main fairly immediately if it works.