Skip to content

Commit a036a83

Browse files
author
Evan Lezar
committed
Merge branch 'improve-release-tests' into 'master'
Extend release testing toolking to allow for upgrade testing See merge request nvidia/container-toolkit/container-toolkit!54
2 parents 28f6b7c + ee0b908 commit a036a83

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

test/release/docker/ubuntu18.04/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ RUN fpm -s empty \
4040

4141

4242
ARG WORKFLOW=nvidia-docker
43-
ARG TEST_REPO=nvidia.github.io
4443
RUN curl -s -L https://nvidia.github.io/${WORKFLOW}/gpgkey | apt-key add - \
4544
&& curl -s -L https://nvidia.github.io/${WORKFLOW}/ubuntu18.04/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list \
4645
&& apt-get update
4746

4847
COPY entrypoint.sh /
48+
COPY install_repo.sh /
4949

5050
ENTRYPOINT [ "/entrypoint.sh" ]

test/release/docker/ubuntu18.04/entrypoint.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ if [[ -d ${LOCAL_REPO_DIRECTORY} ]]; then
2424
echo "Setting up local-repository"
2525
echo "deb [trusted=yes] file:/local-repository ./" > /etc/apt/sources.list.d/local.list
2626
$(cd /local-repository && apt-ftparchive packages . > Packages)
27-
apt-get update
27+
elif [[ -n ${TEST_REPO} ]]; then
28+
./install_repo.sh ${TEST_REPO}
2829
else
29-
echo "Setting up TEST repo: ${TEST_REPO}"
30-
sed -i -e 's#nvidia\.github\.io/libnvidia-container#${TEST_REPO}/libnvidia-container#g' /etc/apt/sources.list.d/nvidia-docker.list
31-
sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/nvidia-docker.list
32-
apt-get update
30+
echo "Skipping repo setup"
3331
fi
32+
apt-get update
3433

3534
exec bash $@
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# This script is used to build the packages for the components of the NVIDIA
18+
# Container Stack. These include the nvidia-container-toolkit in this repository
19+
# as well as the components included in the third_party folder.
20+
# All required packages are generated in the specified dist folder.
21+
22+
test_repo=$1
23+
echo "Setting up TEST repo: ${test_repo}"
24+
sed -i -e "s#nvidia\.github\.io/libnvidia-container#${test_repo}/libnvidia-container#g" /etc/apt/sources.list.d/nvidia-docker.list
25+
sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/nvidia-docker.list

0 commit comments

Comments
 (0)