22 lines
684 B
Bash
22 lines
684 B
Bash
#!/bin/sh
|
|
|
|
name="cicd/jenkins-nodejs-agent"
|
|
tag="1.0.0"
|
|
harborurl="harbor-wtkp3fsbv6.vertexa.devbay.tech"
|
|
user="'robot$jenkins'"
|
|
password="'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz'"
|
|
echo "-------------------------------------------"
|
|
echo "login"
|
|
docker login $harborurl -u $user -p $password
|
|
echo "-------------------------------------------"
|
|
echo "build"
|
|
docker build -t $name:$tag .
|
|
echo "-------------------------------------------"
|
|
echo "tag"
|
|
echo "-------------------------------------------"
|
|
docker tag $name:$tag $harborurl/$name:$tag
|
|
echo "-------------------------------------------"
|
|
echo "push"
|
|
echo "-------------------------------------------"
|
|
docker push $harborurl/$name:$tag
|