Giter Site home page Giter Site logo

kkujawa-sumo / sumologic-otel-collector-packaging Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sumologic/sumologic-otel-collector-packaging

0.0 0.0 0.0 1.1 MB

License: Apache License 2.0

Shell 31.93% Go 34.80% C# 13.49% PowerShell 6.21% Makefile 0.18% CMake 13.25% HCL 0.04% Dockerfile 0.09%

sumologic-otel-collector-packaging's Introduction

sumologic-otel-collector-packaging

Building

Packages can be built using the provided Dockerfile or locally.

Required environment variables

TARGET

Represents the target package to build. The value must be the name of a file in the targets directory without the file extension. (e.g. otc_linux_arm64_deb)

Show the list of targets by running:

find targets -name '*.cmake' -exec basename -s .cmake {} \;

OTC_VERSION

Represents the base version of otelcol-sumo. This value is used to fetch the otelcol-sumo binary from GitHub Releases and as the version of the packages produced by this project.

OTC_SUMO_VERSION

Represents the "sumo" version (e.g. the X in A.B.C-sumo-X) of otelcol-sumo. It is used for fetching the otelcol-sumo binary from GitHub Releases.

OTC_BUILD_NUMBER

Represents the package release version (e.g. the X in A.B.C-X) used for incremental changes to the packaging code. It should contain a unique, unsigned integer that increments with each build to allow for upgrading from one package to another. This is typically set to the job number of a CI job but can be set to 0 when building packages for testing without upgrades.

Example

When packaging a GitHub release with the tag v0.69.0-sumo-0 for macOS on an arm64 processor:

export TARGET=otc_linux_arm64_deb
export OTC_VERSION=0.69.0
export OTC_SUMO_VERSION=0
export OTC_BUILD_NUMBER=1234

Using Docker

NOTE: This method only supports building deb & rpm packages.

  1. First bake and load the image:
docker buildx bake --load
  1. Build the Makefile:
docker run \
-e TARGET="$TARGET" \
-e OTC_VERSION="$OTC_VERSION" \
-e OTC_SUMO_VERSION="$OTC_SUMO_VERSION" \
-e OTC_BUILD_NUMBER="$OTC_BUILD_NUMBER" \
-v $(pwd):/src \
-v $(pwd)/build:/build \
otelcol-sumo/cmake \
cmake /src
  1. Build the package:
docker run \
-v $(pwd):/src \
-v $(pwd)/build:/build \
otelcol-sumo/cmake \
make package

Using local system

Building locally requires dependencies that will differ based on your platform and the packages that you are trying to build. You will need CMake to get started.

  1. Build the Makefile:
cd build && cmake ../
  1. Build the package:
make package

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.