-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheirctl.yaml
More file actions
101 lines (91 loc) · 2.75 KB
/
Copy patheirctl.yaml
File metadata and controls
101 lines (91 loc) · 2.75 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
output: prefixed
debug: false
import:
- https://raw.githubusercontent.com/Ensono/eirctl/e36d0c541eb221ab39d716713478a1bc39e54e83/shared/build/go/eirctl.yaml
- https://raw.githubusercontent.com/Ensono/eirctl/e36d0c541eb221ab39d716713478a1bc39e54e83/shared/security/eirctl.yaml
contexts:
bash:
container:
name: mirror.gcr.io/bash:5.0.18-alpine3.22
pipelines:
unit:test:
- pipeline: test:unit
env:
ROOT_PKG_NAME: github.com/DevLabFoundry/configmanager-plugin-awsparamstr
gha:unit:test:
- pipeline: unit:test
- task: sonar:coverage:prep
depends_on: unit:test
code:coverage:
- pipeline: unit:test
- task: show_coverage
depends_on: unit:test
build:bin:
- task: clean
- task: go:build:plugin
env:
PLUGIN: awsparamstr
depends_on: clean
lint:
- task: go:lint
- task: trivy:filesystem:scan
variables:
TrivyIgnoreFile: .trivyignore.yaml
tasks:
go:build:plugin:
context: go1x
command:
- |
mkdir -p .deps
unset GOTOOLCHAIN
ldflags="-s -w -X \"main.Version={{ .Env.VERSION | default "not-supplied" }}\" -X \"main.Revision={{ .Env.REVISION | default "not-supplied" }}\" -extldflags -static"
export GOPATH=/eirctl/.deps GOOS=${BUILD_GOOS} GOARCH=${BUILD_GOARCH} CGO_ENABLED=0
go build -mod=readonly -buildvcs=false -ldflags="$ldflags" \
-o dist/$PLUGIN-${BUILD_GOOS}-${BUILD_GOARCH}${BUILD_SUFFIX} main.go
echo "---"
echo "Built: $PLUGIN-${BUILD_GOOS}-${BUILD_GOARCH}${BUILD_SUFFIX}"
reset_context: true
variations:
- BUILD_GOOS: darwin
BUILD_GOARCH: amd64
BUILD_SUFFIX: ""
- BUILD_GOOS: darwin
BUILD_GOARCH: arm64
BUILD_SUFFIX: ""
- BUILD_GOOS: linux
BUILD_GOARCH: amd64
BUILD_SUFFIX: ""
- BUILD_GOOS: linux
BUILD_GOARCH: arm64
BUILD_SUFFIX: ""
- BUILD_GOOS: windows
BUILD_GOARCH: amd64
BUILD_SUFFIX: ".exe"
- BUILD_GOOS: windows
BUILD_GOARCH: arm64
BUILD_SUFFIX: ".exe"
- BUILD_GOOS: windows
BUILD_GOARCH: "386"
BUILD_SUFFIX: ".exe"
required:
env:
- PLUGIN
sonar:coverage:prep:
context: bash
command:
- |
sed -i 's|github.com/DevLabFoundry/configmanager-plugin-awsparamstr/||g' .coverage/out
echo "Coverage file first 20 lines after conversion:"
head -20 .coverage/out
echo "Coverage file line count:"
wc -l .coverage/out
tag:
description: |
Usage `eirctl tag VERSION=2111dsfsdfa REVISION=as2342432`
command: |
git tag -a ${VERSION} -m "ci tag release" ${REVISION}
git push origin ${VERSION}
required:
env:
- VERSION
- REVISION