-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
55 lines (51 loc) · 1.21 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
image:
name: "golang:1.18.2-buster"
entrypoint:
- "/usr/bin/env"
- "PATH=/go/bin:/usr/local/go/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
stages:
- tests
- build
variables:
PACKAGE_VERSION: "0.1.0"
DARWIN_AMD64_BINARY: "awsrouters"
LINUX_AMD64_BINARY: "awsrouters-linux"
WINDOWS_BINARY: "awsrouters.exe"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/2228/packages/go/${PACKAGE_VERSION}"
unittest:
stage: tests
script:
- go install github.com/go-task/task/v3/cmd/task@latest
- task testd
integrationtest:
stage: tests
script:
- env
- go install github.com/rogerscuall/aws-router
- mkdir csv
- aws-router
- mkdir excel
- aws-router excel
- touch .go-aws-routing.yaml
- >
echo "db_Name: testing-db123" > .go-aws-routing.yaml
- aws-router sync
tags:
- aws
artifacts:
paths:
- csv
- excel
build:
stage: build
script:
- echo "${PACKAGE_REGISTRY_URL}/${DARWIN_AMD64_BINARY}"
- go install github.com/go-task/task/v3/cmd/task@latest
- task build
- task buildlinux
- task buildwindows
artifacts:
paths:
- "awsrouters"
- "awsrouters.exe"
- "awsrouters-linux"