mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 01:27:49 +01:00
9961d8b0d6
Add notary remove signature test case in nightly 1. Update E2E image Dockerfile for adding notary CLI; 2. Add test case of remove notary signature. Signed-off-by: Danfeng Liu (c) <danfengl@vmware.com>
30 lines
775 B
Bash
Executable File
30 lines
775 B
Bash
Executable File
#!/bin/bash
|
|
|
|
docker pull $3:$4
|
|
|
|
IP=$1
|
|
PASSHRASE='Harbor12345'
|
|
|
|
echo $IP
|
|
|
|
mkdir -p /etc/docker/certs.d/$IP/
|
|
mkdir -p ~/.docker/tls/$IP:4443/
|
|
|
|
cp /notary_ca/ca.crt /etc/docker/certs.d/$IP/
|
|
cp /notary_ca/ca.crt ~/.docker/tls/$IP:4443/
|
|
|
|
export DOCKER_CONTENT_TRUST=1
|
|
export DOCKER_CONTENT_TRUST_SERVER=https://$IP:4443
|
|
|
|
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
|