mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-03 12:22:11 +00:00
Add buildah script for test container
Signed-off-by: Ben Ridley <benridley29@gmail.com>
This commit is contained in:
parent
1d912faab6
commit
ea5b925147
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,4 @@
|
|||||||
/data/
|
/data/
|
||||||
make_container.sh
|
|
||||||
/alertmanager
|
/alertmanager
|
||||||
/amtool
|
/amtool
|
||||||
*.yml
|
*.yml
|
||||||
|
7
make_container.sh
Executable file
7
make_container.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
container=$(buildah from prom/alertmanager)
|
||||||
|
mnt=$(buildah mount $container)
|
||||||
|
CGO_ENABLED=0 go build -ldflags="-X 'main.Version=benny'" -o alertmanager cmd/alertmanager/main.go
|
||||||
|
cp -f ./alertmanager "${mnt}/bin/alertmanager"
|
||||||
|
buildah commit $container ben-am
|
||||||
|
buildah unmount $container
|
2
notes.txt
Normal file
2
notes.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
- Unmarshalling is weird. Alertmanager has a status page that just marshalls config into a string. When I tried to use my library with it, it blew up because the timeinterval library hides many of its internal fields and thus they can't be marshalled.
|
||||||
|
I worked around this by creating a 'config.TimeInterval' concept. Real timeintervals can be created from this representation by re-unmarshalling maybe?
|
Loading…
Reference in New Issue
Block a user