This repository was archived by the owner on Feb 20, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ LABEL io.k8s.description="$DESCRIPTION" \
3838 summary="$SUMMARY" \
3939 description="$DESCRIPTION" \
4040 version="$NODE_VERSION" \
41- name="nodeshift/centos7-s2i-nodejs"
41+ name="nodeshift/centos7-s2i-nodejs" \
42+ usage="s2i build . nodeshift/centos7-s2i-nodejs myapp"
4243
4344COPY ./s2i/ $STI_SCRIPTS_PATH
4445COPY ./contrib/ /opt/app-root
Original file line number Diff line number Diff line change @@ -259,7 +259,20 @@ url.https://github.com.insteadof=ssh://git@github.com"
259259 fi
260260}
261261
262+ test_image_usage_label () {
263+ local expected=" s2i build . nodeshift/centos7-s2i-nodejs myapp"
264+ echo " Checking image usage label ..."
265+ out=$( docker inspect --format ' {{ index .Config.Labels "usage" }}' $BUILDER )
266+ if ! echo " ${out} " | grep -q " ${expected} " ; then
267+ echo " ERROR[docker inspect --format \" {{ index .Config.Labels \" usage\" }}\" ] Expected '${expected} ', got '${out} '"
268+ return 1
269+ fi
270+ }
271+
262272prepare
273+ test_image_usage_label
274+ check_result $?
275+
263276test_builder_node_version
264277check_result $?
265278
You can’t perform that action at this time.
0 commit comments