From 7ea31902ae1839859e15a70cf06e2d4b2c51cad0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Erik=20Hedenstro=CC=88m?= <erik@hedenstroem.com>
Date: Thu, 3 Nov 2016 14:38:04 +0100
Subject: [PATCH] Fixed CI file

---
 .gitlab-ci.yml | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d4115ec..05b4fe0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,15 +1,17 @@
-image: golang:1.7
+image: registry.hedenstroem.com/gitlab/gitlab-builder-go:1.7.3
 
 before_script:
-  - git config --global url."git@gitlab.hedenstroem.com:".insteadOf "https://gitlab.hedenstroem.com/"
-  - mkdir -p /go/src/gitlab.hedenstroem.com/go
-  - ln -s $CI_PROJECT_DIR /go/src/gitlab.brickchain.com/go/$CI_PROJECT_NAME
-  - cd /go/src/gitlab.hedenstroem.com/go/$CI_PROJECT_NAME
+  - CI_PROJECT_HOST=gitlab.hedenstroem.com
+  - git config --global url."git@$CI_PROJECT_HOST:".insteadOf "https://$CI_PROJECT_HOST/"
+  - mkdir -p $GOPATH/src/$CI_PROJECT_HOST/$CI_PROJECT_NAMESPACE
+  - ln -s $CI_PROJECT_DIR $GOPATH/src/$CI_PROJECT_HOST/$CI_PROJECT_NAMESPACE
+  - cd $GOPATH/src/$CI_PROJECT_HOST/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME
 
 stages:
   - build
+  - deploy
 
-build:
+go build:
   stage: build
   script:
     - go generate constant/version.go
@@ -17,3 +19,10 @@ build:
   artifacts:
     paths:
     - vaultenv
+
+upload to aws:
+  stage: deploy
+  only:
+    - master
+  script:
+    - aws s3 cp vaultenv s3://s3.hedenstroem.com/utils/
-- 
GitLab