Update to use versioned base images for CI. (#16053)

* Update to use versioned base images for CI.

* Fix typos.
This commit is contained in:
Austin S. Hemmelgarn 2023-09-27 07:05:45 -04:00 committed by GitHub
parent fd3de38198
commit 609e2c4acc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 8 deletions

View File

@ -2,13 +2,14 @@
arch="${1}"
platform="$(packaging/makeself/uname2platform.sh "${arch}")"
builder_rev="v1"
docker pull --platform "${platform}" netdata/static-builder
docker pull --platform "${platform}" netdata/static-builder:${builder_rev}
# shellcheck disable=SC2046
cat $(find packaging/makeself/jobs -type f ! -regex '.*\(netdata\|-makeself\).*') > /tmp/static-cache-key-data
docker run -it --rm --platform "${platform}" netdata/static-builder sh -c 'apk list -I 2>/dev/null' >> /tmp/static-cache-key-data
docker run -it --rm --platform "${platform}" netdata/static-builder:${builder_rev} sh -c 'apk list -I 2>/dev/null' >> /tmp/static-cache-key-data
h="$(sha256sum /tmp/static-cache-key-data | cut -f 1 -d ' ')"

View File

@ -228,14 +228,14 @@ jobs:
timeout_seconds: 900
command: |
docker pull --platform ${{ matrix.platform }} ${{ matrix.base_image }}
docker pull --platform ${{ matrix.platform }} netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}
docker pull --platform ${{ matrix.platform }} netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}-v1
- name: Build Packages
id: build
if: needs.file-check.outputs.run == 'true'
shell: bash
run: |
docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 -e VERSION=${{ needs.version-check.outputs.version }} \
--platform=${{ matrix.platform }} -v "$PWD":/netdata netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}
--platform=${{ matrix.platform }} -v "$PWD":/netdata netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}-v1
- name: Save Packages
id: artifacts
if: needs.file-check.outputs.run == 'true'

View File

@ -26,7 +26,7 @@ podman run -it --rm -e VERSION=0.1 -v $PWD:/netdata netdata/package-builders:<ta
The `<tag>` should be the lowercase distribution name with no spaces, followed by the
release of that distribution. For example, `centos7` to build on CentOS 7, or `ubuntu20.04`
to build on Ubuntu 20.04. Note that we use Alma Linux for builds on CentOS/RHEL 8 or newer. See
to build on Ubuntu 20.04. Note that we use Rocky Linux for builds on CentOS/RHEL 8 or newer. See
[netdata/package-builders](https://hub.docker.com/r/netdata/package-builders/tags) for all available tags.
The value passed in the `VERSION` environment variable can be any version number accepted by the type of package

View File

@ -3,7 +3,7 @@
# This image contains preinstalled dependencies
# hadolint ignore=DL3007
FROM netdata/builder:latest as builder
FROM netdata/builder:v1 as builder
# One of 'nightly' or 'stable'
ARG RELEASE_CHANNEL=nightly
@ -59,7 +59,7 @@ RUN mkdir -p /app/usr/sbin/ \
#####################################################################
# This image contains preinstalled dependencies
# hadolint ignore=DL3007
FROM netdata/base:latest as base
FROM netdata/base:v1 as base
LABEL org.opencontainers.image.authors="Netdatabot <bot@netdata.cloud>"
LABEL org.opencontainers.image.url="https://netdata.cloud"

View File

@ -24,7 +24,7 @@ else
exit 1
fi
DOCKER_IMAGE_NAME="netdata/static-builder"
DOCKER_IMAGE_NAME="netdata/static-builder:v1"
if [ "${BUILDARCH}" != "$(uname -m)" ] && [ "$(uname -m)" = 'x86_64' ] && [ -z "${SKIP_EMULATION}" ]; then
${docker} run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1