From 9bd83a0fab5ecc982673fc28cf8379d529d51277 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Fri, 2 Sep 2022 12:33:01 +0530 Subject: [PATCH] ci: ubuntu 18.04 is deprecated upgrade to ubuntu 22.04 Signed-off-by: subhamkrai --- .github/workflows/build.yml | 124 +++++++++--------- .github/workflows/canary-integration-test.yml | 20 +-- .github/workflows/codegen.yml | 2 +- .github/workflows/codespell.yaml | 2 +- .github/workflows/commitlint.yml | 4 +- .github/workflows/crds-gen.yml | 2 +- .github/workflows/create-tag.yaml | 2 +- .github/workflows/daily-nightly-jobs.yml | 18 +-- .github/workflows/golangci-lint.yaml | 2 +- .../integration-test-helm-suite.yaml | 2 +- .../workflows/integration-test-mgr-suite.yaml | 2 +- .../integration-test-multi-cluster-suite.yaml | 2 +- .../integration-test-object-suite.yaml | 2 +- .../integration-test-smoke-suite.yaml | 2 +- .../integration-test-upgrade-suite.yaml | 4 +- .../integration-tests-on-release.yaml | 12 +- .github/workflows/mod-check.yml | 2 +- .github/workflows/push-build.yaml | 4 +- .github/workflows/rbac-gen.yaml | 2 +- .github/workflows/stale.yaml | 2 +- .github/workflows/unit-test.yml | 2 +- tests/scripts/create-bluestore-partitions.sh | 4 +- 22 files changed, 110 insertions(+), 108 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a648872e..fc71d910a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,89 +11,89 @@ jobs: macos-build: runs-on: macos-10.15 steps: - - name: checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 - - uses: actions/setup-go@v2 - with: - go-version: 1.17 + - uses: actions/setup-go@v2 + with: + go-version: 1.17 - - name: copy working directory to GOPATH - run: sudo mkdir -p /Users/runner/go/src/github.com && sudo cp -a /Users/runner/work/rook /Users/runner/go/src/github.com/ + - name: copy working directory to GOPATH + run: sudo mkdir -p /Users/runner/go/src/github.com && sudo cp -a /Users/runner/work/rook /Users/runner/go/src/github.com/ - - name: build rook - working-directory: /Users/runner/go/src/github.com/rook/rook - run: | - GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' BUILD_CONTAINER_IMAGE=false build + - name: build rook + working-directory: /Users/runner/go/src/github.com/rook/rook + run: | + GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' BUILD_CONTAINER_IMAGE=false build - - name: validate build - working-directory: /Users/runner/go/src/github.com/rook/rook - run: tests/scripts/validate_modified_files.sh build + - name: validate build + working-directory: /Users/runner/go/src/github.com/rook/rook + run: tests/scripts/validate_modified_files.sh build - - name: run codegen - working-directory: /Users/runner/go/src/github.com/rook/rook - run: GOPATH=$(go env GOPATH) make codegen + - name: run codegen + working-directory: /Users/runner/go/src/github.com/rook/rook + run: GOPATH=$(go env GOPATH) make codegen - - name: validate codegen - working-directory: /Users/runner/go/src/github.com/rook/rook - run: tests/scripts/validate_modified_files.sh codegen + - name: validate codegen + working-directory: /Users/runner/go/src/github.com/rook/rook + run: tests/scripts/validate_modified_files.sh codegen - - name: run mod check - run: GOPATH=$(go env GOPATH) make -j $(nproc) mod.check + - name: run mod check + run: GOPATH=$(go env GOPATH) make -j $(nproc) mod.check - - name: validate modcheck - run: tests/scripts/validate_modified_files.sh modcheck + - name: validate modcheck + run: tests/scripts/validate_modified_files.sh modcheck - - name: run crds-gen - working-directory: /Users/runner/go/src/github.com/rook/rook - run: make csv-clean && GOPATH=$(go env GOPATH) make crds + - name: run crds-gen + working-directory: /Users/runner/go/src/github.com/rook/rook + run: make csv-clean && GOPATH=$(go env GOPATH) make crds - - name: validate crds-gen - working-directory: /Users/runner/go/src/github.com/rook/rook - run: tests/scripts/validate_modified_files.sh crd + - name: validate crds-gen + working-directory: /Users/runner/go/src/github.com/rook/rook + run: tests/scripts/validate_modified_files.sh crd - - name: run gen-rbac - working-directory: /Users/runner/go/src/github.com/rook/rook - run: GOPATH=$(go env GOPATH) make gen-rbac + - name: run gen-rbac + working-directory: /Users/runner/go/src/github.com/rook/rook + run: GOPATH=$(go env GOPATH) make gen-rbac - - name: validate gen-rbac - working-directory: /Users/runner/go/src/github.com/rook/rook - run: tests/scripts/validate_modified_files.sh gen-rbac + - name: validate gen-rbac + working-directory: /Users/runner/go/src/github.com/rook/rook + run: tests/scripts/validate_modified_files.sh gen-rbac - - name: setup tmate session for debugging - if: failure() - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 60 + - name: setup tmate session for debugging + if: failure() + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 60 linux-build-all: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: go-version: ["1.17", "1.18"] steps: - - name: checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 - - name: setup golang ${{ matrix.go-version }} - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} + - name: setup golang ${{ matrix.go-version }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} - - name: set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all + - name: set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all - - name: build.all rook with go ${{ matrix.go-version }} - run: | - tests/scripts/github-action-helper.sh build_rook_all + - name: build.all rook with go ${{ matrix.go-version }} + run: | + tests/scripts/github-action-helper.sh build_rook_all - - name: setup tmate session for debugging - if: failure() - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 60 + - name: setup tmate session for debugging + if: failure() + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 60 diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index ab0f2854c..99aad8dd8 100644 --- a/.github/workflows/canary-integration-test.yml +++ b/.github/workflows/canary-integration-test.yml @@ -18,7 +18,7 @@ defaults: jobs: canary: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout @@ -206,7 +206,7 @@ jobs: timeout-minutes: 60 raw-disk: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout @@ -447,7 +447,7 @@ jobs: timeout-minutes: 60 pvc: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout @@ -512,7 +512,7 @@ jobs: timeout-minutes: 60 pvc-db: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout @@ -560,7 +560,7 @@ jobs: timeout-minutes: 60 pvc-db-wal: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout @@ -972,7 +972,7 @@ jobs: timeout-minutes: 60 multi-cluster-mirroring: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout @@ -1163,7 +1163,7 @@ jobs: timeout-minutes: 60 rgw-multisite-testing: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout @@ -1190,7 +1190,7 @@ jobs: timeout-minutes: 60 encryption-pvc-kms-ibm-kp: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: @@ -1220,7 +1220,7 @@ jobs: timeout-minutes: 60 multus-cluster-network: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout @@ -1274,7 +1274,7 @@ jobs: timeout-minutes: 60 csi-hostnetwork-disabled: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" steps: - name: checkout diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index ceb0d688d..2d891c1de 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -18,7 +18,7 @@ defaults: jobs: codegen: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/setup-go@v2 with: diff --git a/.github/workflows/codespell.yaml b/.github/workflows/codespell.yaml index eb69163b3..f7310d17c 100644 --- a/.github/workflows/codespell.yaml +++ b/.github/workflows/codespell.yaml @@ -14,7 +14,7 @@ on: jobs: codespell: name: codespell - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 5624d95aa..a1fe55f16 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -13,7 +13,7 @@ on: jobs: lint: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -22,5 +22,5 @@ jobs: fetch-depth: 0 - uses: wagoid/commitlint-github-action@v2.0.3 with: - configFile: './.commitlintrc.json' + configFile: "./.commitlintrc.json" helpURL: https://rook.io/docs/rook/latest/development-flow.html#commit-structure diff --git a/.github/workflows/crds-gen.yml b/.github/workflows/crds-gen.yml index 83964e99e..454bd9a8d 100644 --- a/.github/workflows/crds-gen.yml +++ b/.github/workflows/crds-gen.yml @@ -18,7 +18,7 @@ defaults: jobs: crds-gen: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/setup-go@v2 with: diff --git a/.github/workflows/create-tag.yaml b/.github/workflows/create-tag.yaml index 2758fd465..707d15c73 100644 --- a/.github/workflows/create-tag.yaml +++ b/.github/workflows/create-tag.yaml @@ -13,7 +13,7 @@ defaults: jobs: Create-Tag: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: github.repository == 'rook/rook' && contains('travisn,leseb,BlaineEXE,jbw976,galexrt,satoru-takeuchi', github.actor) steps: - name: checkout diff --git a/.github/workflows/daily-nightly-jobs.yml b/.github/workflows/daily-nightly-jobs.yml index 8287e8f45..3a6929554 100644 --- a/.github/workflows/daily-nightly-jobs.yml +++ b/.github/workflows/daily-nightly-jobs.yml @@ -90,7 +90,7 @@ jobs: path: test smoke-suite-pacific-devel: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 @@ -124,7 +124,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ smoke-suite-quincy-devel: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 @@ -158,7 +158,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ smoke-suite-ceph-master: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 @@ -192,7 +192,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ object-suite-pacific-devel: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 @@ -226,7 +226,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ object-suite-master: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 @@ -260,7 +260,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ upgrade-from-pacific-stable-to-pacific-devel: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 @@ -294,7 +294,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ upgrade-from-octopus-stable-to-octopus-devel: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 @@ -328,7 +328,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ rgw-multisite-test-with-ceph-devel: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: matrix: ceph-image-tag: @@ -357,7 +357,7 @@ jobs: path: test encryption-pvc-kms-ibm-kp: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index a0185b39f..ac3061126 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -14,7 +14,7 @@ on: jobs: golangci: name: golangci-lint - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/setup-go@v2 with: diff --git a/.github/workflows/integration-test-helm-suite.yaml b/.github/workflows/integration-test-helm-suite.yaml index 6ec68d7e2..2d91fbfe9 100644 --- a/.github/workflows/integration-test-helm-suite.yaml +++ b/.github/workflows/integration-test-helm-suite.yaml @@ -13,7 +13,7 @@ defaults: jobs: TestCephHelmSuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-test-mgr-suite.yaml b/.github/workflows/integration-test-mgr-suite.yaml index adcd2d15b..47135d911 100644 --- a/.github/workflows/integration-test-mgr-suite.yaml +++ b/.github/workflows/integration-test-mgr-suite.yaml @@ -11,7 +11,7 @@ defaults: jobs: TestCephMgrSuite: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: "contains(github.event.pull_request.labels.*.name, 'run-mgr-suite')" strategy: fail-fast: false diff --git a/.github/workflows/integration-test-multi-cluster-suite.yaml b/.github/workflows/integration-test-multi-cluster-suite.yaml index 489e35f16..9e198bf53 100644 --- a/.github/workflows/integration-test-multi-cluster-suite.yaml +++ b/.github/workflows/integration-test-multi-cluster-suite.yaml @@ -13,7 +13,7 @@ defaults: jobs: TestCephMultiClusterDeploySuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-test-object-suite.yaml b/.github/workflows/integration-test-object-suite.yaml index 68f96ae8e..6edb97a89 100644 --- a/.github/workflows/integration-test-object-suite.yaml +++ b/.github/workflows/integration-test-object-suite.yaml @@ -13,7 +13,7 @@ defaults: jobs: TestCephObjectSuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-test-smoke-suite.yaml b/.github/workflows/integration-test-smoke-suite.yaml index 32a527cab..4e83b5c11 100644 --- a/.github/workflows/integration-test-smoke-suite.yaml +++ b/.github/workflows/integration-test-smoke-suite.yaml @@ -13,7 +13,7 @@ defaults: jobs: TestCephSmokeSuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-test-upgrade-suite.yaml b/.github/workflows/integration-test-upgrade-suite.yaml index eb6fc626e..911fb382a 100644 --- a/.github/workflows/integration-test-upgrade-suite.yaml +++ b/.github/workflows/integration-test-upgrade-suite.yaml @@ -13,7 +13,7 @@ defaults: jobs: TestCephUpgradeSuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: @@ -58,7 +58,7 @@ jobs: TestHelmUpgradeSuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-on-release.yaml b/.github/workflows/integration-tests-on-release.yaml index dace48851..85a32a76a 100644 --- a/.github/workflows/integration-tests-on-release.yaml +++ b/.github/workflows/integration-tests-on-release.yaml @@ -14,7 +14,7 @@ defaults: jobs: TestCephHelmSuite: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: @@ -55,7 +55,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ TestCephMultiClusterDeploySuite: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: @@ -95,7 +95,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ TestCephSmokeSuite: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: @@ -134,7 +134,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ TestCephUpgradeSuite: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: @@ -173,7 +173,7 @@ jobs: path: /home/runner/work/rook/rook/tests/integration/_output/tests/ TestHelmUpgradeSuite: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: @@ -216,7 +216,7 @@ jobs: TestCephObjectSuite: if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/mod-check.yml b/.github/workflows/mod-check.yml index 508ed0830..6b1671b10 100644 --- a/.github/workflows/mod-check.yml +++ b/.github/workflows/mod-check.yml @@ -18,7 +18,7 @@ defaults: jobs: modcheck: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 diff --git a/.github/workflows/push-build.yaml b/.github/workflows/push-build.yaml index 160433592..413d4a570 100644 --- a/.github/workflows/push-build.yaml +++ b/.github/workflows/push-build.yaml @@ -14,7 +14,7 @@ defaults: jobs: push-image-to-container-registry: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: github.repository == 'rook/rook' steps: - name: checkout @@ -56,7 +56,7 @@ jobs: python3 -m pip install --upgrade pip setuptools wheel sudo apt-get -q update sudo apt-get -q install -y python3-pygit2 - + - name: Configure git user run: | # Use our Rook "service account" diff --git a/.github/workflows/rbac-gen.yaml b/.github/workflows/rbac-gen.yaml index 917c16425..bb7ecf517 100644 --- a/.github/workflows/rbac-gen.yaml +++ b/.github/workflows/rbac-gen.yaml @@ -18,7 +18,7 @@ defaults: jobs: gen-rbac: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/setup-go@v2 with: diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index 1383383d3..12a827cf4 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -6,7 +6,7 @@ on: jobs: stale: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 if: github.repository == 'rook/rook' steps: - uses: actions/stale@v4 diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index f32f6d9d2..52459a014 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -18,7 +18,7 @@ defaults: jobs: unittests: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 diff --git a/tests/scripts/create-bluestore-partitions.sh b/tests/scripts/create-bluestore-partitions.sh index 64a74a4d5..21796616a 100755 --- a/tests/scripts/create-bluestore-partitions.sh +++ b/tests/scripts/create-bluestore-partitions.sh @@ -43,8 +43,10 @@ function wipe_disk { sudo parted "$DISK" -s print || : return fi + set +e sudo parted -s "$DISK" mklabel gpt - sudo partprobe "$DISK" + set -e + sudo partprobe -d "$DISK" sudo udevadm settle sudo parted "$DISK" -s print }