mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-02 16:49:48 +01:00
Merge pull request #333 from ywk253100/sync_image
remove duplicate mysql installation
This commit is contained in:
commit
b782e18b0c
24
.travis.yml
24
.travis.yml
@ -36,18 +36,18 @@ before_install:
|
||||
|
||||
install:
|
||||
- sudo apt-get update && sudo apt-get install -y libldap2-dev
|
||||
- sudo apt-get remove -y mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5
|
||||
- sudo apt-get autoremove -y
|
||||
- sudo apt-get install -y 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
|
||||
# - sudo apt-get remove -y mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5
|
||||
# - sudo apt-get autoremove -y
|
||||
# - sudo apt-get install -y 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
|
||||
|
@ -77,7 +77,7 @@ func (p *ProjectAPI) Post() {
|
||||
err := validateProjectReq(req)
|
||||
if err != nil {
|
||||
log.Errorf("Invalid project request, error: %v", err)
|
||||
p.RenderError(http.StatusBadRequest, "Invalid request for creating project")
|
||||
p.RenderError(http.StatusBadRequest, fmt.Sprintf("invalid request: %v", err))
|
||||
return
|
||||
}
|
||||
projectName := req.ProjectName
|
||||
|
@ -139,7 +139,7 @@ func (pa *RepPolicyAPI) Put() {
|
||||
pa.CustomAbort(http.StatusNotFound, http.StatusText(http.StatusNotFound))
|
||||
}
|
||||
|
||||
var policy *models.RepPolicy
|
||||
policy := &models.RepPolicy{}
|
||||
pa.DecodeJSONReq(policy)
|
||||
policy.ProjectID = originalPolicy.ProjectID
|
||||
policy.TargetID = originalPolicy.TargetID
|
||||
|
@ -58,7 +58,7 @@ func DeleteProjectMember(projectID int64, userID int) error {
|
||||
func GetUserByProject(projectID int64, queryUser models.User) ([]models.User, error) {
|
||||
o := GetOrmer()
|
||||
u := []models.User{}
|
||||
sql := `select u.user_id, u.username, r.name rolename, r.role_id
|
||||
sql := `select u.user_id, u.username, r.name rolename, r.role_id as role
|
||||
from user u
|
||||
join project_member pm
|
||||
on pm.project_id = ? and u.user_id = pm.user_id
|
||||
|
@ -29,7 +29,9 @@ type User struct {
|
||||
Comment string `orm:"column(comment)" json:"comment"`
|
||||
Deleted int `orm:"column(deleted)" json:"deleted"`
|
||||
Rolename string `json:"role_name"`
|
||||
RoleID int `json:"role_id"`
|
||||
//if this field is named as "RoleID", beego orm can not map role_id
|
||||
//to it.
|
||||
Role int `json:"role_id"`
|
||||
// RoleList []Role `json:"role_list"`
|
||||
HasAdminRole int `orm:"column(sysadmin_flag)" json:"has_admin_role"`
|
||||
ResetUUID string `orm:"column(reset_uuid)" json:"reset_uuid"`
|
||||
|
Loading…
Reference in New Issue
Block a user