Skip to content
Snippets Groups Projects
Commit 4360cf73 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Merge branch 'release' into 'master'

Release

See merge request elixxir/notifications-bot!20
parents afb48836 0d7ae30e
No related branches found
No related tags found
No related merge requests found
# From: https://about.gitlab.com/2017/09/21/how-to-create-ci-cd-pipeline-with-autodeploy-to-kubernetes-using-gitlab-and-helm/
cache:
untracked: true
key: "$CI_BUILD_REF_NAME"
paths:
- vendor/
variables:
REPO_DIR: gitlab.com/elixxir
REPO_NAME: notifications-bot
DOCKER_IMAGE: golang:1.13.4-buster
DOCKER_IMAGE: elixxirlabs/cuda-go:latest
MIN_CODE_COVERAGE: "0.0"
before_script:
......@@ -23,60 +17,39 @@ before_script:
- chmod 700 ~/.ssh
- ssh-keyscan -t rsa gitlab.com > ~/.ssh/known_hosts
- git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com/"
- export GOFLAGS=-mod=vendor
- export PATH=$HOME/go/bin:$PATH
- export GOPRIVATE=gitlab.com/elixxir/*
stages:
- setup
- test
- build
- tag
- trigger_integration
setup:
stage: setup
build:
stage: build
image: $DOCKER_IMAGE
except:
- tags
script:
- git clean -ffdx
- go mod vendor -v
- go build ./...
- go mod tidy
artifacts:
paths:
- vendor/
test:
stage: test
image: $DOCKER_IMAGE
except:
- tags
script:
- GO111MODULE=off go get -u github.com/haya14busa/goverage
- apt-get update
- apt-get install bc -y
- mkdir -p testdata
# Test coverage
- goverage -coverprofile=testdata/coverage-real.out -v ./... 2>&1 | grep -v "no packages being tested depend on"
- go-acc --covermode atomic --output testdata/coverage.out ./... -- -v
# Exclude cmd from test coverage as it is command line related tooling
# - grep -v -e cmd testdata/coverage.out > testdata/coverage-real.out
- go tool cover -func=testdata/coverage-real.out
- go tool cover -html=testdata/coverage-real.out -o testdata/coverage.html
- go tool cover -func=testdata/coverage.out
- go tool cover -html=testdata/coverage.out -o testdata/coverage.html
# Test Coverage Check
- go tool cover -func=testdata/coverage-real.out | grep "total:" | awk '{print $3}' | sed 's/\%//g' > testdata/coverage-percentage.txt
- go tool cover -func=testdata/coverage.out | grep "total:" | awk '{print $3}' | sed 's/\%//g' > testdata/coverage-percentage.txt
- export CODE_CHECK=$(echo "$(cat testdata/coverage-percentage.txt) >= $MIN_CODE_COVERAGE" | bc -l)
- (if [ "$CODE_CHECK" == "1" ]; then echo "Minimum coverage of $MIN_CODE_COVERAGE succeeded"; else echo "Minimum coverage of $MIN_CODE_COVERAGE failed"; exit 1; fi);
artifacts:
paths:
- testdata/
build:
stage: build
image: $DOCKER_IMAGE
except:
- tags
script:
- mkdir -p release
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' ./...
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o release/notifications.linux64 main.go
......@@ -85,10 +58,12 @@ build:
- GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o release/notifications.darwin64 main.go
artifacts:
paths:
- vendor/
- testdata/
- release/
tag:
stage: tag
stage: trigger_integration
only:
- master
image: $DOCKER_IMAGE
......
// Code generated by go generate; DO NOT EDIT.
// This file was generated by robots at
// 2020-02-07 15:36:17.501193 -0800 PST m=+0.017704124
// 2020-05-12 21:03:01.645935971 +0000 UTC m=+0.007145767
package cmd
const GITVERSION = `f6d16c0 Merge branch 'xx-1793/ndf-polling' into 'release'`
const GITVERSION = `d3ade03 gomod update`
const SEMVER = "1.0.0"
const DEPENDENCIES = `module gitlab.com/elixxir/notifications-bot
go 1.13
require (
cloud.google.com/go v0.55.0 // indirect
cloud.google.com/go/firestore v1.1.1 // indirect
cloud.google.com/go/pubsub v1.2.0 // indirect
cloud.google.com/go/pubsub v1.3.1 // indirect
firebase.google.com/go v3.12.0+incompatible
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-pg/pg v8.0.6+incompatible
github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de // indirect
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/onsi/ginkgo v1.12.0 // indirect
......@@ -24,21 +26,19 @@ require (
github.com/smartystreets/assertions v1.0.1 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v0.0.5
github.com/spf13/cobra v0.0.6
github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.6.2
gitlab.com/elixxir/comms v0.0.0-20200207001605-3b6328b48ed1
gitlab.com/elixxir/crypto v0.0.0-20200206203107-b8926242da23
gitlab.com/elixxir/primitives v0.0.0-20200207225613-9a4445ddec16
golang.org/x/crypto v0.0.0-20200207205829-a95e85b341fd // indirect
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd // indirect
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/tools v0.0.0-20200207224406-61798d64f025 // indirect
google.golang.org/api v0.17.0
google.golang.org/genproto v0.0.0-20200207204624-4f3edf09f4f6 // indirect
gopkg.in/ini.v1 v1.52.0 // indirect
gitlab.com/elixxir/comms v0.0.0-20200415204952-6d63dd94a0ea
gitlab.com/elixxir/crypto v0.0.0-20200410231849-90e859940f5d
gitlab.com/elixxir/primitives v0.0.0-20200410231944-a57d71d577c9
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566 // indirect
google.golang.org/api v0.20.0
google.golang.org/genproto v0.0.0-20200318110522-7735f76e9fa5 // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
mellium.im/sasl v0.0.0-20190815210834-e27ea4901008 // indirect
)
`
......@@ -3,33 +3,32 @@ module gitlab.com/elixxir/notifications-bot
go 1.13
require (
cloud.google.com/go v0.53.0 // indirect
cloud.google.com/go/datastore v1.1.0 // indirect
cloud.google.com/go v0.55.0 // indirect
cloud.google.com/go/firestore v1.1.1 // indirect
cloud.google.com/go/pubsub v1.3.1 // indirect
firebase.google.com/go v3.12.0+incompatible
github.com/go-pg/pg v8.0.6+incompatible
github.com/gopherjs/gopherjs v0.0.0-20200209183636-89e6cbcd0b6d // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/mapstructure v1.3.0 // indirect
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/pelletier/go-toml v1.7.0 // indirect
github.com/pkg/errors v0.9.1
github.com/smartystreets/assertions v1.0.1 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v0.0.5
github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.6.2
gitlab.com/elixxir/comms v0.0.0-20200212214943-7dbfb97820ae
gitlab.com/elixxir/crypto v0.0.0-20200206203107-b8926242da23
gitlab.com/elixxir/primitives v0.0.0-20200210205543-5c55c1f6949f
golang.org/x/exp v0.0.0-20200213203834-85f925bdd4d0 // indirect
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/tools v0.0.0-20200213224642-88e652f7a869 // indirect
google.golang.org/api v0.17.0
gopkg.in/ini.v1 v1.52.0 // indirect
github.com/spf13/viper v1.7.0
gitlab.com/elixxir/client v1.1.1-0.20200512210735-4f463bfeb34f // indirect
gitlab.com/elixxir/comms v0.0.0-20200513163847-4975a4118ac6
gitlab.com/elixxir/crypto v0.0.0-20200513163659-38b6079db0b2
gitlab.com/elixxir/primitives v0.0.0-20200513162412-ef77445c0ab7
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f
golang.org/x/sys v0.0.0-20200513112337-417ce2331b5c // indirect
golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566 // indirect
google.golang.org/api v0.20.0
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884 // indirect
gopkg.in/ini.v1 v1.56.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
mellium.im/sasl v0.0.0-20190815210834-e27ea4901008 // indirect
)
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment