Skip to content

Commit

Permalink
ci: add gitlab cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
srevinsaju committed Oct 26, 2021
1 parent e1c12d0 commit 2ebda3c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2021 Sorcero, Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

image: golang:latest
variables:
REPO_NAME: gitlab.com/sorcero/community/dgbrx

before_script:
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
- cd $GOPATH/src/$REPO_NAME

stages:
- test
- build
- deploy

format:
stage: test
script:
- go fmt $(go list ./... | grep -v /vendor/)
- go vet $(go list ./... | grep -v /vendor/)

compile:
stage: build
script:
- cd cmd/dgbrx
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/dgbrx
artifacts:
paths:
- dgbrx

0 comments on commit 2ebda3c

Please sign in to comment.