File tree Expand file tree Collapse file tree 4 files changed +26
-9
lines changed Expand file tree Collapse file tree 4 files changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,12 @@ def genBuildStep(LinkedHashMap pkg, String arch) {
44
44
sh ' docker info'
45
45
}
46
46
stage(" build" ) {
47
- try {
48
- checkout scm
49
- sh " make REF=$branch ${ pkg.target} "
50
- } finally {
51
- sh " make clean "
52
- }
47
+ checkout scm
48
+ sh " make clean "
49
+ sh " make REF=$branch ${ pkg.target} "
50
+ }
51
+ stage( " verify " ) {
52
+ sh " make IMAGE= ${ pkg.image } verify "
53
53
}
54
54
}
55
55
}
Original file line number Diff line number Diff line change @@ -97,3 +97,13 @@ static: checkout ## build static-compiled packages
97
97
for p in $( DOCKER_BUILD_PKGS) ; do \
98
98
$(MAKE ) -C $@ VERSION=$(VERSION ) GO_VERSION=$(GO_VERSION ) TARGETPLATFORM=$(TARGETPLATFORM ) CONTAINERD_VERSION=$(CONTAINERD_VERSION ) RUNC_VERSION=$(RUNC_VERSION ) $$ {p}; \
99
99
done
100
+
101
+ .PHONY : verify
102
+ verify : # # verify installation of packages
103
+ # to verify using packages from staging, use: make VERIFY_PACKAGE_REPO=stage IMAGE=ubuntu:focal verify
104
+ docker run $(VERIFY_PLATFORM) --rm -i \
105
+ -v "$$(pwd):/v" \
106
+ -e DEBIAN_FRONTEND=noninteractive \
107
+ -e PACKAGE_REPO=$(VERIFY_PACKAGE_REPO) \
108
+ -w /v \
109
+ $(IMAGE) ./verify
Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ DOCKER_SCAN_REF ?= v0.17.0
43
43
DOCKER_COMPOSE_REF ?= v2.5.1
44
44
DOCKER_BUILDX_REF ?= v0.8.2
45
45
46
+ # Use "stage" to install dependencies from download-stage.docker.com during the
47
+ # verify step. Leave empty or use any other value to install from download.docker.com
48
+ VERIFY_PACKAGE_REPO ?= staging
49
+
50
+ # Optional flags like --platform=linux/armhf
51
+ VERIFY_PLATFORM ?=
52
+
46
53
export BUILDTIME
47
54
export DEFAULT_PRODUCT_LICENSE
48
55
export PACKAGER_NAME
Original file line number Diff line number Diff line change 6
6
# Description: This runs a smoke test to verify that the packages can be installed corrected
7
7
# ##
8
8
9
- # packaging/ build/${DIST_ID}/${DIST_VERSION}/${ARCH} - location of all packages
9
+ # build/${DIST_ID}/${DIST_VERSION}/${ARCH} - location of all packages
10
10
# Manually Testing: docker run --rm -it -v $(pwd):/v -w /v "centos:7" ./verify
11
11
12
12
set -e
@@ -47,7 +47,7 @@ function verify_deb() {
47
47
48
48
install_debian_containerd
49
49
50
- packages=$( find " packaging/ deb/debbuild/${DIST_ID} -${DIST_VERSION} /" -type f -name " *.deb" )
50
+ packages=$( find " deb/debbuild/${DIST_ID} -${DIST_VERSION} /" -type f -name " *.deb" )
51
51
# All local packages need to be prefixed with `./` or else apt-get doesn't understand where to pull from
52
52
packages=$( echo " ${packages} " | awk ' $0="./"$0' | xargs)
53
53
@@ -120,7 +120,7 @@ function verify_rpm() {
120
120
121
121
# find all rpm packages, exclude src package
122
122
echo " [DEBUG] Installing engine rpms"
123
- packages=$( find " packaging/ rpm/rpmbuild/${DIST_ID} -${DIST_VERSION} /RPMS/" -type f -name " *.rpm" | sed ' /src/d' )
123
+ packages=$( find " rpm/rpmbuild/${DIST_ID} -${DIST_VERSION} /RPMS/" -type f -name " *.rpm" | sed ' /src/d' )
124
124
125
125
# install all non-source packages
126
126
(
You can’t perform that action at this time.
0 commit comments