Skip to content

github-actions: build docker images #508

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

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft

Conversation

v1v
Copy link
Member

@v1v v1v commented Feb 10, 2025

What

Use GH workflows to create the docker images.

Why

  • Easy to maintain
  • Faster builds
image

vs

image

Caveats

This won't work for PRs from forked repositories and can not access GH secrets.

Tasks

  • Enable OIDC for accessing the private google bucket
  • Enable Docker login
  • Docker push
  • Access google bucket
  • Support releases for push in main or any branches

Follow up

Copy link

mergify bot commented Feb 10, 2025

This pull request does not have a backport label. Could you fix it @v1v? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d is the label to automatically backport to the 1./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@v1v
Copy link
Member Author

v1v commented Feb 10, 2025

Some failures

 > [4/7] RUN     cd /tmp/osxcross     && curl -sSL "https://codeload.github.com/tpoechtrager/osxcross/tar.gz/3034f7149716d815bc473d0a7b35d17e4cf175aa"         | tar -C /tmp/osxcross --strip=1 -xzf -     && UNATTENDED=yes ./build.sh >/dev/null     && mv target "/usr/osxcross"     && rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX10.11.sdk/usr/share/man":
27.23 bitcode_strip.c:(.text+0x8bd): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
31.64 ar: `u' modifier ignored since `D' is the default (see `U')
34.82 otool-print_bitcode.o: In function `print_bitcode_section':
34.82 print_bitcode.c:(.text+0x3fa): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
35.29 ar: `u' modifier ignored since `D' is the default (see `U')
36.33 ar: `u' modifier ignored since `D' is the default (see `U')
45.38 ar: `u' modifier ignored since `D' is the default (see `U')
51.83 ar: `u' modifier ignored since `D' is the default (see `U')
77.08 osxcross: error: cannot find libc++ headers
77.08 osxcross: error: while detecting target
------

See #6

@@ -18,18 +18,28 @@ endif

# Requires login at google storage.
copy-npcap:
@echo 'cp gs://$(GS_BUCKET_PATH)/private/$(NPCAP_FILE)'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for debugging purposes only

endif

# Requires login at google storage.
copy-sdks:
@echo 'cp gs://$(GS_BUCKET_PATH)/sdks'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for debugging purposes only

ifeq ($(CI),true)
@gcloud storage cp gs://ingest-buildkite-ci/sdks . --recursive
@gcloud storage cp gs://$(GS_BUCKET_PATH)/sdks . --recursive
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honour the variable

@@ -7,7 +7,7 @@ NPCAP_VERSION := 1.80
NPCAP_FILE := npcap-$(NPCAP_VERSION)-oem.exe
SUFFIX_NPCAP_VERSION := -npcap-$(NPCAP_VERSION)
NPCAP_REPOSITORY := docker.elastic.co/observability-ci
GS_BUCKET_PATH ?= ingest-buildkite-ci
GS_BUCKET_PATH ?=
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unset, so we are forced to set it always

@elasticmachine
Copy link

💚 Build Succeeded

History

@elasticmachine
Copy link

💚 Build Succeeded

History

@elasticmachine
Copy link

💚 Build Succeeded

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants