Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra: complete migration to CircleCI #998

Merged
merged 1 commit into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .ci/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ sevntu-checks)
cd sevntu-checks
mvn -e --no-transfer-progress -Pcoverall install
mvn -e --no-transfer-progress verify -Pno-validations,selftesting
if [[ $TRAVIS == 'true' ]]; then
mvn -e --no-transfer-progress -Pcoverall jacoco:report coveralls:report
fi
# until https://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/999
# if [[ $CI == 'true' ]]; then
# mvn -e --no-transfer-progress -Pcoverall jacoco:report coveralls:report
# fi
;;

all-sevntu-checks-contribution)
Expand Down Expand Up @@ -117,7 +118,10 @@ sonarqube)
# SONAR_TOKEN=xxxxxx ./.ci/validation.sh sonarqube
# execution on local for non-master:
# SONAR_TOKEN=xxxxxx PR_NUMBER=xxxxxx PR_BRANCH_NAME=xxxxxx ./.ci/validation.sh sonarqube
checkForVariable "SONAR_TOKEN"
if [ -z "$SONAR_TOKEN" ]; then
echo "SONAR_TOKEN is not set."
exit 1
fi

if [[ $PR_NUMBER =~ ^([0-9]+)$ ]]; then
SONAR_PR_VARIABLES="-Dsonar.pullrequest.key=$PR_NUMBER"
Expand All @@ -126,20 +130,22 @@ sonarqube)
echo "SONAR_PR_VARIABLES: ""$SONAR_PR_VARIABLES"
fi

cd sevntu-checks
export MAVEN_OPTS='-Xmx2000m'
# until https://github.com/checkstyle/checkstyle/issues/11637
# shellcheck disable=SC2086
mvn -e --no-transfer-progress -Pno-validations clean package sonar:sonar \
mvn -e --no-transfer-progress clean package sonar:sonar \
$SONAR_PR_VARIABLES \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login="$SONAR_TOKEN" \
-Dsonar.projectKey=org.checkstyle:sevntu \
-Dsonar.organization=checkstyle
-Dsonar.organization=checkstyle \
-Dmaven.test.failure.ignore=true \
-Dcheckstyle.ant.skip=true -Dpmd.skip=true
echo "report-task.txt:"
cat target/sonar/report-task.txt
echo "Verification of sonar gate status"
export SONAR_API_TOKEN=$SONAR_TOKEN
.ci/sonar-break-build.sh
../.ci/sonar-break-build.sh
;;

git-diff)
Expand Down
11 changes: 5 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
jobs:

validate-with-maven-script:
description: "Runs a maven script using the job name as the argument."
resource_class: small
parameters:
image-name:
type: string
Expand All @@ -20,19 +20,18 @@ jobs:
- restore_cache:
name: Restore Maven repo cache
keys:
- mvn-cache-{{ checksum "pom.xml" }}
- mvn-cache-{{ checksum "sevntu-checks/pom.xml" }}
- run:
command: << parameters.command >>
- run:
command: |
./.ci/validation.sh git-diff
- run: ./.ci/validation.sh git-diff
- save_cache:
name: Save Maven repo cache
key: mvn-cache-{{ checksum "pom.xml" }}
key: mvn-cache-{{ checksum "sevntu-checks/pom.xml" }}
paths:
- .m2

sonarqube:
resource_class: small
docker:
- image: checkstyle/jdk-11-groovy-git-mvn:11.0.13__3.0.9__2.25.1__3.6.3

Expand Down
94 changes: 0 additions & 94 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.textile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
h3. Information "!https://secure.travis-ci.org/sevntu-checkstyle/sevntu.checkstyle.png!":https://app.travis-ci.com/github/sevntu-checkstyle/sevntu.checkstyle/builds !https://coveralls.io/repos/sevntu-checkstyle/sevntu.checkstyle/badge.svg?branch=master&service=github(Coverage Status)!:https://coveralls.io/github/sevntu-checkstyle/sevntu.checkstyle?branch=master !https://sonarcloud.io/api/project_badges/measure?project=com.github.sevntu-checkstyle%3Asevntu-checks&metric=sqale_index!:https://sonarcloud.io/dashboard?id=com.github.sevntu-checkstyle%3Asevntu-checks
h3. Information !https://circleci.com/gh/sevntu-checkstyle/sevntu.checkstyle/tree/master.svg?style=svg!:https://circleci.com/gh/sevntu-checkstyle/sevntu.checkstyle/tree/master !https://coveralls.io/repos/sevntu-checkstyle/sevntu.checkstyle/badge.svg?branch=master&service=github(Coverage Status)!:https://coveralls.io/github/sevntu-checkstyle/sevntu.checkstyle?branch=master !https://sonarcloud.io/api/project_badges/measure?project=com.github.sevntu-checkstyle%3Asevntu-checks&metric=sqale_index!:https://sonarcloud.io/dashboard?id=com.github.sevntu-checkstyle%3Asevntu-checks

sevntu-checks: !https://img.shields.io/maven-central/v/com.github.sevntu-checkstyle/sevntu-checks.svg?label=Maven%20Central!:https://search.maven.org/search?q=g:%22com.github.sevntu-checkstyle%22%20AND%20a:%22sevntu-checks%22
sevntu-checkstyle-idea-extension:!https://img.shields.io/maven-central/v/com.github.sevntu-checkstyle/sevntu-checkstyle-idea-extension.svg?label=Maven%20Central!:https://search.maven.org/search?q=g:%22com.github.sevntu-checkstyle%22%20AND%20a:%22sevntu-checkstyle-idea-extension%22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<!-- other images that do not support newer curl commands until
https://github.com/checkstyle/checkstyle/issues/12451 -->
<suppress id="properCurlCommand" files="bump-cs-version\.yml"/>
<suppress id="properCurlCommand" files="sonar-break-build\.sh"/>

<!-- numberOfTestCasesInXpath does not apply to sevntu -->
<suppress id="numberOfTestCasesInXpath" files=".*" />
Expand Down