javamachr / sonar-gitlab-plugin

Add to each commit GitLab in a global commentary on the new anomalies added by this commit and add comment lines of modified files
GNU Lesser General Public License v3.0
123 stars 23 forks source link

Add github actions #6

Closed jkroepke closed 3 years ago

jkroepke commented 3 years ago

If you do a release next time, the ci will create prebuilt artifacts.

jkroepke commented 3 years ago

Take a look at https://github.com/jkroepke/sonar-gitlab-plugin/actions/runs/523464100 to see this in action.

lucasoares commented 3 years ago

Seems ok to me.

@jkroepke To create the tag I suggest to create a manual github action and use maven release plugin. If you look to current artifacts, its created based on a -SNAPSHOT. I just installed the latest release artifact: image

This not good since you never know if you really have the stable version installed on sonarqube or a old SNAPSHOT.

jkroepke commented 3 years ago

Just to know, the current artifacts in my forked just created manually.

I'm using maven release plugin here, too https://github.com/adorsys/keycloak-config-cli

I guess push artifacts from a git tag should give a version without SNAPSHOT back.

Currently I'm just running maven release plugin locally. did you prefer to do this via gh actions? I could provide such an action.

javamachr commented 3 years ago

I guess action on tag created event would be the right choice. Also readme.md contains badge with link to build of original fork - might be worth replacing with action status badge.

lucasoares commented 3 years ago

@javamachr @jkroepke Yes, it should give a version without SNAPSHOT but the tag and the artifact was created manually for 4.3.0 and it has the SNAPSHOT: https://github.com/javamachr/sonar-gitlab-plugin/blob/4.3.0/pom.xml

Now the 4.3.1 has also 4.3.0-SNAPSHOT: https://github.com/javamachr/sonar-gitlab-plugin/blob/4.3.1/pom.xml

So if you run mvn package in the tag branch you will get a jar with the incorrect version.

Before a release you always should increase the version. either manually or using maven release plugin.