mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-18 08:15:16 +01:00
737eaa396c
This commit bumps up the version of Go to compile the code to v1.12.5, and shifts to go.mod for managing depedency. Some code from "harbor/tests" to "harbor/src/testing" to avoid depedency loop of modules. Note that in short term we will still vendor the dependency. Signed-off-by: Daniel Jiang <jiangd@vmware.com>
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
sudo: true
|
|
language: go
|
|
go:
|
|
- 1.12.5
|
|
go_import_path: github.com/goharbor/harbor
|
|
services:
|
|
- docker
|
|
dist: trusty
|
|
matrix:
|
|
include:
|
|
- go: 1.12.5
|
|
env:
|
|
- UTTEST=true
|
|
- go: 1.12.5
|
|
env:
|
|
- APITEST_DB=true
|
|
- go: 1.12.5
|
|
env:
|
|
- APITEST_LDAP=true
|
|
- go: 1.12.5
|
|
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/secret/keys/secretkey"
|
|
- REDIS_HOST: localhost
|
|
- REG_VERSION: v2.7.1
|
|
- UI_BUILDER_VERSION: 1.6.0
|
|
- TOKEN_PRIVATE_KEY_PATH: "/home/travis/gopath/src/github.com/goharbor/harbor/tests/private_key.pem"
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- google-chrome
|
|
packages:
|
|
- 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
|
|
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
|
|
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
|