diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6a0e82d8..00000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -os: linux -dist: focal -language: java -jdk: openjdk17 -install: true -script: ./travis.sh - -addons: - sonarcloud: - organization: "jborgers-github" - token: - secure: "U299FqcJAMNfblrZF8R/ivqRk7KNdSOdcyWI4h5dgOLlQHj+HHrF2GJB2fOVeaB53snOkCycM/ZQgqTLlS1PU2NUca3TroNXj6jpNK1Erb/TXqFMKK+rmsN+hcxudDYGnQFIVnWy4lsg72jlK3Qvktt0XyfuYjMqQbsp3zwhlxw=" - -env: - - TEST=ci -# - TEST=plugin SQ_VERSION=LATEST_RELEASE[6.7] SJ_VERSION=LATEST_RELEASE[5.14] -# - TEST=plugin SQ_VERSION=LATEST_RELEASE[7.9] SJ_VERSION=DEV -# - TEST=plugin SQ_VERSION=LATEST_RELEASE[8.2] SJ_VERSION=DEV -# - TEST=plugin SQ_VERSION=LATEST_RELEASE[8.9] SJ_VERSION=DEV - - TEST=plugin SQ_VERSION=LATEST_RELEASE[9.8] SJ_VERSION=DEV - - TEST=plugin SQ_VERSION=LATEST_RELEASE[9.9] SJ_VERSION=DEV - - TEST=plugin SQ_VERSION=LATEST_RELEASE[10.1] SJ_VERSION=DEV - - TEST=plugin SQ_VERSION=DEV SJ_VERSION=DEV - - TEST=javadoc - -cache: - directories: - - $HOME/.m2 - -notifications: - email: - - jborgers@jpinpoint.com - - peter.paul.bakker@stokpop.nl diff --git a/README.md b/README.md index d4012fc7..413eb00c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -# SonarQube PMD Plugin [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sonarsource.pmd/sonar-pmd-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sonarsource.pmd/sonar-pmd-plugin) - [![Build Status](https://api.travis-ci.org/jborgers/sonar-pmd.svg?branch=master)](https://travis-ci.org/jborgers/sonar-pmd) - [![SonarStatus](https://sonarcloud.io/api/project_badges/measure?project=org.sonarsource.pmd%3Asonar-pmd&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.sonarsource.pmd%3Asonar-pmd) - [![SonarStatus](https://sonarcloud.io/api/project_badges/measure?project=org.sonarsource.pmd%3Asonar-pmd&metric=coverage)](https://sonarcloud.io/dashboard?id=org.sonarsource.pmd%3Asonar-pmd) +# SonarQube PMD Plugin + +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sonarsource.pmd/sonar-pmd-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sonarsource.pmd/sonar-pmd-plugin) +![Build Status](https://github.com/jborgers/sonar-pmd/actions/workflows/build.yml/badge.svg) + Sonar-PMD is a plugin that provides coding rules from [PMD](https://pmd.github.io/) for use in SonarQube. Starting April 2022, the project has found a new home. We, [jborgers](https://github.com/jborgers) and [stokpop](https://github.com/stokpop), diff --git a/RELEASE.md b/RELEASE.md index 670abc3c..448213cc 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,19 +1,29 @@ -To release a build +# Create release -- change all `x.y.z-SNAPSHOT` to `x.y.z` in all poms -- change tag `HEAD` to `x.y.z` in scm tag in parent pom -- finish and update `CHANGELOG.md`, update `..master` to `..x.y.z` -- commit and push with comment "Release x.y.z" -- `git tag x.y.z` +To create a new release, set git tag with new version number and push the tag. +The Github Actions `release.yml` will build and release to Github actions and Maven Central. + +Make sure that all commits have been pushed and build +with `build.yml` workflow before setting and pushing the tag. + +Steps: +- create release notes in `CHANGELOG.md`, update `..master` to `..x.y.z` +- commit `CHANGELOG.md` +- `git tag x.y.z` - `git push --tags` -- use github action `release` to deploy to maven central -- release staging repo in Sonatype ui -- change all `x.y.z` in all poms to `x.y.z+1-SNAPSHOT` -- change tag `x.y.z` in scm tag in parent pom to `HEAD` + +The release workflow will be triggered, using the git tag for `-Drevision=`. + +- manually release staging repo in Sonatype (https://central.sonatype.com/) +- manually change Github actions release from draft to final here: [releases](https://github.com/jborgers/sonar-pmd/releases) + +Next prepare for next SNAPSHOT: + +- change `revision` property in `x.y.z+1-SNAPSHOT` in parent pom - prepare `CHANGELOG.md` for `x.y.z+1-SNAPSHOT` -- commit and push with comment "Prepare for release x.y.z+1-SNAPSHOT" +- commit and push with comment "Prepare release x.y.z+1-SNAPSHOT" -When release fails before "release staging in Sonatype ui" +When release fails before "release staging in Sonatype" - drop staging repo - `git tag -d x.y.z` or delete tag in IntelliJ - `git push origin :refs/tags/x.y.z` or delete tag in context menu, delete remotes @@ -21,9 +31,6 @@ When release fails before "release staging in Sonatype ui" In GitHub: -- create release from tag via Actions -- update release notes with `CHANGELOG.md` contents -- download `sonar-pmd-plugin-x.y.z.jar` and upload in release notes - close milestone `x.y.z` - create new milestone `x.y.z+1` diff --git a/travis.sh b/travis.sh deleted file mode 100755 index 0ecf81f0..00000000 --- a/travis.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -case "$TEST" in - -ci) - mvn test sonar:sonar -DskipTestProjects=true - ;; - -plugin) - - # Unset environment settings defined by Travis that will collide with our integration tests - unset SONARQUBE_SCANNER_PARAMS SONAR_TOKEN SONAR_SCANNER_HOME - - # Run integration tests - mvn verify -Dtest.sonar.version=${SQ_VERSION} -Dtest.sonar.plugin.version.java=${SJ_VERSION} - ;; - -javadoc) - # Create JavaDocs to check for problems with JavaDoc generation - mvn javadoc:javadoc -DskipTests - ;; - -*) - echo "Unexpected TEST mode: $TEST" - exit 1 - ;; - -esac