CI: basic gradle pipeline
PR adds basic functional pipeline with working tests using docker in docker.
A major limitation to execution speed is that tests can not be run in parallel, main causes:
- port conflict for KeyCloak as the port mapping is fixed in properties (needed for injection of admin client)
- some dependencies apparently get shared and ids/values/datasets etc.seem to overlap during tests, causing assertion errors
Currently the strategy is as follows:
-
build-cache
only runs when triggered through definition ofBUILD_CACHE
variable or when any gradle related files are changed. This job will create the cache again from scratch (does not pull in old cache). Cache uses a key and fallback key: the main key is the branch name, the fallback key is the default branch name. New branches which change dependencies will not affect caches of other jobs this way and those that keep dependencies the same will just use the default cache. -
build-test
has two instructions, first assemble the jars and testClasses with parallel execution, the run the tests synchronously. This job only pulls the cache. It creates artifacts from the assembled jars which it passes on to the package stage -
package
creates container images. Defaulting to"$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
and"$CI_COMMIT_REF_SLUG"
so fornext
branch we create a newnext
image on every succesful push and anext-<commithash>
image. When pushing a tag we default to this tag instead.
This pipeline will be improved in the future but can suffice to start our continuous integration
Some changes have been made to properties files as well as gradle wrapper update (8.7) so best someone reviews these briefly.