Skip to content

Commit

Permalink
don't build custom plugin on axis without node (with embedded node)
Browse files Browse the repository at this point in the history
  • Loading branch information
saberduck committed Sep 19, 2023
1 parent fb989de commit 72f2391
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
26 changes: 17 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ plugin_qa_body: &PLUGIN_QA_BODY
qa_script:
- source cirrus-env QA
- source set_maven_build_version $BUILD_NUMBER
- mvn -f its/plugin/pom.xml -Dsonar.runtimeVersion=${SQ_VERSION} -B -e -V verify surefire-report:report
- mvn -f its/plugin/pom.xml -Dsonar.runtimeVersion=${SQ_VERSION} ${MVN_TEST} -B -e -V verify surefire-report:report
cleanup_before_cache_script: cleanup_maven_repository

build_task:
Expand Down Expand Up @@ -143,23 +143,30 @@ ws_scan_task:
ws_artifacts:
path: 'whitesource/**/*'

plugin_qa_task:
plugin_qa_with_node_task:
<<: *PLUGIN_QA_BODY
eks_container:
matrix:
- dockerfile: .cirrus/nodejs.jdk17.Dockerfile
docker_arguments:
NODE_VERSION: 14
- image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
dockerfile: .cirrus/nodejs.jdk17.Dockerfile
env:
SQ_VERSION: LATEST_RELEASE
MVN_TEST: ''

plugin_qa_no_node_task:
<<: *PLUGIN_QA_BODY
eks_container:
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
env:
SQ_VERSION: LATEST_RELEASE
SONARJS_ARTIFACT: multi
MVN_TEST: "-Dtest=!EslintCustomRulesTest --projects '!org.sonarsource.javascript:eslint-custom-rules-plugin'"

plugin_qa_sq_dev_task:
<<: *PLUGIN_QA_BODY
eks_container:
dockerfile: .cirrus/nodejs.jdk17.Dockerfile
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
env:
SQ_VERSION: DEV
SONARJS_ARTIFACT: multi

# Plugin QA for Windows is splint into 2 parts to make it faster
plugin_qa_win_task:
Expand Down Expand Up @@ -215,7 +222,8 @@ promote_task:
depends_on:
- ws_scan
- build_win
- plugin_qa
- plugin_qa_with_node
- plugin_qa_no_node
- plugin_qa_sq_dev
- plugin_qa_win
- ruling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,22 @@ public final class OrchestratorStarter
implements BeforeAllCallback, ExtensionContext.Store.CloseableResource {

static final String SCANNER_VERSION = "5.0.1.3006";

static final FileLocation JAVASCRIPT_PLUGIN_LOCATION = FileLocation.byWildcardMavenFilename(
new File("../../../sonar-plugin/sonar-javascript-plugin/target"),
"sonar-javascript-plugin-*-multi.jar"
artifact()
);

/**
* This is used to test artifact with and without embedded runtime during plugin QA integration tests
*
*/
private static String artifact() {
return "multi".equals(System.getenv("SONARJS_ARTIFACT"))
? "sonar-javascript-plugin-*-multi.jar"
: "sonar-javascript-plugin-*.jar";
}

public static final OrchestratorExtension ORCHESTRATOR = OrchestratorExtension
.builderEnv()
.useDefaultAdminCredentialsForBuilds(true)
Expand Down

0 comments on commit 72f2391

Please sign in to comment.