2016-06-07 06:19:48 +02:00
|
|
|
sudo: true
|
2016-02-29 04:24:52 +01:00
|
|
|
language: go
|
2018-09-19 11:49:43 +02:00
|
|
|
go:
|
2019-10-20 15:10:55 +02:00
|
|
|
- 1.12.12
|
2018-08-23 09:02:20 +02:00
|
|
|
go_import_path: github.com/goharbor/harbor
|
2018-09-19 11:49:43 +02:00
|
|
|
services:
|
|
|
|
- docker
|
2016-06-07 06:19:48 +02:00
|
|
|
dist: trusty
|
2018-09-19 11:49:43 +02:00
|
|
|
matrix:
|
|
|
|
include:
|
2019-10-20 15:10:55 +02:00
|
|
|
- go: 1.12.12
|
2018-09-19 11:49:43 +02:00
|
|
|
env:
|
|
|
|
- UTTEST=true
|
2019-10-20 15:10:55 +02:00
|
|
|
- go: 1.12.12
|
2018-09-19 11:49:43 +02:00
|
|
|
env:
|
|
|
|
- APITEST_DB=true
|
2019-10-20 15:10:55 +02:00
|
|
|
- go: 1.12.12
|
2018-09-19 11:49:43 +02:00
|
|
|
env:
|
|
|
|
- APITEST_LDAP=true
|
2019-10-20 15:10:55 +02:00
|
|
|
- go: 1.12.12
|
2018-09-21 11:20:43 +02:00
|
|
|
env:
|
|
|
|
- OFFLINE=true
|
2019-09-05 09:13:13 +02:00
|
|
|
- language: node_js
|
|
|
|
node_js: 10.16.2
|
2019-09-11 08:54:43 +02:00
|
|
|
env:
|
|
|
|
- UI_UT=true
|
2016-06-07 06:19:48 +02:00
|
|
|
env:
|
2018-09-19 11:49:43 +02:00
|
|
|
global:
|
2018-09-27 02:54:56 +02:00
|
|
|
- POSTGRESQL_HOST: localhost
|
|
|
|
- POSTGRESQL_PORT: 5432
|
|
|
|
- POSTGRESQL_USR: postgres
|
|
|
|
- POSTGRESQL_PWD: root123
|
|
|
|
- POSTGRESQL_DATABASE: registry
|
|
|
|
- ADMINSERVER_URL: http://127.0.0.1:8888
|
2019-08-08 08:08:34 +02:00
|
|
|
- DOCKER_COMPOSE_VERSION: 1.23.0
|
2018-09-27 02:54:56 +02:00
|
|
|
- HARBOR_ADMIN: admin
|
|
|
|
- HARBOR_ADMIN_PASSWD: Harbor12345
|
|
|
|
- CORE_SECRET: tempString
|
2019-03-18 08:07:19 +01:00
|
|
|
- KEY_PATH: "/data/secret/keys/secretkey"
|
2018-09-27 02:54:56 +02:00
|
|
|
- REDIS_HOST: localhost
|
2018-12-21 02:21:22 +01:00
|
|
|
- REG_VERSION: v2.7.1
|
2018-09-27 02:54:56 +02:00
|
|
|
- UI_BUILDER_VERSION: 1.6.0
|
2019-01-24 12:11:45 +01:00
|
|
|
- TOKEN_PRIVATE_KEY_PATH: "/home/travis/gopath/src/github.com/goharbor/harbor/tests/private_key.pem"
|
2018-09-27 02:54:56 +02:00
|
|
|
addons:
|
2018-09-07 14:25:01 +02:00
|
|
|
apt:
|
|
|
|
sources:
|
2018-09-27 02:54:56 +02:00
|
|
|
- google-chrome
|
2018-09-07 14:25:01 +02:00
|
|
|
packages:
|
2018-09-27 02:54:56 +02:00
|
|
|
- google-chrome-stable
|
|
|
|
- google-chrome-beta
|
2016-06-07 06:19:48 +02:00
|
|
|
before_install:
|
2018-09-27 02:54:56 +02:00
|
|
|
- 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
|
2018-09-19 11:49:43 +02:00
|
|
|
install:
|
2018-09-27 02:54:56 +02:00
|
|
|
- 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
|
2016-08-08 10:40:14 +02:00
|
|
|
script:
|
2018-09-27 02:54:56 +02:00
|
|
|
- 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
|
2019-09-11 08:54:43 +02:00
|
|
|
- if [ "$UI_UT" == true ]; then bash ./tests/travis/ui_ut_run.sh ; fi
|