From 18411349b5ba4502935125ce90ba551c2a383109 Mon Sep 17 00:00:00 2001 From: wang yan Date: Fri, 21 Sep 2018 17:20:43 +0800 Subject: [PATCH] Add installer pipeline in travis Signed-off-by: wang yan --- .travis.yml | 7 +++++-- Makefile | 6 ++---- tests/travis/distro_installer.sh | 6 ++++++ 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100755 tests/travis/distro_installer.sh diff --git a/.travis.yml b/.travis.yml index 02ee6286e..1ea136944 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,9 @@ matrix: - go: "1.9.2" env: - APITEST_LDAP=true - + - go: "1.9.2" + env: + - OFFLINE=true env: global: - POSTGRESQL_HOST: localhost @@ -66,4 +68,5 @@ install: script: - if [ "$UTTEST" == true ]; then bash ./tests/travis/ut_run.sh $IP; fi - if [ "$APITEST_DB" == true ]; then bash ./tests/travis/api_run.sh DB $IP; fi - - if [ "$APITEST_LDAP" == true ]; then bash ./tests/travis/api_run.sh LDAP $IP; fi \ No newline at end of file + - if [ "$APITEST_LDAP" == true ]; then bash ./tests/travis/api_run.sh LDAP $IP; fi + - if [ "$OFFLINE" == true ]; then bash ./tests/travis/distro_installer.sh; fi \ No newline at end of file diff --git a/Makefile b/Makefile index 61ac46428..f5112d4e5 100644 --- a/Makefile +++ b/Makefile @@ -221,14 +221,14 @@ DOCKERSAVE_PARA=$(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \ PACKAGE_OFFLINE_PARA=-zcvf harbor-offline-installer-$(PKGVERSIONTAG).tgz \ $(HARBORPKG)/common/templates $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tar.gz \ - $(HARBORPKG)/prepare $(HARBORPKG)/NOTICE \ + $(HARBORPKG)/prepare \ $(HARBORPKG)/LICENSE $(HARBORPKG)/install.sh \ $(HARBORPKG)/harbor.cfg $(HARBORPKG)/$(DOCKERCOMPOSEFILENAME) \ $(HARBORPKG)/open_source_license PACKAGE_ONLINE_PARA=-zcvf harbor-online-installer-$(PKGVERSIONTAG).tgz \ $(HARBORPKG)/common/templates $(HARBORPKG)/prepare \ - $(HARBORPKG)/LICENSE $(HARBORPKG)/NOTICE \ + $(HARBORPKG)/LICENSE \ $(HARBORPKG)/install.sh $(HARBORPKG)/$(DOCKERCOMPOSEFILENAME) \ $(HARBORPKG)/harbor.cfg \ $(HARBORPKG)/open_source_license @@ -345,7 +345,6 @@ package_online: modify_composefile fi @cp LICENSE $(HARBORPKG)/LICENSE @cp open_source_license $(HARBORPKG)/open_source_license - @cp NOTICE $(HARBORPKG)/NOTICE @$(TARCMD) $(PACKAGE_ONLINE_PARA) @rm -rf $(HARBORPKG) @@ -356,7 +355,6 @@ package_offline: compile version build modify_sourcefiles modify_composefile @cp -r make $(HARBORPKG) @cp LICENSE $(HARBORPKG)/LICENSE @cp open_source_license $(HARBORPKG)/open_source_license - @cp NOTICE $(HARBORPKG)/NOTICE @echo "saving harbor docker image" @$(DOCKERSAVE) $(DOCKERSAVE_PARA) > $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tar diff --git a/tests/travis/distro_installer.sh b/tests/travis/distro_installer.sh new file mode 100755 index 000000000..06c81be49 --- /dev/null +++ b/tests/travis/distro_installer.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +sudo make package_online VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.9.2 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true HTTPPROXY= +sudo make package_offline VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.9.2 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true HTTPPROXY= \ No newline at end of file