-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3282 from wy65701436/cherry-pick-notary
Cherry pick notary TC change.
- Loading branch information
Showing
2 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 15 additions & 3 deletions
18
tests/robot-cases/Group9-Content-trust/notary-push-image.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
#!/bin/bash | ||
|
||
docker pull tomcat | ||
docker pull tomcat:latest | ||
|
||
IP=`ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'` | ||
PASSHRASE='Harbor12345' | ||
|
||
echo $IP | ||
|
||
export DOCKER_CONTENT_TRUST=1 | ||
export DOCKER_CONTENT_TRUST_SERVER=https://$IP:4443 | ||
|
||
docker login -u admin -p Harbor12345 $IP | ||
export NOTARY_ROOT_PASSPHRASE=$PASSHRASE | ||
export NOTARY_TARGETS_PASSPHRASE=$PASSHRASE | ||
export NOTARY_SNAPSHOT_PASSPHRASE=$PASSHRASE | ||
export DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE=$PASSHRASE | ||
export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE=$PASSHRASE | ||
export DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE=$PASSHRASE | ||
export DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE=$PASSHRASE | ||
|
||
docker login -u admin -p Harbor12345 $IP | ||
docker tag tomcat $IP/library/tomcat:latest | ||
python ./tests/robot-cases/Group9-Content-trust/notary-push-image.py | ||
docker push $IP/library/tomcat:latest | ||
|