Split build-images into build-images and push-images
Modified loading of SOLUTION and MANIFEST so they support nested substitution Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
b2ae8bc57c
commit
c39172c2bf
@ -1,15 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Bring in the variables from SOLUTION file
|
||||
#
|
||||
# Determine if it is Mac OS and switch to use gxargs instead
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' SOLUTION | ${CMD} -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | ${CMD} -d '\n')
|
||||
# Bring in the variables from SOLUTION file, supporting
|
||||
# nested substitution
|
||||
. SOLUTION
|
||||
. MANIFEST
|
||||
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" SOLUTION | ${CMD} -d '\n')
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
|
||||
# Remove the Dockerfile if it exists; should check
|
||||
|
@ -1,16 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Bring in the variables from SOLUTION file
|
||||
#
|
||||
# Determine if it is Mac OS and switch to use gxargs instead
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' SOLUTION | ${CMD} -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | ${CMD} -d '\n')
|
||||
# Bring in the variables from SOLUTION file, supporting
|
||||
# nested substitution
|
||||
. SOLUTION
|
||||
. MANIFEST
|
||||
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" SOLUTION | ${CMD} -d '\n')
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
docker build . -t ${CONTAINER}:agama-${AGAMA_VERSION} || {
|
||||
cat << EOM
|
||||
@ -22,32 +24,14 @@ EOM
|
||||
}
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} ${CONTAINER}
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} ${REPO_URL}/${CONTAINER}:devel
|
||||
docker push ${REPO_URL}/${CONTAINER}:devel
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat << EOM
|
||||
This image was pushed to the devel tag
|
||||
This image was built and locally tagged as ${CONTAINER}:agama-${AGAMA_VERSION}
|
||||
|
||||
amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:devel
|
||||
|
||||
If the build looks good, you should commit the changes
|
||||
to Dockerfile and tag it as agama-${AGAMA_VERSION}
|
||||
|
||||
git commit -s -a -m "Build of agama-${AGAMA_VERSION}"
|
||||
git tag -f agama-${AGAMA_VERSION}
|
||||
|
||||
To push to Harbor:
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:agama-${AGAMA_VERSION}
|
||||
docker push amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:agama-${AGAMA_VERSION}
|
||||
|
||||
If this is a good build, then roll the 'latest' tag to it.
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:latest
|
||||
docker push amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:latest
|
||||
See 'scripts/push-images' for information on pushing this tag to Harbor.
|
||||
|
||||
EOM
|
||||
|
@ -1,14 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Bring in the variables from SOLUTION file
|
||||
#
|
||||
# Determine if it is Mac OS and switch to use gxargs instead
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' SOLUTION | ${CMD} -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | ${CMD} -d '\n')
|
||||
# Bring in the variables from SOLUTION file, supporting
|
||||
# nested substitution
|
||||
. SOLUTION
|
||||
. MANIFEST
|
||||
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" SOLUTION | ${CMD} -d '\n')
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
docker rmi ${REPO_URL}/${CONTAINER}:devel
|
||||
|
@ -1,14 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Bring in the variables from SOLUTION file
|
||||
#
|
||||
# Determine if it is Mac OS and switch to use gxargs instead
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
export $(grep -v '^#' SOLUTION | ${CMD} -d '\n')
|
||||
export $(grep -v '^#' MANIFEST | ${CMD} -d '\n')
|
||||
# Bring in the variables from SOLUTION file, supporting
|
||||
# nested substitution
|
||||
. SOLUTION
|
||||
. MANIFEST
|
||||
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" SOLUTION | ${CMD} -d '\n')
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
mkdir $(pwd)/media
|
||||
wget -O $(pwd)/media/AUD_MW_E.264 \
|
||||
@ -20,4 +24,4 @@ docker run \
|
||||
-e QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} \
|
||||
--volume $(pwd)/media:/media \
|
||||
${REPO_URL}/${CONTAINER}:devel \
|
||||
test
|
||||
test
|
||||
|
45
scripts/push-images
Executable file
45
scripts/push-images
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Determine if it is Mac OS and switch to use gxargs instead
|
||||
CMD=xargs
|
||||
if [ $(which system_profiler) ]; then
|
||||
CMD=gxargs
|
||||
fi
|
||||
|
||||
# Bring in the variables from SOLUTION file, supporting
|
||||
# nested substitution
|
||||
. SOLUTION
|
||||
. MANIFEST
|
||||
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" SOLUTION | ${CMD} -d '\n')
|
||||
export $(sed -nE "s,(^[^#][^=]*).*$,\1,pg" MANIFEST | ${CMD} -d '\n')
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} ${REPO_URL}/${CONTAINER}:devel
|
||||
docker push ${REPO_URL}/${CONTAINER}:devel
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat << EOM
|
||||
This image was pushed to the devel tag
|
||||
|
||||
amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:devel
|
||||
|
||||
If the build looks good, you should commit the changes
|
||||
to Dockerfile and tag it as agama-${AGAMA_VERSION}
|
||||
|
||||
git commit -s -a -m "Build of agama-${AGAMA_VERSION}"
|
||||
git tag -f agama-${AGAMA_VERSION}
|
||||
|
||||
To push to the tag to Harbor:
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:agama-${AGAMA_VERSION}
|
||||
docker push amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:agama-${AGAMA_VERSION}
|
||||
|
||||
If this is a good build, then roll the 'latest' tag to it.
|
||||
|
||||
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:latest
|
||||
docker push amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:latest
|
||||
|
||||
EOM
|
Loading…
x
Reference in New Issue
Block a user