lj1412 | 691b0ab | 2017-02-18 23:45:12 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Create a debian package and push to remote repo |
| 3 | # |
| 4 | # |
| 5 | # build the docker image. tag and then push to the remote repo |
| 6 | # |
| 7 | |
| 8 | # !!! make sure the yaml file include docker-login as a builder before calling |
| 9 | # this script |
| 10 | |
lj1412 | 80c0bda | 2017-02-20 04:13:48 +0000 | [diff] [blame] | 11 | IMAGE='dcae_dmaapbc' |
| 12 | TAG='1.0.0' |
lj1412 | 691b0ab | 2017-02-18 23:45:12 +0000 | [diff] [blame] | 13 | LFQI="${IMAGE}:${TAG}" |
| 14 | BUILD_PATH="${WORKSPACE}" |
| 15 | |
| 16 | # build a docker image |
lj1412 | 80c0bda | 2017-02-20 04:13:48 +0000 | [diff] [blame] | 17 | docker build --rm -f "${WORKSPACE}"/Dockerfile -t "${LFQI}" "${BUILD_PATH}" |
lj1412 | 691b0ab | 2017-02-18 23:45:12 +0000 | [diff] [blame] | 18 | |
| 19 | |
| 20 | # |
| 21 | # push the image |
| 22 | # |
| 23 | # io registry DOCKER_REPOSITORIES="nexus3.openecomp.org:10001 \ |
| 24 | # release registry nexus3.openecomp.org:10002 \ |
| 25 | # snapshot registry nexus3.openecomp.org:10003" |
lj1412 | 80c0bda | 2017-02-20 04:13:48 +0000 | [diff] [blame] | 26 | REPO='nexus3.openecomp.org:10003' |
lj1412 | 691b0ab | 2017-02-18 23:45:12 +0000 | [diff] [blame] | 27 | RFQI="${REPO}/${LFQI}" |
| 28 | docker tag ${LFQI} ${RFQI} |
| 29 | docker push ${RFQI} |
| 30 | |