-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheirctl.yaml
More file actions
139 lines (124 loc) · 4.11 KB
/
Copy patheirctl.yaml
File metadata and controls
139 lines (124 loc) · 4.11 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# yaml-language-server: $schema=https://raw.githubusercontent.com/Ensono/eirctl/refs/heads/main/schemas/schema_v1.json
output: prefixed
debug: false
import:
- https://raw.githubusercontent.com/Ensono/eirctl/refs/tags/0.10.0/shared/build/go/eirctl.yaml
contexts:
bash:
container:
name: mirror.gcr.io/bash:5.0.18-alpine3.22
committed:
container:
name: alpine:3
shell: /bin/sh
shell_args: ["-c"]
pipelines:
commit-lint:
- task: lint:commits
gha:unit:test:
- pipeline: test:unit
env:
ROOT_PKG_NAME: github.com/DevLabFoundry
- task: sonar:coverage:prep
depends_on: test:unit
show_coverage:
- pipeline: test:unit
- task: show:coverage
depends_on: test:unit
build:bin:
- task: clean
- task: go:build:binary
depends_on: clean
tasks:
lint:commits:
context: committed
description: Lint commit messages against Conventional Commits using committed
command:
- |
COMMITTED_VERSION="v1.1.11"
apk add --no-cache git
git config --global safe.directory '*'
if [ ! -f /eirctl/.eirctl/committed ]; then
echo "Downloading committed binary..."
wget -qO- https://github.com/crate-ci/committed/releases/download/${COMMITTED_VERSION}/committed-${COMMITTED_VERSION}-x86_64-unknown-linux-musl.tar.gz \
| tar xz -C /tmp
install -m 755 /tmp/committed /eirctl/.eirctl/committed
fi
if [ -n "$GITHUB_BASE_REF" ]; then
RANGE="HEAD^1..HEAD^2"
/eirctl/.eirctl/committed $RANGE --no-merge-commit
else
echo "SKIPPING FOR NOW ON NON-PRs"
fi
show:coverage:
description: Opens the current coverage viewer for the the configmanager utility.
command: go tool cover -html=.coverage/out
show_docs:
description: |
Opens a webview with godoc running
Already filters the packages to this one and enables
internal/private package documentation
command: |
open http://localhost:6060/pkg/github.com/DevLabFoundry/configmanager/v2/?m=all
godoc -notes "BUG|TODO" -play -http=:6060
go:build:binary:
context: go1x
description: |
Generates binaries in a dist folder
Generates all the binaries for the configmanager utility.
command:
- |
mkdir -p .deps
unset GOTOOLCHAIN
ldflags="-s -w -X \"github.com/DevLabFoundry/configmanager/v2/cmd/configmanager.Version=${VERSION}\" -X \"github.com/DevLabFoundry/configmanager/v2/cmd/configmanager.Revision=${REVISION}\" -extldflags -static"
GOPATH=/eirctl/.deps GOOS=${BUILD_GOOS} GOARCH=${BUILD_GOARCH} CGO_ENABLED=0 go build -mod=readonly -buildvcs=false -ldflags="$ldflags" \
-o ./dist/configmanager-${BUILD_GOOS}-${BUILD_GOARCH}${BUILD_SUFFIX} ./cmd
echo "---"
echo "Built: configmanager-${BUILD_GOOS}-${BUILD_GOARCH}${BUILD_SUFFIX}"
echo "Version: ${VERSION}"
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:
- VERSION
- REVISION
sonar:coverage:prep:
context: bash
command:
- |
sed -i 's|github.com/DevLabFoundry/configmanager/v2/||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 GIT_TAG=2111dsfsdfa REVISION=as2342432`
command: |
git tag -a ${VERSION} -m "ci tag release" ${REVISION}
git push origin ${VERSION}
required:
env:
- VERSION
- REVISION