gitlab issues

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.

  1. 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

https://gitlab.com/gitlab-org/gitlab-foss/-/issues/15530#note_889058639

https://gitlab.com/gitlab-org/gitlab/-/issues/36706#note_888550944

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
```

https://gitlab.com/gitlab-org/gitlab/-/issues/234078#note_885704266

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s