Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce go.mod for env2yaml #15921

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,12 @@ venv: requirements.txt
for i in 0 1 2 3 4 5; do sleep "$i"; pip install -r requirements.txt && break; done &&\
touch venv

# Make a Golang container that can compile our env2yaml tool.
golang:
docker build -t golang:env2yaml data/golang

# Compile "env2yaml", the helper for configuring logstash.yml via environment
# variables.
env2yaml: golang
docker run --rm -i \
-v $(PWD)/data/logstash/env2yaml:/usr/local/src/env2yaml:Z \
golang:env2yaml
env2yaml:
docker run --rm \
-v "$(PWD)/data/logstash/env2yaml:/usr/src/env2yaml" \
-w /usr/src/env2yaml golang:1 go build

# Generate the Dockerfiles from Jinja2 templates.
dockerfile: venv templates/Dockerfile.j2
Expand Down
4 changes: 0 additions & 4 deletions docker/data/golang/Dockerfile

This file was deleted.

5 changes: 5 additions & 0 deletions docker/data/logstash/env2yaml/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module logstash/env2yaml

go 1.21

require gopkg.in/yaml.v2 v2.4.0
3 changes: 3 additions & 0 deletions docker/data/logstash/env2yaml/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=