From cdf69660ca11e83a7c7cdcc709e6cd54c680c3d6 Mon Sep 17 00:00:00 2001 From: Wil Wade Date: Mon, 29 Jan 2024 12:36:24 -0500 Subject: [PATCH] CI/Docker: Update Ubuntu to 22.04 (#1857) # Goal The goal of this PR is to switch everything to the newer Ubuntu LTS of 22.04 Closes #1541 --- .github/workflows/check-polkadot-releases.yml | 2 +- .../create-issue-dependabot-alert-pr.yml | 2 +- .github/workflows/merge-pr.yml | 4 +-- .../workflows/publish-dev-ci-base-image.yml | 2 +- .github/workflows/release.yml | 26 +++++++++---------- .github/workflows/verify-pr-commit.yml | 26 +++++++++---------- docker/collator-node-local.dockerfile | 2 +- docker/instant-seal-node.dockerfile | 4 +-- docker/parachain-node.dockerfile | 4 +-- docker/standalone-node.dockerfile | 4 +-- tools/ci/docker/ci-base-image.dockerfile | 3 +-- 11 files changed, 39 insertions(+), 40 deletions(-) diff --git a/.github/workflows/check-polkadot-releases.yml b/.github/workflows/check-polkadot-releases.yml index 2228140d41..71eb8fbfd4 100644 --- a/.github/workflows/check-polkadot-releases.yml +++ b/.github/workflows/check-polkadot-releases.yml @@ -8,7 +8,7 @@ env: RELEASE_TRACK_FILENAME: .github/.latest-polkadot-full-release.txt jobs: record-polkadot-latest-release-version: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Timestamp run: date diff --git a/.github/workflows/create-issue-dependabot-alert-pr.yml b/.github/workflows/create-issue-dependabot-alert-pr.yml index e7ef07d3d4..75e7647084 100644 --- a/.github/workflows/create-issue-dependabot-alert-pr.yml +++ b/.github/workflows/create-issue-dependabot-alert-pr.yml @@ -9,7 +9,7 @@ on: - .github/workflows jobs: create-issue: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} PR_TITLE: ${{github.event.pull_request.title}} diff --git a/.github/workflows/merge-pr.yml b/.github/workflows/merge-pr.yml index 1b35003013..63e93ac182 100644 --- a/.github/workflows/merge-pr.yml +++ b/.github/workflows/merge-pr.yml @@ -10,7 +10,7 @@ on: jobs: changes: name: Determine Changed Files - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 outputs: ci-base-image: ${{steps.filter.outputs.ci-base-image}} @@ -83,7 +83,7 @@ jobs: IMAGE_NAME: ci-base-image IMAGE_VERSION: 1.0.0 BRANCH_NAME: main - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Check Out Repo uses: actions/checkout@v4 diff --git a/.github/workflows/publish-dev-ci-base-image.yml b/.github/workflows/publish-dev-ci-base-image.yml index 8836c774d2..d2d2993184 100644 --- a/.github/workflows/publish-dev-ci-base-image.yml +++ b/.github/workflows/publish-dev-ci-base-image.yml @@ -18,7 +18,7 @@ jobs: # IMAGE_NAME: ci-base-image-dind IMAGE_NAME: ci-base-image BRANCH_NAME: ${{github.ref_name}} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Check Out Repo uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2ea12a681..e15e5578ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ env: jobs: validate-release-version: name: Validate Release Version - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Validate @@ -46,7 +46,7 @@ jobs: create-release-branch: needs: validate-release-version name: Create Release Branch - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -114,7 +114,7 @@ jobs: version-code: needs: run-all-benchmarks name: Version Code - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -385,7 +385,7 @@ jobs: BIN_DIR: target/release RELEASE_FILENAME_PREFIX: frequency-rococo-local ARCH: amd64 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Set Env Vars @@ -440,14 +440,14 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-20.04] + os: [ubuntu-22.04] network: [mainnet] include: - network: mainnet spec: frequency build-profile: release release-file-name-prefix: frequency - - os: ubuntu-20.04 + - os: ubuntu-22.04 arch: amd64 runs-on: ${{matrix.os}} container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 @@ -495,7 +495,7 @@ jobs: compare-metadata: needs: build-binaries name: Compare Metadata - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: BIN_DIR: target/release BIN_FILENAME: frequency.amd64 @@ -631,7 +631,7 @@ jobs: build-js-api-augment, ] name: Wait for All Builds to Finish - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: runtime_filename_dev: ${{needs.build-runtimes.outputs.runtime_filename_dev}} runtime_filename_rococo: ${{needs.build-runtimes.outputs.runtime_filename_rococo}} @@ -643,7 +643,7 @@ jobs: release-artifacts: needs: wait-for-all-builds name: Release Built Artifacts - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -817,7 +817,7 @@ jobs: env: DOCKER_HUB_PROFILE: frequencychain IMAGE_NAME: parachain-node - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Set Env Vars @@ -915,7 +915,7 @@ jobs: docker-platform: linux/amd64 env: DOCKER_HUB_PROFILE: frequencychain - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Set Env Vars @@ -992,7 +992,7 @@ jobs: release-rust-developer-docs: needs: wait-for-all-builds name: Release Rust Developer Docs - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 permissions: contents: read @@ -1010,7 +1010,7 @@ jobs: release-js-api-augment: needs: wait-for-all-builds name: Release JS API Augment - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo diff --git a/.github/workflows/verify-pr-commit.yml b/.github/workflows/verify-pr-commit.yml index bb4badf622..dd4d6d3d1b 100644 --- a/.github/workflows/verify-pr-commit.yml +++ b/.github/workflows/verify-pr-commit.yml @@ -15,7 +15,7 @@ env: jobs: changes: name: Determine Changed Files - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 outputs: rust: ${{steps.filter.outputs.rust}} @@ -57,7 +57,7 @@ jobs: clear-metadata-labels: name: Clear Metadata Labels - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Clear Metadata Changed Label @@ -78,7 +78,7 @@ jobs: build-binaries-dummy: needs: changes if: needs.changes.outputs.build-binary != 'true' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Build ${{matrix.network}} Binary on ${{matrix.branch_alias}} Branch strategy: matrix: @@ -177,7 +177,7 @@ jobs: needs: changes if: needs.changes.outputs.cargo-lock == 'true' name: Check for Vulnerable Crates - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -193,7 +193,7 @@ jobs: needs: changes if: needs.changes.outputs.rust == 'true' name: Verify Rust Code Format - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -283,7 +283,7 @@ jobs: strategy: matrix: network: [rococo, mainnet] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - run: echo "Just a dummy matrix to satisfy GitHub required checks that were skipped" @@ -388,7 +388,7 @@ jobs: verify-js-api-augment: needs: build-binaries name: Verify JS API Augment - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -447,7 +447,7 @@ jobs: verify-node-docker-images: needs: build-binaries name: Verify Node Docker Images - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -509,7 +509,7 @@ jobs: needs: changes if: needs.changes.outputs.ci-docker-image == 'true' name: Verify CI Docker Image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -533,7 +533,7 @@ jobs: execute-binary-checks: needs: build-binaries name: Execute Binary Checks - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -564,7 +564,7 @@ jobs: check-metadata-and-spec-version: needs: build-binaries name: Check Metadata and Spec Version - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Check Out Repo @@ -718,7 +718,7 @@ jobs: verify-genesis-state: needs: build-binaries name: Verify Genesis State - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 steps: - name: Set Env Vars @@ -765,7 +765,7 @@ jobs: should-run-benchmarks: if: github.repository == 'LibertyDSNP/frequency' name: Run Benchmarks? - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/libertydsnp/frequency/ci-base-image:1.0.0 outputs: should_run_benchmarks: ${{steps.run-benchmarks.outputs.run}} diff --git a/docker/collator-node-local.dockerfile b/docker/collator-node-local.dockerfile index 9e6a6524fa..4f62199d6c 100644 --- a/docker/collator-node-local.dockerfile +++ b/docker/collator-node-local.dockerfile @@ -1,6 +1,6 @@ # Docker image for running collator node node locally against the local relay chain. # Requires to run from repository root and to copy the binary in the build folder. -FROM --platform=linux/amd64 ubuntu:20.04 +FROM --platform=linux/amd64 ubuntu:22.04 LABEL maintainer="Frequency" LABEL description="Frequency collator node for local relay chain" diff --git a/docker/instant-seal-node.dockerfile b/docker/instant-seal-node.dockerfile index cb630ed102..c05b6da8f0 100644 --- a/docker/instant-seal-node.dockerfile +++ b/docker/instant-seal-node.dockerfile @@ -2,7 +2,7 @@ # locally in instant seal mode. Requires to run from repository root and to copy # the binary in the build folder. # This is the build stage for Polkadot. Here we create the binary in a temporary image. -FROM --platform=linux/amd64 ubuntu:20.04 AS base +FROM --platform=linux/amd64 ubuntu:22.04 AS base LABEL maintainer="Frequency" LABEL description="Frequency collator node in instant seal mode" @@ -10,7 +10,7 @@ LABEL description="Frequency collator node in instant seal mode" RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates # This is the 2nd stage: a very small image where we copy the Frequency binary -FROM --platform=linux/amd64 ubuntu:20.04 +FROM --platform=linux/amd64 ubuntu:22.04 RUN useradd -m -u 1000 -U -s /bin/sh -d /frequency frequency && \ mkdir -p /data /frequency/.local/share && \ diff --git a/docker/parachain-node.dockerfile b/docker/parachain-node.dockerfile index a9aa72f1fb..7d972e944a 100644 --- a/docker/parachain-node.dockerfile +++ b/docker/parachain-node.dockerfile @@ -2,14 +2,14 @@ # for Rococo testnet or Mainnet. Requires to run from repository root and to copy # the binary in the build folder. # This is the build stage for Polkadot. Here we create the binary in a temporary image. -FROM --platform=linux/amd64 ubuntu:20.04 AS base +FROM --platform=linux/amd64 ubuntu:22.04 AS base LABEL maintainer="Frequency" LABEL description="Frequency parachain node for Rococo testnet and Mainnet" RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates # This is the 2nd stage: a very small image where we copy the Frequency binary -FROM --platform=linux/amd64 ubuntu:20.04 +FROM --platform=linux/amd64 ubuntu:22.04 RUN useradd -m -u 1000 -U -s /bin/sh -d /frequency frequency && \ mkdir -p /chain-data /frequency/.local/share && \ diff --git a/docker/standalone-node.dockerfile b/docker/standalone-node.dockerfile index f5d8a5f614..546259581b 100644 --- a/docker/standalone-node.dockerfile +++ b/docker/standalone-node.dockerfile @@ -2,7 +2,7 @@ # locally as a standalone node. Requires to run from repository root and to copy # the binary in the build folder. # This is the build stage for Polkadot. Here we create the binary in a temporary image. -FROM --platform=linux/amd64 ubuntu:20.04 AS base +FROM --platform=linux/amd64 ubuntu:22.04 AS base LABEL maintainer="Frequency" LABEL description="Frequency standalone node" @@ -10,7 +10,7 @@ LABEL description="Frequency standalone node" RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates # This is the 2nd stage: a very small image where we copy the Frequency binary -FROM --platform=linux/amd64 ubuntu:20.04 +FROM --platform=linux/amd64 ubuntu:22.04 RUN useradd -m -u 1000 -U -s /bin/sh -d /frequency frequency && \ mkdir -p /data /frequency/.local/share && \ diff --git a/tools/ci/docker/ci-base-image.dockerfile b/tools/ci/docker/ci-base-image.dockerfile index 54f147cd21..2726922635 100644 --- a/tools/ci/docker/ci-base-image.dockerfile +++ b/tools/ci/docker/ci-base-image.dockerfile @@ -1,5 +1,4 @@ -FROM --platform=linux/amd64 ubuntu:20.04 -# FROM ubuntu:20.04 +FROM --platform=linux/amd64 ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive LABEL maintainer="Frequency" LABEL description="Frequency CI Base Image"