mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-05 00:23:33 +01:00
37 lines
915 B
Plaintext
37 lines
915 B
Plaintext
|
#!/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 .
|