
Modified loading of SOLUTION and MANIFEST so they support nested substitution Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
46 lines
1.4 KiB
Bash
Executable File
46 lines
1.4 KiB
Bash
Executable File
#!/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
|