Skip to content

Send additional fields from ebpf-discovery: url-scheme, domain (#94) #276

Send additional fields from ebpf-discovery: url-scheme, domain (#94)

Send additional fields from ebpf-discovery: url-scheme, domain (#94) #276

# Copyright 2023 Dynatrace LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build, test and publish Release
on:
push:
branches:
- main
jobs:
build-test-and-publish-release:
runs-on: ubuntu-latest
steps:
- name: Checkout source code of the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set environment variables
uses: ./.github/actions/set-environment-variables
with:
build-type: Release
- name: Build docker image
uses: ./.github/actions/build-docker-image
- name: Configure
uses: ./.github/actions/configure
- name: Build
uses: ./.github/actions/build
- name: Unit tests
uses: ./.github/actions/unit-tests
- name: Component tests
uses: ./.github/actions/component-tests
- name: Create artifact directory
run: mkdir ${{ env.ARTIFACT_PATH }}
- name: Move license to artifact directory
run: mv ${{ github.workspace }}/LICENSE ${{ env.ARTIFACT_PATH }}/LICENSE
- name: Move third party licenses to artifact directory
run: mv ${{ env.BUILD_PATH }}/licenses ${{ env.ARTIFACT_PATH }}/third_party
- name: Move protobuf model to artifact directory
run: mv ${{ env.BUILD_PATH }}/libebpfdiscoveryproto/ebpfdiscoveryproto ${{ env.ARTIFACT_PATH }}/ebpfdiscoveryproto
- name: Move binaries to artifact directory
run: mv ${{ env.BUILD_PATH }}/bin ${{ env.ARTIFACT_PATH }}/bin
- name: Remove test binaries from artifact directory
run: find ${{ env.ARTIFACT_PATH }}/* -name 'test*' -exec rm {} \;
- name: Zip artifact directory contents
run: |
cd ${{ env.ARTIFACT_PATH }}
zip -r ${{ env.ARTIFACT_VERSION }}.zip .
- name: Publish zip to GitHub OCI registry
run: |
cd ${{ env.ARTIFACT_PATH }}
printf "%s" ${{ secrets.GITHUB_TOKEN }} | docker run --rm -i -v $(pwd):/workspace ghcr.io/oras-project/oras:v1.0.1 push -u ${{ github.actor }} --password-stdin ${{ env.GITHUB_OCI_REGISTRY_ADDRESS }}/${{ env.LOWERCASE_REPOSITORY_NAME }}-linux-x86_64:${{ env.ARTIFACT_VERSION }},latest ${{ env.ARTIFACT_VERSION }}.zip