diff --git a/Makefile b/Makefile index 690826df1..d42a8c97e 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,7 @@ DOCKERSAVE_PARA=$(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \ $(DOCKERIMAGENAME_LOG):$(VERSIONTAG) \ $(DOCKERIMAGENAME_DB):$(VERSIONTAG) \ $(DOCKERIMAGENAME_JOBSERVICE):$(VERSIONTAG) \ - vmware/nginx-photon:$(NGINXVERSION)-$(VERSIONTAG) vmware/registry-photon:$(REGISTRYVERSION)-$(VERSIONTAG) \ + vmware/nginx-photon:$(NGINXVERSION) vmware/registry-photon:$(REGISTRYVERSION)-$(VERSIONTAG) \ vmware/photon:$(PHOTONVERSION) PACKAGE_OFFLINE_PARA=-zcvf harbor-offline-installer-$(GITTAGVERSION).tgz \ $(HARBORPKG)/common/templates $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tar.gz \ @@ -227,13 +227,13 @@ DOCKERCOMPOSE_LIST=-f $(DOCKERCOMPOSEFILEPATH)/$(DOCKERCOMPOSEFILENAME) ifeq ($(NOTARYFLAG), true) DOCKERSAVE_PARA+= vmware/notary-server-photon:$(NOTARYVERSION)-$(VERSIONTAG) vmware/notary-signer-photon:$(NOTARYVERSION)-$(VERSIONTAG) \ - vmware/mariadb-photon:$(MARIADBVERSION)-$(VERSIONTAG) + vmware/mariadb-photon:$(MARIADBVERSION) PACKAGE_OFFLINE_PARA+= $(HARBORPKG)/$(DOCKERCOMPOSENOTARYFILENAME) PACKAGE_ONLINE_PARA+= $(HARBORPKG)/$(DOCKERCOMPOSENOTARYFILENAME) DOCKERCOMPOSE_LIST+= -f $(DOCKERCOMPOSEFILEPATH)/$(DOCKERCOMPOSENOTARYFILENAME) endif ifeq ($(CLAIRFLAG), true) - DOCKERSAVE_PARA+= vmware/clair-photon:$(CLAIRVERSION)-$(VERSIONTAG) vmware/postgresql-photon:$(CLAIRDBVERSION)-$(VERSIONTAG) + DOCKERSAVE_PARA+= vmware/clair-photon:$(CLAIRVERSION)-$(VERSIONTAG) vmware/postgresql-photon:$(CLAIRDBVERSION) PACKAGE_OFFLINE_PARA+= $(HARBORPKG)/$(DOCKERCOMPOSECLAIRFILENAME) PACKAGE_ONLINE_PARA+= $(HARBORPKG)/$(DOCKERCOMPOSECLAIRFILENAME) DOCKERCOMPOSE_LIST+= -f $(DOCKERCOMPOSEFILEPATH)/$(DOCKERCOMPOSECLAIRFILENAME) @@ -336,10 +336,10 @@ package_online: modify_composefile package_offline: compile version build modify_sourcefiles modify_composefile @echo "packing offline package ..." @cp -r make $(HARBORPKG) - @cp LICENSE $(HARBORPKG)/LICENSE @cp NOTICE $(HARBORPKG)/NOTICE - @cp $(HARBORPKG)/common/db/registry.sql $(HARBORPKG)/ha/ + @cp $(HARBORPKG)/photon/db/registry.sql $(HARBORPKG)/ha/ + @if [ "$(MIGRATORFLAG)" = "true" ] ; then \ echo "pulling DB migrator..."; \ $(DOCKERPULL) vmware/harbor-db-migrator:$(MIGRATORVERSION); \ diff --git a/tests/integration.sh b/tests/integration.sh index 398de3b89..0659542b2 100755 --- a/tests/integration.sh +++ b/tests/integration.sh @@ -73,8 +73,8 @@ if [[ $DRONE_BRANCH == "master" || $DRONE_BRANCH == *"refs/tags"* || $DRONE_BRAN pybot -v ip:$container_ip --removekeywords TAG:secret --include BAT tests/robot-cases/Group0-BAT elif (echo $buildinfo | grep -q "\[Specific CI="); then buildtype=$(echo $buildinfo | grep "\[Specific CI=") - testsuite=$(echo $buildtype | awk -v FS="(=|])" '{print $2}') - pybot -v ip:$container_ip --removekeywords TAG:secret --suite $testsuite --suite Regression tests/robot-cases + testsuite=$(echo $buildtype | awk -F"\[Specific CI=" '{sub(/\].*/,"",$2);print $2}') + pybot -v ip:$container_ip --removekeywords TAG:secret --suite $testsuite tests/robot-cases elif (echo $buildinfo | grep -q "\[Full CI\]"); then pybot -v ip:$container_ip --removekeywords TAG:secret --exclude skip tests/robot-cases elif (echo $buildinfo | grep -q "\[Skip CI\]"); then diff --git a/tests/resources/Harbor-Util.robot b/tests/resources/Harbor-Util.robot index 668603736..61b22a47c 100644 --- a/tests/resources/Harbor-Util.robot +++ b/tests/resources/Harbor-Util.robot @@ -62,6 +62,15 @@ Package Harbor Offline Log ${output} Should Be Equal As Integers ${rc} 0 +Package Harbor Online + [Arguments] ${golang_image}=golang:1.7.3 ${clarity_image}=vmware/harbor-clarity-ui-builder:${CLAIR_BUILDER} ${with_notary}=true ${with_clair}=true ${with_migrator}=true + Log To Console \nStart Docker Daemon + Start Docker Daemon Locally + ${rc} ${output}= Run And Return Rc And Output make package_online DEVFLAG=false GOBUILDIMAGE=${golang_image} COMPILETAG=compile_golangimage CLARITYIMAGE=${clarity_image} NOTARYFLAG=${with_notary} CLAIRFLAG=${with_clair} MIGRATORFLAG=${with_migrator} HTTPPROXY= + Log ${rc} + Log ${output} + Should Be Equal As Integers ${rc} 0 + Switch To LDAP Down Harbor ${rc} ${output}= Run And Return Rc And Output rm -rf /data diff --git a/tests/robot-cases/Group0-Distro-Harbor/package-online-installer.robot b/tests/robot-cases/Group0-Distro-Harbor/package-online-installer.robot new file mode 100644 index 000000000..27d539e34 --- /dev/null +++ b/tests/robot-cases/Group0-Distro-Harbor/package-online-installer.robot @@ -0,0 +1,22 @@ +// Copyright (c) 2017 VMware, Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +*** Settings *** +Documentation Harbor BATs +Resource ../../resources/Util.robot +Default Tags Bundle + +*** Test Cases *** +Distro Harbor Online + Package Harbor Online \ No newline at end of file