-
Notifications
You must be signed in to change notification settings - Fork 32
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
Provide npcap distribution internally #148
Changes from 15 commits
507baf0
762c067
7409208
5faa37f
ae28a32
9abcd05
429b992
98efac1
146a157
16a245d
ad859c7
8fe8e98
44cbaa4
cc80a4e
c26271b
0d2e610
4ff4855
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ Dockerfile | |
.status.* | ||
*.bck | ||
CHANGELOG.md | ||
npcap/lib/*.exe |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,29 @@ VCS_REF := $(shell git rev-parse HEAD) | |
VCS_URL := https://github.com/elastic/golang-crossbuild | ||
BUILD_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
.DEFAULT_GOAL := build | ||
NPCAP_VERSION := 1.60 | ||
# TODO: to be replaced once we validate it works as expected | ||
#NPCAP_FILE := npcap-$(NPCAP_VERSION)-oem.exe | ||
NPCAP_FILE := test.txt | ||
SUFFIX_NPCAP_VERSION := -npcap-$(NPCAP_VERSION) | ||
NPCAP_REPOSITORY := docker.elastic.co/observability-ci | ||
|
||
# Requires login at https://docker.elastic.co:7000/. | ||
push: | ||
echo ">> Pushing $(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)" | ||
@[ "$(SUFFIX)" = "$(SUFFIX_NPCAP_VERSION)" ] \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could not find the way to use I guess, something should be related to where the SUFFIX is defined and the |
||
&& ( \ | ||
[ "$(REPOSITORY)" = "$(NPCAP_REPOSITORY)" ] \ | ||
&& $(MAKE) atomic-push \ | ||
|| echo "NOTE: $(SUFFIX) can only be published in $(NPCAP_REPOSITORY)" \ | ||
) \ | ||
|| $(MAKE) atomic-push | ||
|
||
# Requires login at https://docker.elastic.co:7000/. | ||
atomic-push: | ||
@echo ">> Pushing $(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)" | ||
@docker push "$(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)" | ||
|
||
push-arm: | ||
echo ">> Pushing $(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)" | ||
@echo ">> Pushing $(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)" | ||
@docker push "$(REPOSITORY)/$(NAME):$(VERSION)$(SUFFIX)$(TAG_EXTENSION)" | ||
|
||
.PHONY: push push-arm |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,9 @@ | ||||||
# NPCAP | ||||||
|
||||||
If you'd like to bump the npcap version please follow the below steps: | ||||||
|
||||||
1) Update `NPCAP_VERSION` value in the `Makefile`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
2) Download the new artifact. | ||||||
3) Upload the artifact to `gs://obs-ci-cache/private`. | ||||||
|
||||||
Credentials to the artifact service can be found in the APM-Shared folder in the password management tool. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Makefile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ARG REPOSITORY | ||
ARG VERSION | ||
ARG TAG_EXTENSION='' | ||
FROM ${REPOSITORY}/golang-crossbuild:${VERSION}-main${TAG_EXTENSION} | ||
|
||
COPY lib /installer | ||
|
||
# Build-time metadata as defined at http://label-schema.org. | ||
ARG BUILD_DATE | ||
ARG IMAGE | ||
ARG VCS_REF | ||
ARG VCS_URL | ||
LABEL org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name=$IMAGE \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.schema-version="1.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../Makefile.common |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Makefile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ARG REPOSITORY | ||
ARG VERSION | ||
ARG TAG_EXTENSION='' | ||
FROM ${REPOSITORY}/golang-crossbuild:${VERSION}-main${TAG_EXTENSION} | ||
|
||
COPY lib /installer | ||
|
||
# Build-time metadata as defined at http://label-schema.org. | ||
ARG BUILD_DATE | ||
ARG IMAGE | ||
ARG VCS_REF | ||
ARG VCS_URL | ||
LABEL org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name=$IMAGE \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.schema-version="1.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../Makefile.common |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.