Skip to content

Commit

Permalink
Add msi target to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jchengsfx committed Apr 12, 2021
1 parent 4f96900 commit a8a30c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ jobs:
- run:
name: Run docker image
command: |
docker run -d -e SPLUNK_ACCESS_TOKEN=12345 -e SPLUNK_REALM=us0 --name otelcol otelcol:latest
docker run -d -e SPLUNK_ACCESS_TOKEN=12345 -e SPLUNK_REALM=fake-realm --name otelcol otelcol:latest
sleep 10
if [ -z "$( docker ps --filter=status=running --filter=name=otelcol -q )" ]; then
docker logs otelcol
Expand Down Expand Up @@ -495,15 +495,12 @@ jobs:
docker_layer_caching: true
steps:
- attach_to_workspace
- run:
name: Build msi-builder image
command: docker build -t msi-builder internal/buildscripts/packaging/msi/msi-builder
- run:
name: Build MSI
command: |
mkdir dist
export VERSION_TAG="${CIRCLE_TAG/v/}"
docker run --rm -v $(pwd):/project -u 0 msi-builder "${VERSION_TAG:-0.0.1.$CIRCLE_BUILD_NUM}"
mkdir -p dist
export VERSION_TAG="${CIRCLE_TAG#v}"
make msi SKIP_COMPILE=true VERSION="${VERSION_TAG:-0.0.1.$CIRCLE_BUILD_NUM}"
- persist_to_workspace:
root: ~/
paths: project/dist/*.msi
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,11 @@ ifneq ($(SKIP_COMPILE), true)
endif
docker build -t otelcol-fpm internal/buildscripts/packaging/fpm
docker run --rm -v $(CURDIR):/repo -e PACKAGE=$* -e VERSION=$(VERSION) -e ARCH=$(ARCH) -e SMART_AGENT_RELEASE=$(SMART_AGENT_RELEASE) otelcol-fpm

.PHONY: msi
msi:
ifneq ($(SKIP_COMPILE), true)
$(MAKE) binaries-windows_amd64
endif
docker build -t msi-builder internal/buildscripts/packaging/msi/msi-builder
docker run --rm -v $(CURDIR):/project -u 0 msi-builder $(VERSION)

0 comments on commit a8a30c8

Please sign in to comment.