Skip to content

Commit

Permalink
rename to manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaasman00 committed Jul 15, 2024
1 parent a9728d5 commit eb3f8f2
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ local
.vscode
.vagrant
dist
builder
cosign.*
gpg.*
*.msi
Expand Down
15 changes: 5 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ project_name: observiq-otel-collector
before:
hooks:
- make release-prep CURR_VERSION={{ .Version }}
- make build-all OUTDIR="tmp"

# https://goreleaser.com/customization/build/
builds:
# https://goreleaser.com/customization/builds/#import-pre-built-binaries
- id: collector
builder: prebuilt
binary: observiq-otel-collector
main: ./cmd/collector
env:
- CGO_ENABLED=0
mod_timestamp: "{{ .CommitTimestamp }}"
goos:
- windows
- linux
Expand All @@ -35,12 +34,8 @@ builds:
goarch: ppc64
- goos: darwin
goarch: ppc64le
ldflags:
- -s -w
- -X github.com/observiq/bindplane-agent/internal/version.version=v{{ .Version }}
- -X github.com/observiq/bindplane-agent/internal/version.gitHash={{ .FullCommit }}
- -X github.com/observiq/bindplane-agent/internal/version.date={{ .Date }}
no_unique_dist_dir: false
prebuilt:
path: tmp/collector_{{ .Os }}_{{ .Arch }}/observiq-otel-collector{{ .Ext }}
- id: updater
binary: updater
dir: ./updater/
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# All source code and documents, used when checking for misspellings
ALLDOC := $(shell find . \( -name "*.md" -o -name "*.yaml" \) \
-type f | sort)
ALL_MODULES := $(shell find . -type f -name "go.mod" -exec dirname {} \; | sort )
ALL_MODULES := $(shell find . -path ./builder -prune -o -type f -name "go.mod" -exec dirname {} \; | sort )
ALL_MDATAGEN_MODULES := $(shell find . -type f -name "metadata.yaml" -exec dirname {} \; | sort )

# All source code files
ALL_SRC := $(shell find . -name '*.go' -o -name '*.sh' -o -name 'Dockerfile*' -type f | sort)
ALL_SRC := $(shell find . -path ./builder -prune -o -name '*.go' -o -name '*.sh' -o -name 'Dockerfile*' -type f | sort)

OUTDIR=./dist
GOOS ?= $(shell go env GOOS)
Expand All @@ -32,14 +32,15 @@ VERSION ?= $(if $(CURRENT_TAG),$(CURRENT_TAG),$(PREVIOUS_TAG))
# Builds the agent for current GOOS/GOARCH pair
.PHONY: agent
agent:
builder --config="./distros/observIQ/manifest.yaml" --name="observiq-agent-distro_$(GOOS)_$(GOARCH)$(EXT)"
builder --config="./manifests/observIQ/manifest.yaml"
mkdir -p $(OUTDIR)/collector_$(GOOS)_$(GOARCH); cp ./builder/observiq-otel-collector $(OUTDIR)/collector_$(GOOS)_$(GOARCH)/observiq-otel-collector$(EXT)

# Builds a custom distro for the current GOOS/GOARCH pair using the manifest specified
# DISTRO_NAME = name of the custom built distro; MANIFEST = path to the manifest file for the distro to be built
# Usage: make distro DISTRO_NAME="my_distro" MANIFEST="./distros/custom/my_distro_manifest.yaml"
# MANIFEST = path to the manifest file for the distro to be built
# Usage: make distro MANIFEST="./manifests/custom/my_distro_manifest.yaml"
.PHONY: distro
distro:
builder --config="$(MANIFEST)" --name="$(DISTRO_NAME)_$(GOOS)_$(GOARCH)$(EXT)"
builder --config="$(MANIFEST)"

# Builds just the updater for current GOOS/GOARCH pair
# TODO:(dakota) Updater likely to change and so is this cmd
Expand All @@ -61,7 +62,7 @@ kill:
# Stops processes and cleans up
.PHONY: reset
reset: kill
rm -f agent.log effective.yaml local/storage/*
rm -rf agent.log effective.yaml local/storage/* builder/

# Builds the updater + agent for current GOOS/GOARCH pair
.PHONY: build-binaries
Expand Down Expand Up @@ -230,7 +231,6 @@ release-prep:
@rm -rf release_deps
@mkdir release_deps
@echo 'v$(CURR_VERSION)' > release_deps/VERSION.txt
./buildscripts/download-dependencies.sh release_deps
@cp -r ./plugins release_deps/
@cp config/example.yaml release_deps/config.yaml
@cp config/logging.yaml release_deps/logging.yaml
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/distributions/otelcol-contrib/manifest.yaml
dist:
module: github.com/observiq/bindplane-agent
name: observiq-agent-distro
name: observiq-otel-collector
description: ObservIQ's custom distro for OpenTelemetry Collector
version: "v0.0.1"
output_path: ./dist
version: "v2.0.0"
output_path: ./builder
otelcol_version: 0.103.0

extensions:
Expand Down

0 comments on commit eb3f8f2

Please sign in to comment.