Skip to content

Commit

Permalink
CI/Docker: Update Ubuntu to 22.04 (#1857)
Browse files Browse the repository at this point in the history
# Goal
The goal of this PR is to switch everything to the newer Ubuntu LTS of
22.04

Closes #1541
  • Loading branch information
wilwade authored Jan 29, 2024
1 parent 379a82b commit cdf6966
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-polkadot-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-issue-dependabot-alert-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/merge-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-dev-ci-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/verify-pr-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion docker/collator-node-local.dockerfile
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
4 changes: 2 additions & 2 deletions docker/instant-seal-node.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# 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"

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 && \
Expand Down
4 changes: 2 additions & 2 deletions docker/parachain-node.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
4 changes: 2 additions & 2 deletions docker/standalone-node.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# 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"

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 && \
Expand Down
3 changes: 1 addition & 2 deletions tools/ci/docker/ci-base-image.dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit cdf6966

Please sign in to comment.