From f39679e8c5866640276a5b86b5deb121e16b0200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Wed, 15 Jan 2025 14:14:20 +0100 Subject: [PATCH] FUSETOOLS2-2519 - use Ubuntu latest 24.04 on GitHub CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Pupier --- .github/workflows/camel_version.yaml | 14 +++++++++----- .github/workflows/coverage.yaml | 5 ++++- .github/workflows/deploy.yaml | 7 +++++-- .github/workflows/insider.yaml | 18 +++++++++++------- .github/workflows/main.yaml | 24 ++++++++++++++---------- 5 files changed, 43 insertions(+), 25 deletions(-) diff --git a/.github/workflows/camel_version.yaml b/.github/workflows/camel_version.yaml index a211bd20..f319d077 100644 --- a/.github/workflows/camel_version.yaml +++ b/.github/workflows/camel_version.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, macos-latest, windows-latest ] + os: [ ubuntu-latest, macos-latest, windows-latest ] camel-version: [ "4.4.0", "4.0.0.redhat-00036", "4.4.0.redhat-00019"] timeout-minutes: 30 @@ -41,7 +41,7 @@ jobs: run: java --version - name: Install JBang (ubuntu, macOS) - if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest' + if: ${{ startsWith(matrix.os, 'ubuntu') }} || matrix.os == 'macos-latest' run: | curl -Ls https://sh.jbang.dev | bash -s - app setup echo "$HOME/.jbang/bin" >> $GITHUB_PATH @@ -65,14 +65,18 @@ jobs: - name: npm-ci run: npm ci + - name: Allow unprivileged user namespace (ubuntu) + if: ${{ startsWith(matrix.os, 'ubuntu') }} + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + - name: ui test (ubuntu) id: uiTest_Ubuntu - if: matrix.os == 'ubuntu-22.04' + if: ${{ startsWith(matrix.os, 'ubuntu') }} run: xvfb-run --auto-servernum npm run ui-test - name: ui test (macos, windows) id: uiTest_MacOS_Windows - if: matrix.os != 'ubuntu-22.04' + if: ${{ !startsWith(matrix.os, 'ubuntu') }} run: npm run ui-test - name: vsce package @@ -104,7 +108,7 @@ jobs: check: if: always() - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest name: Status Check needs: [ camel ] steps: diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 76c7bbf4..213a5603 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -17,7 +17,7 @@ jobs: CODE_VERSION: max TEST_RESOURCES: test-resources - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -50,6 +50,9 @@ jobs: - name: Compile run: npm run compile + - name: Allow unprivileged user namespace (ubuntu) + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + # 'set +e' and 'exit 0' - that means the workflow will not fail even the test failures are present. The failing tests are not directive for the code coverage reports itself - name: Coverage run: | diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0ea33039..8218d6ba 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -17,7 +17,7 @@ jobs: CODE_VERSION: max TEST_RESOURCES: test-resources - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -63,6 +63,9 @@ jobs: - name: Compile run: npm run compile + - name: Allow unprivileged user namespace (ubuntu) + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + - name: UI Tests run: | eval $(minikube -p minikube docker-env) @@ -77,7 +80,7 @@ jobs: check: if: always() - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest name: Status Check needs: [ deploy ] steps: diff --git a/.github/workflows/insider.yaml b/.github/workflows/insider.yaml index 15d9ad55..37fea4a1 100644 --- a/.github/workflows/insider.yaml +++ b/.github/workflows/insider.yaml @@ -13,7 +13,7 @@ jobs: insider: strategy: matrix: - os: [ ubuntu-22.04, macos-latest, windows-latest ] + os: [ ubuntu-latest, macos-latest, windows-latest ] version: [ latest ] # [ x.x.x | latest | max ] type: [ insider ] # [ stable | insider ] fail-fast: false @@ -36,7 +36,7 @@ jobs: distribution: "temurin" - name: Install JBang (ubuntu, macOS) - if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest' + if: ${{ startsWith(matrix.os, 'ubuntu') }} || matrix.os == 'macos-latest' run: | curl -Ls https://sh.jbang.dev | bash -s - app setup echo "$HOME/.jbang/bin" >> $GITHUB_PATH @@ -62,22 +62,26 @@ jobs: - name: npm-compile run: npm run compile + - name: Allow unprivileged user namespace (ubuntu) + if: ${{ startsWith(matrix.os, 'ubuntu') }} + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + - name: test (ubuntu) - if: matrix.os == 'ubuntu-22.04' + if: ${{ startsWith(matrix.os, 'ubuntu') }} run: xvfb-run --auto-servernum npm test - name: test (macos, windows) - if: matrix.os != 'ubuntu-22.04' + if: ${{ !startsWith(matrix.os, 'ubuntu') }} run: npm test - name: ui test (ubuntu) id: uiTest_Ubuntu - if: matrix.os == 'ubuntu-22.04' + if: ${{ startsWith(matrix.os, 'ubuntu') }} run: xvfb-run --auto-servernum npm run ui-test - name: ui test (macos, windows) id: uiTest_MacOS_Windows - if: matrix.os != 'ubuntu-22.04' + if: ${{ !startsWith(matrix.os, 'ubuntu') }} run: npm run ui-test - name: vsce package @@ -85,7 +89,7 @@ jobs: - name: Store VS Code Logs (Ubuntu) uses: actions/upload-artifact@v4 - if: failure() && matrix.os == 'ubuntu-22.04' + if: failure() && ${{ startsWith(matrix.os, 'ubuntu') }} with: name: ${{ matrix.os }}-${{ matrix.version }}-vscode-logs path: ~/.config/Code/logs/* diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 628bfa70..3988a7e6 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -15,7 +15,7 @@ jobs: main: strategy: matrix: - os: [ ubuntu-22.04, macos-latest, windows-latest ] + os: [ ubuntu-latest, macos-latest, windows-latest ] version: [ "1.90.2", max ] # [ "x.x.x" | latest | max ] type: [ stable ] # [ stable | insider ] fail-fast: false @@ -38,7 +38,7 @@ jobs: distribution: "temurin" - name: Install JBang (ubuntu, macOS) - if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest' + if: ${{ startsWith(matrix.os, 'ubuntu') }} || matrix.os == 'macos-latest' run: | curl -Ls https://sh.jbang.dev | bash -s - app setup echo "$HOME/.jbang/bin" >> $GITHUB_PATH @@ -65,18 +65,22 @@ jobs: - name: npm-compile run: npm run compile + - name: Allow unprivileged user namespace (ubuntu) + if: ${{ startsWith(matrix.os, 'ubuntu') }} + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + - name: test (ubuntu) id: test_Ubuntu - if: matrix.os == 'ubuntu-22.04' + if: ${{ startsWith(matrix.os, 'ubuntu') }} run: xvfb-run --auto-servernum npm test - name: test (macos, windows) - if: matrix.os != 'ubuntu-22.04' + if: ${{ !startsWith(matrix.os, 'ubuntu') }} run: npm test - name: ui test (ubuntu) id: uiTest_Ubuntu - if: matrix.os == 'ubuntu-22.04' + if: ${{ startsWith(matrix.os, 'ubuntu') }} run: xvfb-run --auto-servernum npm run ui-test - name: ui test (macos) @@ -96,11 +100,11 @@ jobs: - name: get-npm-version id: package-version - if: matrix.os == 'ubuntu-22.04' + if: ${{ startsWith(matrix.os, 'ubuntu') }} uses: martinbeentjes/npm-get-version-action@v1.3.1 - name: Generate SBOM - if: matrix.os == 'ubuntu-22.04' + if: ${{ startsWith(matrix.os, 'ubuntu') }} run: | npm install --global @cyclonedx/cyclonedx-npm cyclonedx-npm --omit dev --output-file node-sbom.json @@ -110,14 +114,14 @@ jobs: - name: Store SBOM uses: actions/upload-artifact@v4 - if: matrix.os == 'ubuntu-22.04' && matrix.version == 'max' + if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.version == 'max' }} with: name: sbom path: manifest.json - name: Store VS Code Logs (Ubuntu) uses: actions/upload-artifact@v4 - if: failure() && matrix.os == 'ubuntu-22.04' + if: failure() && ${{ startsWith(matrix.os, 'ubuntu') }} with: name: ${{ matrix.os }}-${{ matrix.version }}-vscode-logs path: ~/.config/Code/logs/* @@ -162,7 +166,7 @@ jobs: check: if: always() - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest name: Status Check needs: [ main ] steps: