-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Justin Kolberg <[email protected]>
- Loading branch information
1 parent
4f60759
commit a6e6ddf
Showing
21 changed files
with
882 additions
and
2 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
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
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
FROM alpine:3.17 | ||
|
||
ARG TARGETPLATFORM | ||
ARG PACKAGECLOUDGO_VERSION=0.1.3 | ||
|
||
LABEL org.opencontainers.image.authors="Sumo Logic <[email protected]>" | ||
|
||
RUN apk add --no-cache \ | ||
|
@@ -9,8 +13,16 @@ RUN apk add --no-cache \ | |
git \ | ||
make \ | ||
rpm \ | ||
rpm-dev | ||
rpm-dev \ | ||
curl \ | ||
bash \ | ||
tar \ | ||
gzip | ||
|
||
COPY docker/install-deps.sh /install-deps.sh | ||
|
||
RUN /install-deps.sh "$TARGETARCH" | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
COPY docker/entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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,69 @@ | ||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | ||
mkfile_dir ?= $(patsubst %/,%,$(dir $(mkfile_path))) | ||
build_dir ?= $(mkfile_dir)/build | ||
|
||
OTC_ARTIFACTS_SOURCE ?= github-artifacts | ||
|
||
ifeq ($(strip $(PACKAGECLOUD_TOKEN)),) | ||
$(error "PACKAGECLOUD_TOKEN must be set") | ||
endif | ||
|
||
.PHONY: docker-image | ||
docker-image: | ||
docker buildx bake --load | ||
|
||
.PHONY: build | ||
build: docker-image | ||
build: | ||
docker run \ | ||
-e TARGET="$(TARGET)" \ | ||
-e OTC_VERSION="$(OTC_VERSION)" \ | ||
-e OTC_SUMO_VERSION="$(OTC_SUMO_VERSION)" \ | ||
-e OTC_BUILD_NUMBER="$(OTC_BUILD_NUMBER)" \ | ||
-e OTC_ARTIFACTS_SOURCE="$(OTC_ARTIFACTS_SOURCE)" \ | ||
-v "$(mkfile_dir):/src" \ | ||
-v "$(build_dir):/build" \ | ||
otelcol-sumo/cmake \ | ||
cmake /src | ||
|
||
.PHONY: package | ||
package: build | ||
package: | ||
docker run \ | ||
-v "$(mkfile_dir):/src" \ | ||
-v "$(build_dir):/build" \ | ||
otelcol-sumo/cmake \ | ||
make package | ||
|
||
.PHONY: publish-package | ||
publish-package: package | ||
publish-package: | ||
docker run \ | ||
-v "$(mkfile_dir):/src" \ | ||
-v "$(build_dir):/build" \ | ||
-e PACKAGECLOUD_TOKEN="$(PACKAGECLOUD_TOKEN)" \ | ||
otelcol-sumo/cmake \ | ||
make publish-package | ||
|
||
.PHONY: otc_linux_amd64_deb | ||
otc_linux_amd64_deb: TARGET = otc_linux_amd64_deb | ||
otc_linux_amd64_deb: publish-package | ||
|
||
.PHONY: otc_linux_arm64_deb | ||
otc_linux_arm64_deb: TARGET = otc_linux_arm64_deb | ||
otc_linux_arm64_deb: publish-package | ||
|
||
.PHONY: otc_linux_amd64_rpm | ||
otc_linux_amd64_rpm: TARGET = otc_linux_amd64_rpm | ||
otc_linux_amd64_rpm: publish-package | ||
|
||
.PHONY: otc_linux_arm64_rpm | ||
otc_linux_arm64_rpm: TARGET = otc_linux_arm64_rpm | ||
otc_linux_arm64_rpm: publish-package | ||
|
||
.PHONY: all-targets | ||
all-targets: | ||
$(MAKE) otc_linux_amd64_deb | ||
$(MAKE) otc_linux_arm64_deb | ||
$(MAKE) otc_linux_amd64_rpm | ||
$(MAKE) otc_linux_arm64_rpm |
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,24 @@ | ||
macro(check_architecture_support) | ||
if(NOT ${package_arch} IN_LIST _supported_architectures) | ||
message(FATAL_ERROR "${_distro_name} does not support architecture: ${package_arch}") | ||
endif() | ||
list(APPEND packagecloud_distros ${_distro_index_name}) | ||
set(packagecloud_distros ${packagecloud_distros} PARENT_SCOPE) | ||
endmacro() | ||
|
||
macro(print_packagecloud_distros) | ||
message(STATUS "Packagecloud distributions for this package:") | ||
foreach(_pc_distro ${packagecloud_distros}) | ||
message(STATUS " * ${_pc_distro}") | ||
endforeach() | ||
endmacro() | ||
|
||
include("${DISTRIBUTIONS_DIR}/amazon.cmake") | ||
include("${DISTRIBUTIONS_DIR}/debian.cmake") | ||
include("${DISTRIBUTIONS_DIR}/el.cmake") | ||
include("${DISTRIBUTIONS_DIR}/fedora.cmake") | ||
include("${DISTRIBUTIONS_DIR}/ol.cmake") | ||
include("${DISTRIBUTIONS_DIR}/opensuse.cmake") | ||
include("${DISTRIBUTIONS_DIR}/raspbian.cmake") | ||
include("${DISTRIBUTIONS_DIR}/sles.cmake") | ||
include("${DISTRIBUTIONS_DIR}/ubuntu.cmake") |
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,33 @@ | ||
## | ||
# Amazon Linux releases | ||
# | ||
# End of Life: https://endoflife.date/amazon-linux | ||
## | ||
|
||
# Amazon Linux 2023 | ||
# | ||
# End of Standard Support: March 15, 2025 | ||
# End of Security Support: March 15, 2028 | ||
function(amazon_2023) | ||
set(_distro_name "Amazon Linux 2023") | ||
set(_distro_index_name "amazon/2023") | ||
set(_supported_architectures | ||
"aarch64" | ||
"x86_64" | ||
) | ||
check_architecture_support() | ||
endfunction() | ||
|
||
# Amazon Linux 2 | ||
# | ||
# End of Standard Support: June 30, 2025 | ||
# End of Security Support: June 30, 2025 | ||
function(amazon_2) | ||
set(_distro_name "Amazon Linux 2") | ||
set(_distro_index_name "amazon/2") | ||
set(_supported_architectures | ||
"aarch64" | ||
"x86_64" | ||
) | ||
check_architecture_support() | ||
endfunction() |
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,115 @@ | ||
## | ||
# Debian releases | ||
# | ||
# LTS: https://wiki.debian.org/LTS. | ||
# Extended LTS: https://wiki.debian.org/LTS/Extended | ||
# Debian Releases: https://www.debian.org/releases/ | ||
## | ||
|
||
# Debian 12 Bookworm | ||
# | ||
# End of LTS Support: 2028-06-11 | ||
# End of Extended LTS Support: 2033-06-30 | ||
function(debian_bookworm) | ||
set(_distro_name "Debian 12 Bookworm") | ||
set(_distro_index_name "debian/bookworm") | ||
set(_supported_architectures | ||
"amd64" | ||
"arm64" | ||
"armel" | ||
"armhf" | ||
"i386" | ||
"mipsel" | ||
"mips64el" | ||
"ppc64el" | ||
"s390x" | ||
) | ||
check_architecture_support() | ||
endfunction() | ||
|
||
# Debian 11 Bullseye | ||
# | ||
# End of LTS Support: 2026-08-31 | ||
# End of Extended LTS Support: 2031-06-30 | ||
function(debian_bullseye) | ||
set(_distro_name "Debian 11 Bullseye") | ||
set(_distro_index_name "debian/bullseye") | ||
set(_supported_architectures | ||
"amd64" | ||
"arm64" | ||
"armel" | ||
"armhf" | ||
"i386" | ||
"mipsel" | ||
"mips64el" | ||
"ppc64el" | ||
"s390x" | ||
) | ||
check_architecture_support() | ||
endfunction() | ||
|
||
# Debian 10 Buster | ||
# | ||
# End of LTS Support: 2024-06-30 | ||
# End of Extended LTS Support: 2029-06-30 | ||
function(debian_buster) | ||
set(_distro_name "Debian 10 Buster") | ||
set(_distro_index_name "debian/buster") | ||
set(_supported_architectures | ||
"amd64" | ||
"arm64" | ||
"armel" | ||
"armhf" | ||
"i386" | ||
"mips" | ||
"mipsel" | ||
"mips64el" | ||
"ppc64el" | ||
"s390x" | ||
) | ||
check_architecture_support() | ||
endfunction() | ||
|
||
# Debian 9 Stretch | ||
# | ||
# End of LTS Support: 2022-06-30 | ||
# End of Extended LTS Support: 2027-06-30 | ||
function(debian_stretch) | ||
set(_distro_name "Debian 9 Stretch") | ||
set(_distro_index_name "debian/stretch") | ||
set(_supported_architectures | ||
"amd64" | ||
"arm64" | ||
"armel" | ||
"armhf" | ||
"i386" | ||
"mips" | ||
"mips64el" | ||
"mipsel" | ||
"ppc64el" | ||
"s390x" | ||
) | ||
check_architecture_support() | ||
endfunction() | ||
|
||
# Debian 8 Jessie | ||
# | ||
# End of LTS Support: 2020-06-30 | ||
# End of Extended LTS Support: 2025-06-30 | ||
function(debian_jessie) | ||
set(_distro_name "Debian 8 Jessie") | ||
set(_distro_index_name "debian/jessie") | ||
set(_supported_architectures | ||
"amd64" | ||
"arm64" | ||
"armel" | ||
"armhf" | ||
"i386" | ||
"mips" | ||
"mipsel" | ||
"powerpc" | ||
"ppc64el" | ||
"s390x" | ||
) | ||
check_architecture_support() | ||
endfunction() |
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,57 @@ | ||
## | ||
# Enterprise Linux releases | ||
# | ||
# Life Cycle: https://access.redhat.com/support/policy/updates/errata | ||
# Architectures: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/considerations_in_adopting_rhel_8/architectures_considerations-in-adopting-rhel-8 | ||
## | ||
|
||
# Enterprise Linux 9 | ||
# | ||
# End of Full Support: May 31, 2027 | ||
# End of Maintenance Support: May 31, 2032 | ||
# End of Extended Life Cycle Support: May 31, 2035 | ||
function(el_9) | ||
set(_distro_name "Enterprise Linux 9.0") | ||
set(_distro_index_name "el/9") | ||
set(_supported_architectures | ||
"aarch64" | ||
"ppc64" | ||
"s390x" | ||
"x86_64" | ||
) | ||
check_architecture_support() | ||
endfunction() | ||
|
||
# Enterprise Linux 8 | ||
# | ||
# End of Full Support: May 31, 2024 | ||
# End of Maintenance Support: May 31, 2029 | ||
# End of Extended Life Cycle Support: May 31, 2032 | ||
function(el_8) | ||
set(_distro_name "Enterprise Linux 8.0") | ||
set(_distro_index_name "el/8") | ||
set(_supported_architectures | ||
"aarch64" | ||
"ppc64" | ||
"s390x" | ||
"x86_64" | ||
) | ||
check_architecture_support() | ||
endfunction() | ||
|
||
# Enterprise Linux 7 | ||
# | ||
# End of Full Support: August 6, 2019 | ||
# End of Maintenance Support: June 30, 2024 | ||
# End of Extended Life Cycle Support: June 30, 2028 | ||
function(el_7) | ||
set(_distro_name "Enterprise Linux 7.0") | ||
set(_distro_index_name "el/7") | ||
set(_supported_architectures | ||
"aarch64" | ||
"ppc64" | ||
"s390x" | ||
"x86_64" | ||
) | ||
check_architecture_support() | ||
endfunction() |
Oops, something went wrong.