Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
UTTEST: true
runs-on:
#- self-hosted
- oracle-vm-24cpu-96gb-x86-64
- ubuntu-24-large
timeout-minutes: 100
steps:
- name: Set up Go 1.23
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
APITEST_DB: true
runs-on:
#- self-hosted
- oracle-vm-24cpu-96gb-x86-64
- ubuntu-24-large
timeout-minutes: 100
steps:
- name: Set up Go 1.23
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
APITEST_DB: true
runs-on:
#- self-hosted
- oracle-vm-24cpu-96gb-x86-64
- ubuntu-24-large
timeout-minutes: 100
steps:
- name: Set up Go 1.23
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
APITEST_LDAP: true
runs-on:
#- self-hosted
- oracle-vm-24cpu-96gb-x86-64
- ubuntu-24-large
timeout-minutes: 100
steps:
- name: Set up Go 1.23
Expand Down Expand Up @@ -289,7 +289,7 @@ jobs:
OFFLINE: true
runs-on:
#- self-hosted
- oracle-vm-24cpu-96gb-x86-64
- ubuntu-24-large
timeout-minutes: 100
steps:
- name: Set up Go 1.23
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
UI_UT: true
runs-on:
#- self-hosted
- oracle-vm-24cpu-96gb-x86-64
- ubuntu-24-large
timeout-minutes: 100
steps:
- uses: actions/setup-node@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
env:
BUILD_PACKAGE: true
runs-on:
- oracle-vm-24cpu-96gb-x86-64
- ubuntu-24-large
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
CONFORMANCE_TEST: true
runs-on:
#- self-hosted
- oracle-vm-24cpu-96gb-x86-64
- ubuntu-24-large
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
runs-on: oracle-vm-24cpu-96gb-x86-64
runs-on: ubuntu-24-large
permissions:
contents: write # Required for creating GitHub releases and uploading assets
id-token: write # Required for Cosign keyless signing
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.15.0
v2.16.0
11 changes: 6 additions & 5 deletions make/harbor.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ https:
# And when it enabled the hostname will no longer used
# external_url: https://reg.mydomain.com:8433

# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: Harbor12345

# Harbor DB configuration
database:
# The password for the user('postgres' by default) of Harbor DB. Change this before any production use.
Expand Down Expand Up @@ -324,3 +319,9 @@ cache:
# # suggest switch provider to redis if you were ran into the db connections spike around
# # the scenario of high concurrent pushing to same project, no improvement for other scenes.
# quota_update_provider: redis # Or db

# The initial password of Harbor admin
# Uncomment the below line if you want to use the default password.
# The install script will prompt and set the admin password.
#harbor_admin_password: Harbor12345

47 changes: 47 additions & 0 deletions make/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,38 @@ with_trivy=$false
# flag to using docker compose v1 or v2, default would using v1 docker-compose
DOCKER_COMPOSE=docker-compose

# Prompt user for admin password
prompt_admin_password() {
while true; do
echo -n "Enter admin password for Harbor: "
read -s ADMIN_PASSWORD
echo
echo -n "Confirm password: "
read -s CADMIN_PASSWORD
echo

if [ -z "$ADMIN_PASSWORD" ]; then
echo "Password cannot be empty. Please try again."
elif [ "$ADMIN_PASSWORD" != "$CADMIN_PASSWORD" ]; then
echo "Passwords do not match. Please try again."
else
unset CADMIN_PASSWORD
break
fi
done
}

validate_password_and_set() {
# Ensure the `harbor.yml` file exists
if [ ! -f ./harbor.yml ]; then
echo "harbor.yml not found in the current directory. Aborting."
exit 1
fi

#Add password to the yml file
echo "harbor_admin_password: $ADMIN_PASSWORD" >> ./harbor.yml
}

while [ $# -gt 0 ]; do
case $1 in
--help)
Expand Down Expand Up @@ -51,6 +83,21 @@ then
fi
echo ""

# Prompt for Admin Password and validate it
h2 "[Step $item]: checking for admin password ..."; let item+=1
if ! grep -q '^[[:space:]]*harbor_admin_password:' ./harbor.yml; then
if [ ! -z "$HARBOR_ADMIN_PASSWD" ]; then
echo "#Using environment variable for Admin Password" >> ./harbor.yml
echo "harbor_admin_password: $HARBOR_ADMIN_PASSWD" >> ./harbor.yml
else
prompt_admin_password
validate_password_and_set
fi
else
echo "Password has been set in the yaml file"
fi


h2 "[Step $item]: preparing environment ..."; let item+=1
if [ -n "$host" ]
then
Expand Down
5 changes: 5 additions & 0 deletions tests/hostcfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ IP=$(hostname -I | awk '{print $1}')
#echo $IP
sudo sed "s/reg.mydomain.com/$IP/" make/harbor.yml.tmpl |sudo tee make/harbor.yml

if [ ! -z "$HARBOR_ADMIN_PASSWD" ]; then
echo "#Using environment variable for Admin Password" >> make/harbor.yml
echo "harbor_admin_password: $HARBOR_ADMIN_PASSWD" >> make/harbor.yml
fi

# enable internal tls
echo "internal_tls:" >> make/harbor.yml
echo " enabled: true" >> make/harbor.yml
Expand Down
Loading