image: golang:alpine before_script: - apk update - apk --no-cache --no-progress add --virtual build-deps build-base git stages: - test - build - execute - deploy Compile LESS: image: golang:alpine stage: test script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - make less Bindata: image: golang:alpine stage: test script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - wget https://gitlab.com/gitote/bindata/raw/master/go-bindata - make bindata Clean: image: golang:alpine stage: test script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - make clean Build: image: golang:alpine stage: build script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - make build Build Prod: image: golang:latest before_script: - apt-get update -qq - apt-get install -y zip unzip stage: build script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - wget https://gitlab.com/gitote/bindata/raw/master/go-bindata - make bindata - make build Admin: image: golang:alpine stage: execute script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - go build - ./gitote admin Hook: image: golang:alpine stage: execute script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - go build - ./gitote hook Import: image: golang:alpine stage: execute script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - go build - ./gitote import Cert: image: golang:alpine stage: execute script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - go build - ./gitote cert --help Serv: image: golang:alpine stage: execute script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - go build - ./gitote serv --help Web: image: golang:alpine stage: execute script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - go build - ./gitote web & sleep 20 ; kill $! || echo $? DockerHub: image: docker:latest stage: deploy services: - docker:dind script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - docker login -u yoginth -p $CI_REGISTRY_PASSWORD docker.io - docker build -t gitote/gitote . - docker push gitote/gitote:latest only: - master Registry: image: docker:latest stage: deploy services: - docker:dind script: - mkdir -p $GOPATH/src/gitote - cd $GOPATH/src/gitote - git clone https://gitlab.com/gitote/gitote.git gitote - cd gitote - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker build -t registry.gitlab.com/gitote/gitote . - docker push registry.gitlab.com/gitote/gitote:latest only: - master