Skip to content

Commit

Permalink
Fix broken CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Topin2001 committed May 31, 2024
1 parent ac080b7 commit 965f42b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/close-milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
close:
name: Close completed milestone
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Close a milestone if completed
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ on:

jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/java-continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ on: [push, pull_request]
jobs:

build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
java: [ '17' ]
name: Java ${{ matrix.Java }} CI
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache node_modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -43,14 +43,13 @@ jobs:
run: mvn -B clean package
- name: Test cnes-report
env:
SONARQUBE_VERSION: 9.9-community
SONARQUBE_VERSION: 10.5-community
run: |
version=$(cat pom.xml | grep "<version>.*</version>" | head -1 |awk -F'[><]' '{print $3}');
echo "Starting docker";
docker run --name sonarqube_${SONARQUBE_VERSION} -d -p 9000:9000 sonarqube:${SONARQUBE_VERSION};
echo "Inject plugin";
docker cp target/sonar-cnes-report-${version}.jar sonarqube_${SONARQUBE_VERSION}:/opt/sonarqube/extensions/plugins/;
docker exec -u root sonarqube_${SONARQUBE_VERSION} chown sonarqube:sonarqube /opt/sonarqube/extensions/plugins/sonar-cnes-report-${version}.jar;
docker restart sonarqube_${SONARQUBE_VERSION};
echo "Waiting up to 5 minutes for SonarQube...";
counter=0;
Expand All @@ -61,6 +60,7 @@ jobs:
counter=$(( $counter + 1 ));
status_sonar=$(curl -s "http://localhost:9000/api/system/status" | grep "\"status\":\"UP\"" > /dev/null; echo $?);
done;
echo "SonarQube is $([[ 0 -eq $status_sonar ]] && echo "up" || echo "down"), after $counter tries";
mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=admin -Dsonar.password=admin -Dsonar.organization=default-organization;
echo "Waiting for the SonarQube Compute Engine task to be completed...";
ce=$(grep ceTaskUrl= target/sonar/report-task.txt);
Expand All @@ -84,7 +84,7 @@ jobs:
curl -u admin:admin ${url_cnesreport} -O -J;
code-analysis:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: SonarCloud Code Analysis
# It's not possible to launch an analysis on external pull requests
if: ${{ github.repository_owner == 'cnescatlab' }}
Expand Down

0 comments on commit 965f42b

Please sign in to comment.