chore: Keep docker containers up to date with latest patches. (#1347)
This commit is contained in:
parent
bad36854b2
commit
bcc38055d7
21
Makefile
21
Makefile
|
|
@ -19,15 +19,6 @@ CHLOGGEN_BINARY=bin/chloggen
|
||||||
CHLOGGEN = $(TOOLS_DIR)/$(CHLOGGEN_BINARY)
|
CHLOGGEN = $(TOOLS_DIR)/$(CHLOGGEN_BINARY)
|
||||||
CHLOGGEN_CONFIG := .chloggen/config.yaml
|
CHLOGGEN_CONFIG := .chloggen/config.yaml
|
||||||
|
|
||||||
# see https://github.com/open-telemetry/build-tools/releases for semconvgen updates
|
|
||||||
# Keep links in model/README.md and .vscode/settings.json in sync!
|
|
||||||
SEMCONVGEN_VERSION=0.25.0
|
|
||||||
|
|
||||||
# see https://github.com/open-telemetry/weaver/releases for weaver updates
|
|
||||||
WEAVER_VERSION=0.8.0
|
|
||||||
|
|
||||||
OPA_POLICY_AGENT_VERSION=0.67.1
|
|
||||||
|
|
||||||
# From where to resolve the containers (e.g. "otel/weaver").
|
# From where to resolve the containers (e.g. "otel/weaver").
|
||||||
CONTAINER_REPOSITORY=docker.io
|
CONTAINER_REPOSITORY=docker.io
|
||||||
|
|
||||||
|
|
@ -36,8 +27,12 @@ WEAVER_CONTAINER_REPOSITORY=$(CONTAINER_REPOSITORY)
|
||||||
SEMCONVGEN_CONTAINER_REPOSITORY=$(CONTAINER_REPOSITORY)
|
SEMCONVGEN_CONTAINER_REPOSITORY=$(CONTAINER_REPOSITORY)
|
||||||
|
|
||||||
# Fully qualified references to containers used in this Makefile.
|
# Fully qualified references to containers used in this Makefile.
|
||||||
WEAVER_CONTAINER=$(WEAVER_CONTAINER_REPOSITORY)/otel/weaver:$(WEAVER_VERSION)
|
# These are parsed from dependencies.Dockerfile so dependabot will autoupdate
|
||||||
SEMCONVGEN_CONTAINER=$(SEMCONVGEN_CONTAINER_REPOSITORY)/otel/semconvgen:$(SEMCONVGEN_VERSION)
|
# the versions of docker files we use.
|
||||||
|
WEAVER_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="weaver" {print $$2}')
|
||||||
|
SEMCONVGEN_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="semconvgen" {print $$2}')
|
||||||
|
OPA_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="opa" {print $$2}')
|
||||||
|
|
||||||
|
|
||||||
# TODO: add `yamllint` step to `all` after making sure it works on Mac.
|
# TODO: add `yamllint` step to `all` after making sure it works on Mac.
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
@ -221,7 +216,7 @@ LATEST_RELEASED_SEMCONV_VERSION := $(shell git ls-remote --tags https://github.c
|
||||||
.PHONY: check-policies
|
.PHONY: check-policies
|
||||||
check-policies:
|
check-policies:
|
||||||
docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec -v $(PWD)/policies:/policies \
|
docker run --rm -v $(PWD)/model:/source -v $(PWD)/docs:/spec -v $(PWD)/policies:/policies \
|
||||||
otel/weaver:${WEAVER_VERSION} registry check \
|
${WEAVER_CONTAINER} registry check \
|
||||||
--registry=/source \
|
--registry=/source \
|
||||||
--baseline-registry=https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v$(LATEST_RELEASED_SEMCONV_VERSION).zip[model] \
|
--baseline-registry=https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v$(LATEST_RELEASED_SEMCONV_VERSION).zip[model] \
|
||||||
--policy=/policies
|
--policy=/policies
|
||||||
|
|
@ -230,7 +225,7 @@ check-policies:
|
||||||
.PHONY: test-policies
|
.PHONY: test-policies
|
||||||
test-policies:
|
test-policies:
|
||||||
docker run --rm -v $(PWD)/policies:/policies -v $(PWD)/policies_test:/policies_test \
|
docker run --rm -v $(PWD)/policies:/policies -v $(PWD)/policies_test:/policies_test \
|
||||||
openpolicyagent/opa:${OPA_POLICY_AGENT_VERSION} test \
|
${OPA_CONTAINER} test \
|
||||||
--explain fails \
|
--explain fails \
|
||||||
/policies \
|
/policies \
|
||||||
/policies_test
|
/policies_test
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
# DO NOT BUILD
|
||||||
|
# This file is just for tracking dependencies of the semantic convention build.
|
||||||
|
# Dependabot can keep this file up to date with latest containers.
|
||||||
|
|
||||||
|
# Weaver is used to generate markdown docs, and enforce policies on the model.
|
||||||
|
FROM otel/weaver:0.8.0 AS weaver
|
||||||
|
|
||||||
|
# OPA is used to test policies enforced by weaver.
|
||||||
|
FROM openpolicyagent/opa:0.67.1 AS opa
|
||||||
|
|
||||||
|
# Semconv gen is used for backwards compatibility checks.
|
||||||
|
# TODO(jsuereth): Remove this when no longer used.
|
||||||
|
FROM otel/semconvgen:0.25.0 AS semconvgen
|
||||||
Loading…
Reference in New Issue