mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-07 11:10:16 +01:00
56a35437b4
Change source of most of test image samples from docker-hub to local building ones, so it will cost less docker-hub pull requests. And some of cases like push cnab, they have to use docker-hub, but image samples in cnab test will cost 17 quotas, in this PR, we replace those samples, now cnab case will cost 6 quotas. Signed-off-by: danfengliu <danfengl@vmware.com>
23 lines
603 B
Bash
Executable File
23 lines
603 B
Bash
Executable File
#!/bin/sh
|
|
IP=$1
|
|
NOTARY_URL=$5
|
|
PASSHRASE='Harbor12345'
|
|
|
|
echo $IP
|
|
|
|
export DOCKER_CONTENT_TRUST=1
|
|
export DOCKER_CONTENT_TRUST_SERVER=$NOTARY_URL
|
|
|
|
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 $3:$4 $IP/$2/$3:$4
|
|
docker push $IP/$2/$3:$4
|
|
|