Skip to content

Commit

Permalink
fix notary
Browse files Browse the repository at this point in the history
  • Loading branch information
stonezdj committed Jul 19, 2019
1 parent 2e8a8a2 commit 797fc34
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/harbor-common/spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ files:
- harbor-common/common.sh
- harbor-common/utils.sh
- harbor-common/notary-migration-fix.sh
- harbor-common/fix-notary.sql
File renamed without changes.
6 changes: 3 additions & 3 deletions src/harbor-common/notary-migration-fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ set -ex

harbor_db_image=$($DOCKER_CMD images goharbor/harbor-db --format "{{.Repository}}:{{.Tag}}")
harbor_db_path="/data/database"
fix_notary_sql_path="/var/vcap/packages/harbor-common/fix_notary.sql"
fix_notary_sql_path="/var/vcap/packages/harbor-common/fix-notary.sql"

launch_db() {
$DOCKER_CMD run -d --name fix-notary-migration -v ${harbor_db_path}:/var/lib/postgresql/data -v ${fix_notary_sql_path}:/fix_notary.sql ${harbor_db_image} "postgres"
$DOCKER_CMD run -d --name fix-notary-migration -v ${harbor_db_path}:/var/lib/postgresql/data -v ${fix_notary_sql_path}:/fix-notary.sql ${harbor_db_image} "postgres"
}

clean_db() {
Expand Down Expand Up @@ -50,7 +50,7 @@ wait_for_db_ready() {
}

fix_notary() {
$DOCKER_CMD exec fix-notary-migration psql -U postgres -f "/fix_notary.sql"
$DOCKER_CMD exec fix-notary-migration psql -U postgres -f "/fix-notary.sql"
}

launch_db
Expand Down

0 comments on commit 797fc34

Please sign in to comment.