~xenrox/#11

success

c5575c3Thorben Günther

Simplify HTTP Basic Authentication middleware

Owner
~xenrox
Created
10 months ago
Updated
10 months ago
Build manifest
view manifest »

Tasks

view log »
test view log »
lint view log »
build view log »
gofmt view log »
dev-image view log »
go to bottom »
go to top »
setup
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
[#11] 2023/07/19 14:34:16 Booting image archlinux (default) on port 22622
[#11] 2023/07/19 14:34:16 Waiting for guest to settle
[#11] 2023/07/19 14:34:25 Sending tasks
[#11] 2023/07/19 14:34:27 Sending build environment
[#11] 2023/07/19 14:34:27 Sending secrets
[#11] 2023/07/19 14:34:27 Resolving secret 2b44595c-3464-4c2d-a8df-c5dea8e90c4c
[#11] 2023/07/19 14:34:28 Installing packages
Warning: Permanently added '[localhost]:22622' (ED25519) to the list of known hosts.
(1/1) core.db (0)
core.db (134383/134383) 100%
(2/2) core.db.sig (0)
(1/1) extra.db (1687552/8712673) 19%
extra.db (8712673/8712673) 100%
(1/1) extra.db.sig (0)
Warning: Permanently added '[localhost]:22622' (ED25519) to the list of known hosts.
Resolving dependencies...
Checking package conflicts...
installing core/groff (1.23.0-2 -> 1.23.0-3)
installing core/sudo (1.9.14.p1-1 -> 1.9.14.p2-1)

Download Size:      4.12 M
Installed Size:    17.09 M
Size Delta:         3.56 K
Downloading packages...
(1/1) groff-1.23.0-3-x86_64.pkg.tar.zst (0)
groff-1.23.0-3-x86_64.pkg.tar.zst (2449075/2449075) 100%
(2/2) groff-1.23.0-3-x86_64.pkg.tar.zst.sig (0)
sudo-1.9.14.p2-1-x86_64.pkg.tar.zst (1870836/1870836) 100%
(1/2) groff-1.23.0-3-x86_64.pkg.tar.zst.sig (310/310) 100%
groff-1.23.0-3-x86_64.pkg.tar.zst.sig (310/310) 100%
(1/1) sudo-1.9.14.p2-1-x86_64.pkg.tar.zst.sig (0)
sudo-1.9.14.p2-1-x86_64.pkg.tar.zst.sig (310/310) 100%
checking keys in keyring (0/2) 0%
checking keys in keyring (1/2) 50%
checking keys in keyring (2/2) 100%
checking package integrity (0/2) 0%
checking package integrity (1/2) 56%
checking package integrity (2/2) 100%
loading package files (0/2) 0%
loading package files (1/2) 56%
loading package files (2/2) 100%
checking for file conflicts (0/2) 0%
checking for file conflicts (1/2) 50%
checking for file conflicts (2/2) 100%
Starting transaction...
upgrading groff (1/2) 0%
upgrading groff (1/2) 2%
upgrading groff (1/2) 3%
upgrading groff (1/2) 5%
upgrading groff (1/2) 7%
upgrading groff (1/2) 9%
upgrading groff (1/2) 10%
upgrading groff (1/2) 11%
upgrading groff (1/2) 13%
upgrading groff (1/2) 14%
upgrading groff (1/2) 15%
upgrading groff (1/2) 16%
upgrading groff (1/2) 17%
upgrading groff (1/2) 19%
upgrading groff (1/2) 20%
upgrading groff (1/2) 22%
upgrading groff (1/2) 23%
upgrading groff (1/2) 26%
upgrading groff (1/2) 28%
upgrading groff (1/2) 29%
upgrading groff (1/2) 30%
upgrading groff (1/2) 38%
upgrading groff (1/2) 39%
upgrading groff (1/2) 40%
upgrading groff (1/2) 41%
upgrading groff (1/2) 42%
upgrading groff (1/2) 43%
upgrading groff (1/2) 44%
upgrading groff (1/2) 45%
upgrading groff (1/2) 46%
upgrading groff (1/2) 47%
upgrading groff (1/2) 48%
upgrading groff (1/2) 49%
upgrading groff (1/2) 50%
upgrading groff (1/2) 51%
upgrading groff (1/2) 52%
upgrading groff (1/2) 53%
upgrading groff (1/2) 54%
upgrading groff (1/2) 55%
upgrading groff (1/2) 57%
upgrading groff (1/2) 59%
upgrading groff (1/2) 61%
upgrading groff (1/2) 62%
upgrading groff (1/2) 63%
upgrading groff (1/2) 68%
upgrading groff (1/2) 69%
upgrading groff (1/2) 70%
upgrading groff (1/2) 73%
upgrading groff (1/2) 78%
upgrading groff (1/2) 83%
upgrading groff (1/2) 88%
upgrading groff (1/2) 93%
upgrading groff (1/2) 98%
upgrading groff (1/2) 100%
upgrading sudo (2/2) 0%
upgrading sudo (2/2) 3%
upgrading sudo (2/2) 8%
upgrading sudo (2/2) 13%
upgrading sudo (2/2) 18%
upgrading sudo (2/2) 19%
upgrading sudo (2/2) 21%
upgrading sudo (2/2) 22%
upgrading sudo (2/2) 24%
upgrading sudo (2/2) 26%
upgrading sudo (2/2) 36%
upgrading sudo (2/2) 63%
upgrading sudo (2/2) 65%
upgrading sudo (2/2) 66%
upgrading sudo (2/2) 68%
upgrading sudo (2/2) 69%
upgrading sudo (2/2) 70%
upgrading sudo (2/2) 72%
upgrading sudo (2/2) 73%
upgrading sudo (2/2) 74%
upgrading sudo (2/2) 75%
upgrading sudo (2/2) 77%
upgrading sudo (2/2) 79%
upgrading sudo (2/2) 80%
upgrading sudo (2/2) 81%
upgrading sudo (2/2) 82%
upgrading sudo (2/2) 83%
upgrading sudo (2/2) 84%
upgrading sudo (2/2) 86%
upgrading sudo (2/2) 87%
upgrading sudo (2/2) 88%
upgrading sudo (2/2) 89%
upgrading sudo (2/2) 90%
upgrading sudo (2/2) 91%
upgrading sudo (2/2) 96%
upgrading sudo (2/2) 100%
Running post-transaction hooks...
(1/4) Running 30-systemd-daemon-reload.hook (Reloading system manager configuration...)
(2/4) Running 30-systemd-tmpfiles.hook (Creating temporary files...)
(3/4) Running 30-systemd-update.hook (Arming ConditionNeedsUpdate...)
(4/4) Running texinfo-install.hook (Updating the info directory file...)
Warning: Permanently added '[localhost]:22622' (ED25519) to the list of known hosts.
Sync Explicit (4): docker-1:24.0.2-1, go-2:1.20.6-1, revive-1.3.2-1, staticcheck-2023.1.3-1
resolving dependencies...
looking for conflicting packages...

Packages (7) bridge-utils-1.7.1-1  containerd-1.7.2-1  runc-1.1.7-1  docker-1:24.0.2-1  go-2:1.20.6-1  revive-1.3.2-1  staticcheck-2023.1.3-1

Total Download Size:    97.60 MiB
Total Installed Size:  449.31 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 go-2:1.20.6-1-x86_64 downloading...
 docker-1:24.0.2-1-x86_64 downloading...
 containerd-1.7.2-1-x86_64 downloading...
 staticcheck-2023.1.3-1-x86_64 downloading...
 runc-1.1.7-1-x86_64 downloading...
 revive-1.3.2-1-x86_64 downloading...
 bridge-utils-1.7.1-1-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing go...
installing revive...
installing staticcheck...
installing bridge-utils...
installing runc...
Optional dependencies for runc
    criu: checkpoint support
installing containerd...
installing docker...
Optional dependencies for docker
    btrfs-progs: btrfs backend support
    pigz: parallel gzip compressor support
    docker-scan: vulnerability scanner
    docker-buildx: extended build capabilities
:: Running post-transaction hooks...
(1/4) Creating system user accounts...
(2/4) Reloading system manager configuration...
(3/4) Reloading device manager configuration...
(4/4) Arming ConditionNeedsUpdate...
[#11] 2023/07/19 14:34:33 Cloning repositories
Cloning into 'ntfy-alertmanager'...
+ cd ntfy-alertmanager
+ git checkout -q c5575c3dc1e8fc05237738678dabde21ab548309
+ cd ntfy-alertmanager
+ git submodule update --init --recursive
[#11] 2023/07/19 14:34:33 Running task test
[#11] 2023/07/19 14:34:49 Running task lint
[#11] 2023/07/19 14:34:54 Running task build
[#11] 2023/07/19 14:34:55 Running task gofmt
[#11] 2023/07/19 14:34:56 Running task dev-image
test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
+ cd ntfy-alertmanager
+ go test -v ./...
go: downloading github.com/redis/go-redis/v9 v9.0.5
go: downloading git.sr.ht/~emersion/go-scfg v0.0.0-20230601130942-e042ab15616e
go: downloading git.xenrox.net/~xenrox/go-log v0.0.0-20221012231312-9e7356c29b74
go: downloading golang.org/x/text v0.11.0
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
?   	git.xenrox.net/~xenrox/ntfy-alertmanager	[no test files]
?   	git.xenrox.net/~xenrox/ntfy-alertmanager/cache	[no test files]
=== RUN   TestReadConfig
--- PASS: TestReadConfig (0.00s)
PASS
ok  	git.xenrox.net/~xenrox/ntfy-alertmanager/config	0.001s
lint
1
2
3
4
+ cd ntfy-alertmanager
+ go vet ./...
+ staticcheck ./...
+ revive ./...
build
1
2
+ cd ntfy-alertmanager
+ go build
gofmt
1
2
3
+ cd ntfy-alertmanager
++ gofmt -l .
+ test -z
dev-image
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
+ cd ntfy-alertmanager/docker
+ '[' git.sr.ht '!=' git.sr.ht ']'
++ git rev-parse master
++ git rev-parse HEAD
+ '[' c5575c3dc1e8fc05237738678dabde21ab548309 '!=' c5575c3dc1e8fc05237738678dabde21ab548309 ']'
+ sudo systemctl start docker
+ /home/build/.local/bin/dockerhub_login
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /home/build/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
+ docker build -f Dockerfile-dev -t xenrox/ntfy-alertmanager:dev ./..
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  9.161MB


Step 1/9 : FROM golang:alpine as build
alpine: Pulling from library/golang
31e352740f53: Pulling fs layer
7f9bcf943fa5: Pulling fs layer
9fd371fdf0be: Pulling fs layer
add974993529: Pulling fs layer
add974993529: Waiting
7f9bcf943fa5: Verifying Checksum
7f9bcf943fa5: Download complete
31e352740f53: Verifying Checksum
31e352740f53: Download complete
31e352740f53: Pull complete
7f9bcf943fa5: Pull complete
9fd371fdf0be: Verifying Checksum
9fd371fdf0be: Download complete
add974993529: Verifying Checksum
add974993529: Download complete
9fd371fdf0be: Pull complete
add974993529: Pull complete
Digest: sha256:7839c9f01b5502d7cb5198b2c032857023424470b3e31ae46a8261ffca72912a
Status: Downloaded newer image for golang:alpine
 ---> bf7808b93c00
Step 2/9 : WORKDIR /app
 ---> Running in 2ea6ba2bb48d
Removing intermediate container 2ea6ba2bb48d
 ---> 876f99537caa
Step 3/9 : COPY . .
 ---> edcb94a96419
Step 4/9 : RUN apk add --no-cache git
 ---> Running in 9fcf0bbefe07
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
(1/8) Installing brotli-libs (1.0.9-r14)
(2/8) Installing libunistring (1.1-r1)
(3/8) Installing libidn2 (2.3.4-r1)
(4/8) Installing nghttp2-libs (1.53.0-r0)
(5/8) Installing libcurl (8.1.2-r0)
(6/8) Installing libexpat (2.5.0-r1)
(7/8) Installing pcre2 (10.42-r1)
(8/8) Installing git (2.40.1-r0)
Executing busybox-1.36.1-r0.trigger
OK: 18 MiB in 24 packages
Removing intermediate container 9fcf0bbefe07
 ---> 2ce9090756bb
Step 5/9 : RUN go build -ldflags="-X main.version=$(git describe --long)" -o /app/ntfy-alertmanager
 ---> Running in 2a9208bfc460
go: downloading git.xenrox.net/~xenrox/go-log v0.0.0-20221012231312-9e7356c29b74
go: downloading golang.org/x/text v0.11.0
go: downloading github.com/redis/go-redis/v9 v9.0.5
go: downloading git.sr.ht/~emersion/go-scfg v0.0.0-20230601130942-e042ab15616e
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
Removing intermediate container 2a9208bfc460
 ---> 904b14e41062
Step 6/9 : FROM alpine:latest
latest: Pulling from library/alpine
31e352740f53: Already exists
Digest: sha256:82d1e9d7ed48a7523bdebc18cf6290bdb97b82302a8a9c27d4fe885949ea94d1
Status: Downloaded newer image for alpine:latest
 ---> c1aabb73d233
Step 7/9 : WORKDIR /
 ---> Running in fb58f0de8688
Removing intermediate container fb58f0de8688
 ---> 5a8a3f3c1f4c
Step 8/9 : COPY --from=build /app/ntfy-alertmanager /ntfy-alertmanager
 ---> fa4994b61042
Step 9/9 : ENTRYPOINT [ "./ntfy-alertmanager" ]
 ---> Running in 8aff4313a652
Removing intermediate container 8aff4313a652
 ---> d49c32255701
Successfully built d49c32255701
Successfully tagged xenrox/ntfy-alertmanager:dev
+ docker push xenrox/ntfy-alertmanager:dev
The push refers to repository [docker.io/xenrox/ntfy-alertmanager]
d403039a5153: Preparing
78a822fe2a2d: Preparing
78a822fe2a2d: Layer already exists
d403039a5153: Pushed
dev: digest: sha256:a2bdc5fdcf957cf92e81b1f4084e741c270efd7571dcbcd2b7b1fa6af72c23c8 size: 739
Build complete: success 10 months ago (took a minute)