Skip to content

Commit

Permalink
Merge pull request #1448 from ktock/disable-main-test
Browse files Browse the repository at this point in the history
CI: temporary disable containerd main branch integration test
ktock authored Oct 30, 2023
2 parents 2713db5 + 7ff52aa commit 22780dc
Showing 4 changed files with 44 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,8 @@ on:

env:
DOCKER_BUILDKIT: 1
DOCKER_BUILD_ARGS: --build-arg=CONTAINERD_VERSION=main # do tests with the latest containerd
# Temporary disable contaienrd main branch test and migrate to containerd v2 after it's released.
# DOCKER_BUILD_ARGS: --build-arg=CONTAINERD_VERSION=main # do tests with the latest containerd

jobs:
integration:
48 changes: 29 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -52,16 +52,18 @@ jobs:
strategy:
fail-fast: false
matrix:
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
# Temporary disable contaienrd main branch test and migrate to containerd v2 after it's released.
# buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
buildargs: [""]
builtin: ["true", "false"]
metadata-store: ["memory", "db"]
exclude:
- buildargs: ""
builtin: "true"
# - buildargs: ""
# builtin: "true"
- metadata-store: "db"
builtin: "true"
- metadata-store: "db"
buildargs: "--build-arg=CONTAINERD_VERSION=main"
# - metadata-store: "db"
# buildargs: "--build-arg=CONTAINERD_VERSION=main"
steps:
- name: Install htpasswd for setting up private registry
run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils
@@ -79,7 +81,9 @@ jobs:
strategy:
fail-fast: false
matrix:
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
# Temporary disable contaienrd main branch test and migrate to containerd v2 after it's released.
# buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
buildargs: [""]
steps:
- name: Install htpasswd for setting up private registry
run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils
@@ -95,11 +99,13 @@ jobs:
strategy:
fail-fast: false
matrix:
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
# Temporary disable contaienrd main branch test and migrate to containerd v2 after it's released.
# buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
buildargs: [""]
builtin: ["true", "false"]
exclude:
- buildargs: ""
builtin: "true"
# exclude:
# - buildargs: ""
# builtin: "true"
steps:
- name: Install htpasswd for setting up private registry
run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils
@@ -116,11 +122,13 @@ jobs:
strategy:
fail-fast: false
matrix:
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
# Temporary disable contaienrd main branch test and migrate to containerd v2 after it's released.
# buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
buildargs: [""]
builtin: ["true", "false"]
exclude:
- buildargs: ""
builtin: "true"
# exclude:
# - buildargs: ""
# builtin: "true"
steps:
- name: Install htpasswd for setting up private registry
run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils
@@ -137,16 +145,18 @@ jobs:
strategy:
fail-fast: false
matrix:
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
# Temporary disable contaienrd main branch test and migrate to containerd v2 after it's released.
# buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
buildargs: [""]
builtin: ["true", "false"]
metadata-store: ["memory", "db"]
exclude:
- buildargs: ""
builtin: "true"
# - buildargs: ""
# builtin: "true"
- metadata-store: "db"
builtin: "true"
- metadata-store: "db"
buildargs: "--build-arg=CONTAINERD_VERSION=main"
# - metadata-store: "db"
# buildargs: "--build-arg=CONTAINERD_VERSION=main"
steps:
- uses: actions/checkout@v4
- name: Validate containerd through CRI
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -63,6 +63,16 @@ RUN apt-get update -y && apt-get install -y libbtrfs-dev libseccomp-dev && \
echo 'replace github.com/containerd/stargz-snapshotter => '$GOPATH'/src/github.com/containerd/stargz-snapshotter' >> integration/client/go.mod && \
echo 'replace github.com/containerd/stargz-snapshotter/estargz => '$GOPATH'/src/github.com/containerd/stargz-snapshotter/estargz' >> integration/client/go.mod ; \
fi && \
if [ "$(echo -n ${CONTAINERD_VERSION} | head -c 4)" = "v1.7" ] ; then \
# containerd v1.7 doesn't support cri-api >= v0.28 which adds RuntimeConfig API
echo 'replace k8s.io/cri-api => k8s.io/cri-api v0.27.1' >> go.mod ; \
if [ -f api/go.mod ] ; then \
echo 'replace k8s.io/cri-api => k8s.io/cri-api v0.27.1' >> api/go.mod ; \
fi ; \
if [ -f integration/client/go.mod ] ; then \
echo 'replace k8s.io/cri-api => k8s.io/cri-api v0.27.1' >> integration/client/go.mod ; \
fi ; \
fi && \
echo 'package main \nimport _ "github.com/containerd/stargz-snapshotter/service/plugin"' > cmd/containerd/builtins_stargz_snapshotter.go && \
make vendor && make && DESTDIR=/out/ PREFIX= make install

4 changes: 3 additions & 1 deletion script/optimize/optimize/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -205,7 +205,9 @@ echo "Checking optimized image..."
WORKING_DIR=$(mktemp -d)
git config --global --add safe.directory '/go/src/github.com/containerd/stargz-snapshotter'
PREFIX=/tmp/out/ make clean
PREFIX=/tmp/out/ GO_BUILD_FLAGS="-race" make ctr-remote # Check data race
# temporary disable -race flag to run test with statically built binaries
# PREFIX=/tmp/out/ GO_BUILD_FLAGS="-race" make ctr-remote # Check data race
PREFIX=/tmp/out/ make ctr-remote
/tmp/out/ctr-remote ${OPTIMIZE_COMMAND} -entrypoint='[ "/accessor" ]' "${ORG_IMAGE_TAG}" "${OPT_IMAGE_TAG}"
nerdctl push "${OPT_IMAGE_TAG}" || true
cat <<EOF > "${WORKING_DIR}/0-want"

0 comments on commit 22780dc

Please sign in to comment.