Skip to content
Draft
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
6 changes: 3 additions & 3 deletions .github/actions/orchestrator-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ runs:
echo "ORCHESTRATOR_HOME=${{ github.workspace }}/orchestrator" >> $GITHUB_ENV

- name: Cache Orchestrator
if: inputs.sq-version != 'DEV'
if: github.event_name != 'pull_request' && inputs.sq-version != 'DEV'
uses: SonarSource/gh-action_cache@v1
with:
path: ${{ env.ORCHESTRATOR_HOME }}
key: orchestrator-${{ inputs.sq-version }}-${{ env.ORCHESTRATOR_CACHE_KEY }}-${{ github.run_id }}
restore-keys: orchestrator-${{ inputs.sq-version }}-${{ env.ORCHESTRATOR_CACHE_KEY }}-
key: orchestrator-production-${{ inputs.sq-version }}-${{ env.ORCHESTRATOR_CACHE_KEY }}-${{ github.run_id }}
restore-keys: orchestrator-production-${{ inputs.sq-version }}-${{ env.ORCHESTRATOR_CACHE_KEY }}-

- name: Setup Orchestrator Home Directory
shell: bash
Expand Down
42 changes: 40 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@ jobs:
with:
secrets: |
development/github/token/licenses-ro token | GITHUB_TOKEN;
development/artifactory-edge-prod/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ORCHESTRATOR_ACCESS_TOKEN;
- name: Configure production Orchestrator
shell: bash
env:
ORCHESTRATOR_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ORCHESTRATOR_ACCESS_TOKEN }}
run: |
umask 077
config_dir="$RUNNER_TEMP/orchestrator-production-config"
mkdir -p "$config_dir"
printf '%s\n' \
'orchestrator.artifactory.url=https://repox-internal.sonar.build/artifactory' \
"orchestrator.artifactory.accessToken=$ORCHESTRATOR_ACCESS_TOKEN" > "$config_dir/orchestrator.properties"
config_path="$config_dir/orchestrator.properties"
if [[ "$RUNNER_OS" == Windows ]]; then
config_path="/$(cygpath -m "$config_path")"
fi
config_path="${config_path// /%20}"
echo "ORCHESTRATOR_CONFIG_URL=file://$config_path" >> "$GITHUB_ENV"
- name: Orchestrator Cache
Comment thread
gitar-bot[bot] marked this conversation as resolved.
uses: ./.github/actions/orchestrator-cache
with:
Expand All @@ -122,14 +140,15 @@ jobs:
MAVEN_OPTS: "-Xmx3g -Dfile.encoding=UTF-8"
JAVA_TOOL_OPTIONS: ""
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
ORCHESTRATOR_HOME: ${{ github.event_name == 'pull_request' && format('{0}/orchestrator-production', runner.temp) || env.ORCHESTRATOR_HOME }}
run: |
cd its/ruling
extra_args=()
# Nested Maven builds share ~/.m2; Windows denies concurrent writes to *.lastUpdated.
if [[ "${RUNNER_OS}" != "Windows" ]]; then
extra_args+=(-Dparallel=methods -DuseUnlimitedThreads=true)
fi
mvn package ${MAVEN_OUTPUT_ARGS} "-Pit-ruling,${{ matrix.item.profile }}" -Dsonar.runtimeVersion=${{ matrix.item.sq_version }} -Dmaven.test.redirectTestOutputToFile=false "${extra_args[@]}"
mvn "-Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL" "-Dorchestrator.home=$ORCHESTRATOR_HOME" package ${MAVEN_OUTPUT_ARGS} "-Pit-ruling,${{ matrix.item.profile }}" -Dsonar.runtimeVersion=${{ matrix.item.sq_version }} -Dmaven.test.redirectTestOutputToFile=false "${extra_args[@]}"
- name: Upload Actual Results On Failure
if: failure()
uses: ./.github/actions/upload-actual
Expand Down Expand Up @@ -229,16 +248,35 @@ jobs:
with:
secrets: |
development/github/token/licenses-ro token | GITHUB_TOKEN;
development/artifactory-edge-prod/token/{REPO_OWNER_NAME_DASH}-private-reader access_token | ORCHESTRATOR_ACCESS_TOKEN;
- name: Configure production Orchestrator
shell: bash
env:
ORCHESTRATOR_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ORCHESTRATOR_ACCESS_TOKEN }}
run: |
umask 077
config_dir="$RUNNER_TEMP/orchestrator-production-config"
mkdir -p "$config_dir"
printf '%s\n' \
'orchestrator.artifactory.url=https://repox-internal.sonar.build/artifactory' \
"orchestrator.artifactory.accessToken=$ORCHESTRATOR_ACCESS_TOKEN" > "$config_dir/orchestrator.properties"
config_path="$config_dir/orchestrator.properties"
if [[ "$RUNNER_OS" == Windows ]]; then
config_path="/$(cygpath -m "$config_path")"
fi
config_path="${config_path// /%20}"
echo "ORCHESTRATOR_CONFIG_URL=file://$config_path" >> "$GITHUB_ENV"
- name: Orchestrator Cache
uses: ./.github/actions/orchestrator-cache
with:
sq-version: ${{ matrix.sq_version }}
- name: Plugin QA
env:
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
ORCHESTRATOR_HOME: ${{ github.event_name == 'pull_request' && format('{0}/orchestrator-production', runner.temp) || env.ORCHESTRATOR_HOME }}
run: |
cd its/plugin
mvn package ${MAVEN_OUTPUT_ARGS} -Pit-plugin -Dsonar.runtimeVersion=${{ matrix.sq_version }} -Dmaven.test.redirectTestOutputToFile=false -Dparallel=classes -DuseUnlimitedThreads=true
mvn "-Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL" "-Dorchestrator.home=$ORCHESTRATOR_HOME" package ${MAVEN_OUTPUT_ARGS} -Pit-plugin -Dsonar.runtimeVersion=${{ matrix.sq_version }} -Dmaven.test.redirectTestOutputToFile=false -Dparallel=classes -DuseUnlimitedThreads=true

sanity:
name: Sanity Test
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<sonarlint.plugin.api.version>12.1.1.87771</sonarlint.plugin.api.version>
<sonar.sca.exclusions>its/**,java-checks-test-sources/**</sonar.sca.exclusions>
<analyzer.commons.version>2.33.0.5369</analyzer.commons.version>
<orchestrator.version>6.4.3.4676</orchestrator.version>
<orchestrator.version>6.4.4.4797</orchestrator.version>
<sonar.integration.tester.version>1.3.0.1396</sonar.integration.tester.version>
<sslr.version>1.26.0.4194</sslr.version>
<argLine>-Xmx512m</argLine>
Expand Down
Loading