Skip to content

Bump github.com/docker/docker from 24.0.6+incompatible to 24.0.7+incompatible #3738

Bump github.com/docker/docker from 24.0.6+incompatible to 24.0.7+incompatible

Bump github.com/docker/docker from 24.0.6+incompatible to 24.0.7+incompatible #3738

Workflow file for this run

---
name: CICD
on:
push:
branches:
- main
- docs-publish
tags:
- "v*"
pull_request:
workflow_dispatch:
env:
GOVER: 1.20.2
CGO_ENABLED: 0
MKDOCS_INS_VER: 9.1.4-insiders-4.32.4-hellt
GORELEASER_VER: v1.11.4
PODMAN_VER: v4.4.2
jobs:
file-changes:
runs-on: ubuntu-22.04
outputs:
code: ${{ steps.filter.outputs.code }}
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
code:
- 'clab/**'
- 'runtime/**'
- 'cmd/**'
- 'tests/**'
- 'nodes/**'
- 'links/**'
- 'types/**'
- 'utils/**'
- 'netconf/**'
- 'labels/**'
- 'internal/**'
- 'errors/**'
- 'cert/**'
- 'virt/**'
- 'border0_api/**'
- '.github/workflows/cicd.yml'
- 'go.mod'
- 'Makefile'
docs:
- "docs/**"
- "lab-examples/**"
- "mkdocs.yml"
- "README.md"
- '.github/workflows/cicd.yml'
build-containerlab:
runs-on: ubuntu-22.04
needs: file-changes
if: needs.file-changes.outputs.code == 'true' || startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: WillAbides/setup-go-faster@v1.12.0
with:
go-version: ${{ env.GOVER }}
- name: Cache go modules
uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build containerlab
run: make build-with-podman-debug BINARY=containerlab
# store clab binary as artifact
- uses: actions/upload-artifact@v3
with:
name: containerlab
path: containerlab
staticcheck:
runs-on: ubuntu-22.04
needs: file-changes
if: needs.file-changes.outputs.code == 'true' || startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: WillAbides/setup-go-faster@v1.12.0
with:
go-version: ${{ env.GOVER }}
- name: Staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...
unit-test:
runs-on: ubuntu-22.04
needs: file-changes
if: needs.file-changes.outputs.code == 'true' || startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: WillAbides/setup-go-faster@v1.12.0
with:
go-version: ${{ env.GOVER }}
- name: Cache go modules
uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: make test
# upload coverage report from unit tests, as they are then
# merged with e2e tests coverage
- uses: actions/upload-artifact@v3
if: always()
with:
name: coverage
path: ./tests/coverage/*
retention-days: 7
smoke-tests:
runs-on: ubuntu-22.04
strategy:
matrix:
runtime:
- "docker"
- "podman"
needs:
- unit-test
- staticcheck
- build-containerlab
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: containerlab
- name: Move containerlab to usr/bin
run: sudo mv ./containerlab /usr/bin/containerlab && sudo chmod a+x /usr/bin/containerlab
- name: Setup Podman
if: matrix.runtime == 'podman'
run: |
sudo apt purge -y podman
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
sudo apt update
sudo apt install -y podman
sudo systemctl start podman
- uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: pip
cache-dependency-path: "tests/requirements.txt"
- name: Install robotframework
run: |
pip install -r tests/requirements.txt
- name: Run smoke tests
run: |
bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/01-smoke
# upload test reports as a zip file
- uses: actions/upload-artifact@v3
if: always()
with:
name: 01-smoke-log
path: ./tests/out/*.html
# upload coverage report from unit tests, as they are then
# merged with e2e tests coverage
- uses: actions/upload-artifact@v3
if: always()
with:
name: coverage
path: ./tests/coverage/*
retention-days: 7
ext-container-tests:
runs-on: ubuntu-22.04
strategy:
matrix:
runtime:
- "docker"
needs:
- unit-test
- staticcheck
- build-containerlab
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: containerlab
- name: Move containerlab to usr/bin
run: sudo mv ./containerlab /usr/bin/containerlab && sudo chmod a+x /usr/bin/containerlab
- uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: pip
cache-dependency-path: "tests/requirements.txt"
- name: Install robotframework
run: |
pip install -r tests/requirements.txt
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: |
bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/06-ext-container
# upload test reports as a zip file
- uses: actions/upload-artifact@v3
if: always()
with:
name: 06-ext-container-log
path: ./tests/out/*.html
# upload coverage report from unit tests, as they are then
# merged with e2e tests coverage
- uses: actions/upload-artifact@v3
if: always()
with:
name: coverage
path: ./tests/coverage/*
retention-days: 7
ceos-basic-tests:
runs-on: ubuntu-22.04
strategy:
matrix:
runtime:
- "docker"
needs:
- unit-test
- staticcheck
- build-containerlab
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: containerlab
- name: Move containerlab to usr/bin
run: sudo mv ./containerlab /usr/bin/containerlab && sudo chmod a+x /usr/bin/containerlab
- uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: pip
cache-dependency-path: "tests/requirements.txt"
- name: Install robotframework
run: |
pip install -r tests/requirements.txt
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull ceos image
run: docker pull ghcr.io/srl-labs/ceos:4.28.0F && docker tag ghcr.io/srl-labs/ceos:4.28.0F ceos:4.28.0F
- name: Run ceos tests
run: |
bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/03-basic-ceos
# upload test reports as a zip file
- uses: actions/upload-artifact@v3
if: always()
with:
name: 03-basic-ceos-log
path: ./tests/out/*.html
# upload coverage report from unit tests, as they are then
# merged with e2e tests coverage
- uses: actions/upload-artifact@v3
if: always()
with:
name: coverage
path: ./tests/coverage/*
retention-days: 7
srlinux-basic-tests:
runs-on: ubuntu-22.04
strategy:
matrix:
runtime:
- "docker"
- "podman"
needs:
- unit-test
- staticcheck
- build-containerlab
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: containerlab
- name: Move containerlab to usr/bin
run: sudo mv ./containerlab /usr/bin/containerlab && sudo chmod a+x /usr/bin/containerlab
- name: Setup Podman
if: matrix.runtime == 'podman'
# check http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/amd64/
# for available podman releases
run: |
sudo apt purge -y podman
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
sudo apt update
sudo apt install -y podman
sudo systemctl start podman
- uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: pip
cache-dependency-path: "tests/requirements.txt"
- name: Install robotframework
run: |
pip install -r tests/requirements.txt
- name: Run srlinux tests
run: |
bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/02-basic-srl
# upload test reports as a zip file
- uses: actions/upload-artifact@v3
if: always()
with:
name: 02-basic-srl-log
path: ./tests/out/*.html
# upload coverage report from unit tests, as they are then
# merged with e2e tests coverage
- uses: actions/upload-artifact@v3
if: always()
with:
name: coverage
path: ./tests/coverage/*
retention-days: 7
ixiac-one-basic-tests:
runs-on: ubuntu-22.04
strategy:
matrix:
runtime:
- "docker"
needs:
- unit-test
- staticcheck
- build-containerlab
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: containerlab
- name: Move containerlab to usr/bin
run: sudo mv ./containerlab /usr/bin/containerlab && sudo chmod a+x /usr/bin/containerlab
- uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: pip
cache-dependency-path: "tests/requirements.txt"
- name: Install robotframework
run: |
pip install -r tests/requirements.txt
- name: Run keysight_ixia-c-one tests
run: |
bash ./tests/rf-run.sh ${{ matrix.runtime }} ./tests/04-basic-ixiacone
# upload test reports as a zip file
- uses: actions/upload-artifact@v3
if: always()
with:
name: 04-basic-ixiacone-log
path: ./tests/out/*.html
# upload coverage report from unit tests, as they are then
# merged with e2e tests coverage
- uses: actions/upload-artifact@v3
if: always()
with:
name: coverage
path: ./tests/coverage/*
retention-days: 7
vxlan-tests:
uses: ./.github/workflows/vxlan-tests.yml
needs:
- unit-test
- staticcheck
- build-containerlab
# a job that downloads coverage artifact and uses codecov to upload it
coverage:
runs-on: ubuntu-22.04
needs:
- unit-test
- smoke-tests
- ext-container-tests
- ceos-basic-tests
- srlinux-basic-tests
- ixiac-one-basic-tests
- vxlan-tests
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: WillAbides/setup-go-faster@v1.12.0
with:
go-version: ${{ env.GOVER }}
- uses: actions/download-artifact@v3
with:
name: coverage
path: tests/coverage
- name: convert Go's binary coverage to text coverage
run: make convert-coverage
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
docs-test:
runs-on: ubuntu-22.04
needs: file-changes
if: needs.file-changes.outputs.docs == 'true' || startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/docs-publish'
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: docker run -v $(pwd):/docs --user $(id -u):$(id -g) --entrypoint mkdocs ghcr.io/srl-labs/mkdocs-material-insiders:$MKDOCS_INS_VER build --clean --strict
- name: Cache htmltest external links
uses: actions/cache@v3
with:
path: tmp/.htmltest
# key will contain hash of all md files to check if files have changed
# when files are changed, a new key name is formed, and thus a new cache will be saved
key: htmltest-${{ hashFiles('docs/**/*.md') }}
# the restore key will fetch any previously saved cache even if there is no match on key
# this allows to use cache from prev runs and update it
restore-keys: |
htmltest-
- name: htmltest
uses: wjdp/htmltest-action@master
with:
config: docs/htmltest.yml
build-and-release:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs:
- docs-test
- unit-test
- smoke-tests
- ceos-basic-tests
- srlinux-basic-tests
- ixiac-one-basic-tests
- ext-container-tests
- vxlan-tests
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: WillAbides/setup-go-faster@v1.12.0
with:
go-version: ${{ env.GOVER }}
- name: Cache go modules
uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: ${{ env.GORELEASER_VER }}
args: release --rm-dist --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }}
publish-docs:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-') != true
needs: build-and-release
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: docker run -v $(pwd):/docs --user $(id -u):$(id -g) --entrypoint mkdocs ghcr.io/srl-labs/mkdocs-material-insiders:$MKDOCS_INS_VER gh-deploy --force --strict
# update docs allows to make the docs changes outside of the release cycle
# it skips the code build/release and proceeds with docs publishing
# the intended usage is to provide fixes/updates to docs, which do not require code changes
update-docs:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/docs-publish'
needs: docs-test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: docker run -v $(pwd):/docs --user $(id -u):$(id -g) --entrypoint mkdocs ghcr.io/srl-labs/mkdocs-material-insiders:$MKDOCS_INS_VER gh-deploy --force --strict