-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable travis to update logs to GSR (#5949)
1, add encrypt file to store gsutil keys. 2, add function to call gsutil to update logs into harbor log bucket. Signed-off-by: wangyan <[email protected]>
- Loading branch information
1 parent
1173955
commit 6c00747
Showing
3 changed files
with
79 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,67 @@ | ||
sudo: true | ||
|
||
language: go | ||
|
||
go: | ||
- 1.9.2 | ||
|
||
go_import_path: github.com/goharbor/harbor | ||
|
||
services: | ||
- docker | ||
|
||
dist: trusty | ||
|
||
matrix: | ||
include: | ||
- go: "1.9.2" | ||
- go: 1.9.2 | ||
env: | ||
- UTTEST=true | ||
- go: "1.9.2" | ||
- go: 1.9.2 | ||
env: | ||
- APITEST_DB=true | ||
- go: "1.9.2" | ||
- go: 1.9.2 | ||
env: | ||
- APITEST_LDAP=true | ||
- go: "1.9.2" | ||
- go: 1.9.2 | ||
env: | ||
- OFFLINE=true | ||
env: | ||
global: | ||
- POSTGRESQL_HOST: localhost | ||
- POSTGRESQL_PORT: 5432 | ||
- POSTGRESQL_USR: postgres | ||
- POSTGRESQL_PWD: root123 | ||
- POSTGRESQL_DATABASE: registry | ||
- ADMINSERVER_URL: http://127.0.0.1:8888 | ||
- DOCKER_COMPOSE_VERSION: 1.22.0 | ||
- HARBOR_ADMIN: admin | ||
- HARBOR_ADMIN_PASSWD: Harbor12345 | ||
- CORE_SECRET: tempString | ||
- KEY_PATH: /data/secretkey | ||
- REDIS_HOST: localhost | ||
- REG_VERSION: v2.6.2 | ||
- UI_BUILDER_VERSION: 1.6.0 | ||
|
||
addons: | ||
- POSTGRESQL_HOST: localhost | ||
- POSTGRESQL_PORT: 5432 | ||
- POSTGRESQL_USR: postgres | ||
- POSTGRESQL_PWD: root123 | ||
- POSTGRESQL_DATABASE: registry | ||
- ADMINSERVER_URL: http://127.0.0.1:8888 | ||
- DOCKER_COMPOSE_VERSION: 1.22.0 | ||
- HARBOR_ADMIN: admin | ||
- HARBOR_ADMIN_PASSWD: Harbor12345 | ||
- CORE_SECRET: tempString | ||
- KEY_PATH: "/data/secretkey" | ||
- REDIS_HOST: localhost | ||
- REG_VERSION: v2.6.2 | ||
- UI_BUILDER_VERSION: 1.6.0 | ||
addons: | ||
apt: | ||
sources: | ||
- google-chrome | ||
- google-chrome | ||
packages: | ||
- google-chrome-stable | ||
- google-chrome-beta | ||
|
||
- google-chrome-stable | ||
- google-chrome-beta | ||
before_install: | ||
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose | ||
- chmod +x docker-compose | ||
- sudo mv docker-compose /usr/local/bin | ||
- IP=`ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'` | ||
- sudo sed -i '$a DOCKER_OPTS=\"--insecure-registry '$IP':5000\"' /etc/default/docker | ||
- export IP=$IP | ||
- sudo service docker restart | ||
|
||
- openssl aes-256-cbc -K $encrypted_ed2284a9ecc3_key -iv $encrypted_ed2284a9ecc3_iv | ||
-in gskey.sh.enc -out ./gskey.sh -d | ||
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname | ||
-s`-`uname -m` > docker-compose | ||
- chmod +x docker-compose | ||
- sudo mv docker-compose /usr/local/bin | ||
- IP=`ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'` | ||
- sudo sed -i '$a DOCKER_OPTS=\"--insecure-registry '$IP':5000\"' /etc/default/docker | ||
- export IP=$IP | ||
- sudo service docker restart | ||
install: | ||
- if [ "$UTTEST" == true ]; then bash ./tests/travis/ut_install.sh ; fi | ||
- if [ "$APITEST_DB" == true ]; then bash ./tests/travis/api_common_install.sh $IP DB; fi | ||
- if [ "$APITEST_LDAP" == true ]; then bash ./tests/travis/api_common_install.sh $IP LDAP; fi | ||
|
||
- if [ "$UTTEST" == true ]; then bash ./tests/travis/ut_install.sh ; fi | ||
- if [ "$APITEST_DB" == true ]; then bash ./tests/travis/api_common_install.sh $IP | ||
DB; fi | ||
- if [ "$APITEST_LDAP" == true ]; then bash ./tests/travis/api_common_install.sh $IP | ||
LDAP; fi | ||
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 | ||
- if [ "$OFFLINE" == true ]; then bash ./tests/travis/distro_installer.sh; fi | ||
- 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 | ||
- if [ "$OFFLINE" == true ]; then bash ./tests/travis/distro_installer.sh; fi |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters