-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b46eb8
commit 8e5bc99
Showing
5 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,6 @@ | |
*.out | ||
*.so | ||
*.test | ||
build/ | ||
build/ | ||
output/ | ||
binary/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
IMAGE_NAME = $(shell basename $(shell pwd)) | ||
TAG_LATEST = $(IMAGE_NAME):latest | ||
TAG_DATE = $(IMAGE_NAME):$(shell date +"%Y-%m-%dT%H_%M") | ||
|
||
.PHONY: all image binary timestamp clean | ||
|
||
all: image build | ||
|
||
image: | ||
docker build . \ | ||
-t $(TAG_LATEST) \ | ||
-t $(TAG_DATE) | ||
|
||
build: | ||
mkdir -p binary | ||
go build -a \ | ||
-gcflags=all="-l -B" \ | ||
-ldflags="-w -s" \ | ||
-o binary/$(IMAGE_NAME) \ | ||
./... | ||
|
||
timestamp: | ||
mkdir -p binary | ||
go build -a \ | ||
-gcflags=all="-l -B" \ | ||
-ldflags="-w -s" \ | ||
-o binary/$(IMAGE_NAME)_$(shell date +"%Y-%m-%dT%H_%M") \ | ||
./... | ||
|
||
clean: | ||
rm -rf binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Output assets/runOCI.gif | ||
|
||
Set Theme "Dracula" | ||
Set FontSize 15 | ||
Set Padding 20 | ||
Set Height 210 | ||
|
||
Type "docker build -t workspaceone-prometheus-exporter ." | ||
Enter | ||
Sleep 15s | ||
|
||
Type "docker run -d -p 9740:9740 workspaceone-prometheus-exporter" | ||
Enter | ||
Sleep 3s |