mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 18:48:02 +01:00
6e131d511c
This commit modify the log message from upstream notary DB migrator, to make sure the DB URL is not displayed. Fixes #7510 Signed-off-by: Daniel Jiang <jiangd@vmware.com>
32 lines
797 B
Bash
Executable File
32 lines
797 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set +e
|
|
|
|
if [ -z $2 ]; then
|
|
error "Please set the notary and migrate version"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Building notary and golang-migrate from source, notary version: $1, golang-migrate version: $2"
|
|
set -e
|
|
|
|
# the temp folder to store binary file...
|
|
mkdir -p binary
|
|
rm -rf binary/* || true
|
|
|
|
cd `dirname $0`
|
|
docker build --build-arg NOTARY_VERSION=$1 --build-arg MIGRATE_VERSION=$2 -f ./binary.Dockerfile -t notary-binary .
|
|
|
|
echo 'copy the binary files to local...'
|
|
ID=$(docker create notary-binary)
|
|
docker cp $ID:/go/bin/notary-server binary/
|
|
docker cp $ID:/go/bin/notary-signer binary/
|
|
docker cp $ID:/go/bin/migrate binary/
|
|
docker cp $ID:/migrations binary/
|
|
|
|
sed -i 's/waiting for $DB_URL/waiting for database/g' binary/migrations/migrate.sh
|
|
|
|
docker rm -f $ID
|
|
docker rmi -f notary-binary
|
|
|