lately, I have spent a lot of time setting up GitLab pipelines. A lot of those time spent, now looking back, are actually wasted in the end, because turned out they’re bugs with gitlab itself.
- no matching artifacts
somehow, even with gitlab 14.8, this issue still exists. to make things even bizarre, it always works from the main (develop), however, on and off would throw alert "no matching files" from any merge request pipeline. this is the setup: build: stage: build script: - mvn package - find . -type f -path '*/target/*.jar' # this shows the list of jars artifacts: paths: - ./*/target/*.jar' # this only works in main branch, breaks on and off from other pipelines
2. the way how gitlab handles timestamp in artifacts
I have tripped over and spent a lot of time on this as well. But seems like the completion solution, is a combination of 1) use new timestamp for *.class 2) disable the useIncrementalCompilation at the moment, `useIncrementalCompilation` seems like only working from the pom.xml configuration, not through the command line. Also it would be good if there is a parameter from gitlab to configure whether to reload the artifacts, or keep the existing timestamps. ``` build: stage: build image: maven:3.6-jdk-11 script: - 'mvn test-compile' - *prepare-build-artifact except: - tags artifacts: paths: - target.zip reload: true ```