Skip to content

Commit

Permalink
Suppress the use of mirrors
Browse files Browse the repository at this point in the history
To mitigate the issue with Eclipse mirrors that permanently redirect to themselves.
  • Loading branch information
thahnen committed Nov 26, 2024
1 parent 0b53296 commit f2deac8
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 12 deletions.
53 changes: 42 additions & 11 deletions .cirrus.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ build_task:
build_script: |
base64 --decode "${SM_CLIENT_CERT_FILE}.b64" > "${SM_CLIENT_CERT_FILE}"
source cirrus-env BUILD-PRIVATE
.cirrus/regular_mvn_build_deploy_analyze -Dmaven.test.skip=true -Dsonar.skip=true -Dcyclonedx.skip=false
.cirrus/regular_mvn_build_deploy_analyze \
-Declipse.p2.mirrors=false \
-Dmaven.test.skip=true \
-Dsonar.skip=true \
-Dcyclonedx.skip=false
site_artifacts:
paths: org.sonarlint.eclipse.site/target/org.sonarlint.eclipse.site-*.zip
type: application/zip
Expand Down Expand Up @@ -160,8 +164,11 @@ validate_task:
metacity --sm-disable --replace &
sleep 10 # give metacity some time to start
source cirrus-env QA
mvn -B -e -V org.jacoco:jacoco-maven-plugin:prepare-agent verify -Pcoverage \
-Djacoco.append=true -Djacoco.destFile=${CIRRUS_WORKING_DIR}/ut-coverage.exec
mvn -B -e -V org.jacoco:jacoco-maven-plugin:prepare-agent verify \
-Pcoverage \
-Declipse.p2.mirrors=false \
-Djacoco.append=true \
-Djacoco.destFile=${CIRRUS_WORKING_DIR}/ut-coverage.exec
/etc/init.d/xvfb stop
cleanup_before_cache_script: cleanup_maven_repository
always:
Expand Down Expand Up @@ -211,7 +218,11 @@ qa_connectedModeSonarQube_task:
set -euo pipefail
source cirrus-env QA
source .cirrus/set_maven_build_version $BUILD_NUMBER
mvn -B -e -V dependency:unpack -Dtycho.mode=maven -Dartifact=org.sonarsource.sonarlint.eclipse:org.sonarlint.eclipse.site:${PROJECT_VERSION}:zip -DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-repository
mvn -B -e -V dependency:unpack \
-Declipse.p2.mirrors=false \
-Dtycho.mode=maven \
-Dartifact=org.sonarsource.sonarlint.eclipse:org.sonarlint.eclipse.site:${PROJECT_VERSION}:zip \
-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-repository
prepare_background_script: |
set -euo pipefail
/etc/init.d/xvfb start
Expand All @@ -224,11 +235,13 @@ qa_connectedModeSonarQube_task:
cd its/
mvn -B -e -V org.jacoco:jacoco-maven-plugin:prepare-agent verify \
-P coverage,\!standaloneMode,\!connectedModeSc \
-Declipse.p2.mirrors=false \
-Dtarget.platform=latest-java-17_e431 \
-Dtycho.localArtifacts=ignore \
-Dsonarlint-eclipse.p2.url="file://${CIRRUS_WORKING_DIR}/staged-repository" \
-Dsonar.runtimeVersion=${SQ_VERSION} \
-Djacoco.append=true -Djacoco.destFile=${CIRRUS_WORKING_DIR}/it-coverage.exec
-Djacoco.append=true \
-Djacoco.destFile=${CIRRUS_WORKING_DIR}/it-coverage.exec
mv ${CIRRUS_WORKING_DIR}/it-coverage.exec ${CIRRUS_WORKING_DIR}/it-coverage-${QA_CATEGORY}.exec
cleanup_before_cache_script: cleanup_maven_repository
always:
Expand Down Expand Up @@ -278,7 +291,11 @@ qa_connectedModeSonarCloud_task:
set -euo pipefail
source cirrus-env QA
source .cirrus/set_maven_build_version $BUILD_NUMBER
mvn -B -e -V dependency:unpack -Dtycho.mode=maven -Dartifact=org.sonarsource.sonarlint.eclipse:org.sonarlint.eclipse.site:${PROJECT_VERSION}:zip -DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-repository
mvn -B -e -V dependency:unpack \
-Declipse.p2.mirrors=false \
-Dtycho.mode=maven \
-Dartifact=org.sonarsource.sonarlint.eclipse:org.sonarlint.eclipse.site:${PROJECT_VERSION}:zip \
-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-repository
prepare_background_script: |
set -euo pipefail
/etc/init.d/xvfb start
Expand All @@ -292,10 +309,12 @@ qa_connectedModeSonarCloud_task:
env SONARCLOUD_IT_PASSWORD=$SONARCLOUD_IT_PASSWORD \
mvn -B -e -V org.jacoco:jacoco-maven-plugin:prepare-agent verify \
-P coverage,\!standaloneMode,\!connectedModeSq \
-Declipse.p2.mirrors=false \
-Dtarget.platform=latest-java-21 \
-Dtycho.localArtifacts=ignore \
-Dsonarlint-eclipse.p2.url="file://${CIRRUS_WORKING_DIR}/staged-repository" \
-Djacoco.append=true -Djacoco.destFile=${CIRRUS_WORKING_DIR}/it-coverage.exec
-Djacoco.append=true \
-Djacoco.destFile=${CIRRUS_WORKING_DIR}/it-coverage.exec
mv ${CIRRUS_WORKING_DIR}/it-coverage.exec ${CIRRUS_WORKING_DIR}/it-coverage-sc.exec
cleanup_before_cache_script: cleanup_maven_repository
always:
Expand Down Expand Up @@ -351,7 +370,11 @@ qa_standaloneMode_task:
set -euo pipefail
source cirrus-env QA
source .cirrus/set_maven_build_version $BUILD_NUMBER
mvn -B -e -V dependency:unpack -Dtycho.mode=maven -Dartifact=org.sonarsource.sonarlint.eclipse:org.sonarlint.eclipse.site:${PROJECT_VERSION}:zip -DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-repository
mvn -B -e -V dependency:unpack \
-Declipse.p2.mirrors=false \
-Dtycho.mode=maven \
-Dartifact=org.sonarsource.sonarlint.eclipse:org.sonarlint.eclipse.site:${PROJECT_VERSION}:zip \
-DoutputDirectory=${CIRRUS_WORKING_DIR}/staged-repository
prepare_background_script: |
set -euo pipefail
/etc/init.d/xvfb start
Expand All @@ -364,10 +387,12 @@ qa_standaloneMode_task:
cd its/
mvn -B -e -V org.jacoco:jacoco-maven-plugin:prepare-agent verify \
-P coverage,\!connectedModeSq,\!connectedModeSc \
-Declipse.p2.mirrors=false \
-Dtarget.platform=${TARGET_PLATFORM} \
-Dtycho.localArtifacts=ignore \
-Dsonarlint-eclipse.p2.url="file://${CIRRUS_WORKING_DIR}/staged-repository" \
-Djacoco.append=true -Djacoco.destFile=${CIRRUS_WORKING_DIR}/it-coverage.exec
-Djacoco.append=true \
-Djacoco.destFile=${CIRRUS_WORKING_DIR}/it-coverage.exec
mv ${CIRRUS_WORKING_DIR}/it-coverage.exec ${CIRRUS_WORKING_DIR}/it-coverage-${TARGET_PLATFORM}.exec
cleanup_before_cache_script: cleanup_maven_repository
always:
Expand Down Expand Up @@ -446,8 +471,14 @@ sonarqube_task:
unzip jacoco_it_sc.zip -d ${CIRRUS_WORKING_DIR}/org.sonarlint.eclipse.core.tests/target/
source cirrus-env QA
.cirrus/regular_mvn_build_deploy_analyze \
-P-deploy-sonarsource,-release,-sign -Dmaven.install.skip=true -DskipTests -Dmaven.deploy.skip=true \
-Pcoverage -Djacoco.append=true -Dsonar.coverage.jacoco.xmlReportPaths=${CIRRUS_WORKING_DIR}/org.sonarlint.eclipse.core.tests/target/site/jacoco-aggregate/jacoco.xml
-P-deploy-sonarsource,-release,-sign \
-Declipse.p2.mirrors=false \
-Dmaven.install.skip=true \
-DskipTests \
-Dmaven.deploy.skip=true \
-Pcoverage \
-Djacoco.append=true \
-Dsonar.coverage.jacoco.xmlReportPaths=${CIRRUS_WORKING_DIR}/org.sonarlint.eclipse.core.tests/target/site/jacoco-aggregate/jacoco.xml
/etc/init.d/xvfb stop
cleanup_before_cache_script: cleanup_maven_repository
on_failure:
Expand Down
4 changes: 3 additions & 1 deletion .cirrus.ibuilds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ qa_ibuilds_task:
set -euo pipefail
source cirrus-env QA
source .cirrus/set_maven_build_version "$BUILD_NUMBER"
mvn -B -e -V package
mvn -B -e -V package \
-Declipse.p2.mirrors=false
prepare_background_script: |
set -euo pipefail
/etc/init.d/xvfb start
Expand All @@ -71,6 +72,7 @@ qa_ibuilds_task:
cd its/
mvn -B -e -V verify \
-P \!connectedModeSq,\!connectedModeSc \
-Declipse.p2.mirrors=false \
-Dtarget.platform=ibuilds \
-Dtycho.localArtifacts=ignore \
-Dsonarlint-eclipse.p2.url="file://${CIRRUS_WORKING_DIR}/org.sonarlint.eclipse.site/target/repository"
Expand Down

0 comments on commit f2deac8

Please sign in to comment.