mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-12 03:47:07 +01:00
37 lines
915 B
Bash
Executable File
37 lines
915 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set +e
|
|
|
|
echo "Usage: #./builder_private [notary version]"
|
|
if [ -z $1 ]; then
|
|
error "Please set the 'version' variable"
|
|
exit 1
|
|
fi
|
|
|
|
VERSION="$1"
|
|
SIGNER_PHOTONIMAGE=vmware/notary-photon:signer-$VERSION
|
|
SERVER_PHOTONIMAGE=vmware/notary-photon:server-$VERSION
|
|
|
|
set -e
|
|
|
|
# the temp folder to store binary file...
|
|
mkdir -p binary
|
|
rm -rf binary/notary-server || true
|
|
rm -rf binary/notary-signer || true
|
|
|
|
cd `dirname $0`
|
|
cur=$PWD
|
|
|
|
# It won't store the notray binary in Harbor repo, so far it's a temporary solution..
|
|
TEMP=`mktemp -d /$TMPDIR/notary.XXXXXX`
|
|
git clone https://github.com/reasonerjt/notary-photon $TEMP
|
|
|
|
echo 'build the notary binary bases on the golang:1.7.3...'
|
|
|
|
cp -rf $TEMP/migrations .
|
|
cp $TEMP/migrate .
|
|
cp $TEMP/notary-server ./binary/
|
|
cp $TEMP/notary-signer ./binary/
|
|
|
|
docker build -f server.Dockerfile -t $SERVER_PHOTONIMAGE .
|
|
docker build -f signer.Dockerfile -t $SIGNER_PHOTONIMAGE . |