Skip to content

Commit

Permalink
Turn on CI for e4common.
Browse files Browse the repository at this point in the history
  • Loading branch information
diagprov committed Apr 11, 2019
1 parent f10a998 commit efc17e8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitlab-ci.yml
@@ -0,0 +1,29 @@
image: golang:1.12

stages:
- test
- build

before_script:
# https://docs.gitlab.com/ee/ci/ssh_keys/
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_CI_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh && chmod 600 ~/.ssh
- echo "gitlab.com,35.231.145.151 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=" >> ~/.ssh/known_hosts

# Force use of ssh urls instead of https for gitlab.com. Has to be done before any go get...
- git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com/"

- go get golang.org/x/tools/cmd/goimports
- go install golang.org/x/tools/cmd/goimports

test:
stage: test
script:
- ./scripts/unittest.sh

build:
stage: build
script:
- ./scripts/build.sh

0 comments on commit efc17e8

Please sign in to comment.