Skip to content

Commit

Permalink
chore(ci): pkg trigger & release workflow updates
Browse files Browse the repository at this point in the history
Packaging is now only triggered from Dev & PR builds. The only input
sent when triggering packaging is now the Workflow Run ID of the
workflow run that packaging should pull its artifacts from.

The version of otelcol-sumo & otelcol-config is now determined using a
combination of the otelcol_version in
`otelcolbuilder/.otelcol-builder.yaml` and git tags.

Releases are no longer triggered by the creation of a tag. A release can
now be triggered via the new 'Publish release' workflow. The new release
workflow requires the ID of a workflow run that contains the artifacts
to be released.

The Git SHA used to build the otelcol-sumo binary is now included in the
version of the --version flag.

Signed-off-by: Justin Kolberg <[email protected]>
  • Loading branch information
amdprophet committed Nov 4, 2024
1 parent fb94e90 commit ee8de42
Show file tree
Hide file tree
Showing 40 changed files with 243 additions and 2,412 deletions.
1 change: 1 addition & 0 deletions .changelog/1693.changed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chore(ci): remove MSIs from this repo
53 changes: 0 additions & 53 deletions .github/workflows/dev_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,57 +451,6 @@ jobs:
REPO_URL=sumologic/sumologic-otel-collector-dev \
BUILD_TYPE_SUFFIX="-ubi"
package-msi:
name: Package MSI
runs-on: windows-2019
needs:
- build
strategy:
matrix:
include:
- arch_os: windows_amd64
platform: x64
fips: false
- arch_os: windows_amd64
platform: x64
fips: true
steps:
- uses: actions/checkout@v4

- name: Fetch current branch
run: ./ci/fetch_current_branch.sh

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Fetch binary artifact for ${{ matrix.arch_os }}
uses: actions/download-artifact@v4
with:
name: otelcol-sumo${{ matrix.fips && '-fips' || '' }}-${{ matrix.arch_os }}.exe
path: ./otelcolbuilder/cmd

- name: Rename fips binary artifact for ${{ matrix.arch_os }}
if: matrix.fips
working-directory: ./otelcolbuilder/cmd
run: mv otelcol-sumo-fips-${{ matrix.arch_os }}.exe otelcol-sumo-${{ matrix.arch_os }}.exe

- name: Set OVERRIDE_BUILD_NUMBER
run: echo "OVERRIDE_BUILD_VERSION=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV

- name: Set PRODUCT_VERSION
run: echo "PRODUCT_VERSION=$(./ci/get_version.sh productversion)" >> $GITHUB_ENV

- name: Build MSI for ${{ matrix.arch_os }}
working-directory: ./packaging/msi/wix
run: msbuild.exe -p:Configuration=Release -p:Platform=${{ matrix.platform }} -p:ProductVersion=$PRODUCT_VERSION -p:FIPSEnabled=${{ matrix.fips }} -Restore

- name: Store MSI as action artifact for ${{ matrix.arch_os }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arch_os }}${{ matrix.fips && '_fips' || '' }}_msi
path: ./packaging/msi/wix/bin/${{ matrix.platform }}/en-US/*.msi
if-no-files-found: error

install-script:
name: Store install script
runs-on: ubuntu-latest
Expand Down Expand Up @@ -530,10 +479,8 @@ jobs:
- build
- build-otelcol-config
- lint
- package-msi
- push-docker-manifest
uses: ./.github/workflows/workflow-trigger-packaging.yml
secrets: inherit
with:
workflow_id: ${{ github.run_id }}
create_release: false
26 changes: 1 addition & 25 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,30 +175,6 @@ jobs:
save-cache: true
boringcrypto: ${{ matrix.boringcrypto == true }}

test-wixext:
name: Test (SumoLogic.wixext)
runs-on: windows-2019
steps:
- uses: actions/checkout@v4

- name: Fetch current branch
run: ./ci/fetch_current_branch.sh

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Restore NuGet packages
working-directory: ./packaging/msi/SumoLogic.wixext/SumoLogicTests
run: nuget.exe restore -PackagesDirectory ../packages

- name: Build unit tests
working-directory: ./packaging/msi/SumoLogic.wixext/SumoLogicTests
run: msbuild.exe -p:Configuration=Release -p:Platform=AnyCPU -Restore

- name: Run unit tests
working-directory: ./packaging/msi/SumoLogic.wixext/SumoLogicTests/bin/Release
run: dotnet test -v:n ./SumoLogicTests.dll

lint:
name: Lint (golangci-lint)
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -404,4 +380,4 @@ jobs:
- name: Test built image
run: make test-built-image

# ToDo: build windows FIPS image
# TODO: build windows FIPS image
13 changes: 0 additions & 13 deletions .github/workflows/release-packaging.yml

This file was deleted.

Loading

0 comments on commit ee8de42

Please sign in to comment.