diff --git a/.travis.yml b/.travis.yml index aff9e1f81..f28dc7230 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,13 +5,25 @@ go: go_import_path: github.com/vmware/harbor -service: - - mysql +#service: +# - mysql env: DB_HOST=127.0.0.1 DB_PORT=3306 DB_USR=root DB_PWD= install: - - sudo apt-get update && sudo apt-get install -y libldap2-dev + - sudo apt-get update && sudo apt-get install -y libldap2-dev + - sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5 + - sudo apt-get autoremove + - sudo apt-get install libaio1 + - wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/ + - sudo dpkg -i mysql-5.6.14.deb + - sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server + - sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/ + - sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf + - sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf + - sudo sed -i'' 's/basedir[^=]\+=.*$/basedir = \/opt\/mysql\/server-5.6/' /etc/mysql/my.cnf + - sudo /etc/init.d/mysql.server start + - mysql --version - go get -d github.com/docker/distribution - go get -d github.com/docker/libtrust - go get -d github.com/go-sql-driver/mysql diff --git a/Deploy/db/registry.sql b/Deploy/db/registry.sql index 06d0844a5..17f075e11 100644 --- a/Deploy/db/registry.sql +++ b/Deploy/db/registry.sql @@ -111,7 +111,7 @@ create table replication_policy ( enabled tinyint(1) NOT NULL DEFAULT 1, description text, cron_str varchar(256), - start_time timestamp, + start_time timestamp NULL, creation_time timestamp default CURRENT_TIMESTAMP, update_time timestamp default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (id) diff --git a/api/jobs/replication.go b/api/jobs/replication.go index 4c65896e0..a9dda69b3 100644 --- a/api/jobs/replication.go +++ b/api/jobs/replication.go @@ -154,7 +154,7 @@ func getRepoList(projectID int64) ([]string, error) { client := &http.Client{} req, err := http.NewRequest("GET", uiURL+"/api/repositories?project_id="+strconv.Itoa(int(projectID)), nil) if err != nil { - log.Errorf("Error when creating request: %v") + log.Errorf("Error when creating request: %v", err) return nil, err } //req.SetBasicAuth(uiUser, uiPwd)