|
|
@@ -12,7 +12,6 @@ stages:
|
|
|
- commands
|
|
|
- image-test
|
|
|
- pre-test-source
|
|
|
- - deploy
|
|
|
|
|
|
Build:
|
|
|
image: golang:alpine
|
|
|
@@ -20,7 +19,7 @@ Build:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- make build
|
|
|
|
|
|
@@ -30,7 +29,7 @@ Build Dev:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- make build-dev
|
|
|
|
|
|
@@ -43,7 +42,7 @@ Build Dev Race:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- make build-dev-race
|
|
|
|
|
|
@@ -56,31 +55,19 @@ Build Prod:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- wget https://gitlab.com/gitote/bindata/raw/master/go-bindata
|
|
|
- make bindata
|
|
|
- make build
|
|
|
|
|
|
-Docker Build:
|
|
|
- image: docker:latest
|
|
|
- stage: build
|
|
|
- services:
|
|
|
- - docker:dind
|
|
|
- script:
|
|
|
- - mkdir -p $GOPATH/src/gitote
|
|
|
- - cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
- - cd gitote
|
|
|
- - docker build -t gitote .
|
|
|
-
|
|
|
Compile LESS:
|
|
|
image: golang:alpine
|
|
|
stage: prepare
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- make less
|
|
|
|
|
|
@@ -90,7 +77,7 @@ Bindata:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- wget https://gitlab.com/gitote/bindata/raw/master/go-bindata
|
|
|
- make bindata
|
|
|
@@ -104,7 +91,7 @@ Test:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- go test -v -cover -race ./...
|
|
|
|
|
|
@@ -114,7 +101,7 @@ Go LOC:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- go get -u github.com/hhatto/gocloc/cmd/gocloc
|
|
|
- gocloc .
|
|
|
@@ -125,7 +112,7 @@ Clean:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- make clean
|
|
|
|
|
|
@@ -135,7 +122,7 @@ Admin:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- go build
|
|
|
- ./gitote admin
|
|
|
@@ -146,7 +133,7 @@ Hook:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- go build
|
|
|
- ./gitote hook
|
|
|
@@ -157,7 +144,7 @@ Import:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- go build
|
|
|
- ./gitote import
|
|
|
@@ -168,7 +155,7 @@ Cert:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- go build
|
|
|
- ./gitote cert --help
|
|
|
@@ -179,7 +166,7 @@ Serv:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- go build
|
|
|
- ./gitote serv --help
|
|
|
@@ -190,26 +177,7 @@ Running:
|
|
|
script:
|
|
|
- mkdir -p $GOPATH/src/gitote
|
|
|
- cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
+ - git clone https://gitlab.com/$CI_PROJECT_PATH.git gitote
|
|
|
- cd gitote
|
|
|
- go build
|
|
|
- ./gitote web & sleep 20 ; kill $! || echo $?
|
|
|
-
|
|
|
-Deploy Beta:
|
|
|
- image: golang:latest
|
|
|
- before_script:
|
|
|
- - apt-get update -qq
|
|
|
- - apt-get install -y sshpass
|
|
|
- stage: deploy
|
|
|
- script:
|
|
|
- - mkdir -p $GOPATH/src/gitote
|
|
|
- - cd $GOPATH/src/gitote
|
|
|
- - git clone https://gitlab.com/$CI_PROJECT_PATH.git
|
|
|
- - echo "Soon"
|
|
|
- - echo "Deploying to beta server"
|
|
|
- - sshpass
|
|
|
- - export SSHPASS=$USER_PASS
|
|
|
- #- sshpass -e scp -o stricthostkeychecking=no -r . root@142.93.212.225:go/src/gitote/gitote
|
|
|
- only:
|
|
|
- - master
|
|
|
-
|