Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 51 additions & 48 deletions .github/workflows/manual_msi_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
default: "v0.0.1"

jobs:
build-64bit-msi:
build-msi:
runs-on: windows-2022
steps:
- name: Checkout Sources
Expand All @@ -17,31 +17,24 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser-pro
version: "v2.12.5"
args: release --single-target --skip=validate,publish --clean --config=.goreleaser-windows.yml
- name: Prepare Release Dependencies
run: make release-prep CURR_VERSION=${VERSION#v}
shell: bash
env:
GORELEASER_CURRENT_TAG: ${{ github.event.inputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- name: Copy Windows Collector Binary
run: cp dist/windows_amd64/collector_windows_amd64_v1/observiq-otel-collector.exe windows/observiq-otel-collector.exe
- name: Copy Windows Updater Binary
run: cp dist/windows_amd64/updater_windows_amd64_v1/updater.exe windows/updater.exe
- name: Copy Plugins to MSI Build Directory
run: cp -r release_deps/plugins windows/
- name: Copy Example Config
run: cp config/example.yaml windows/config.yaml
- name: Copy Logging Config
run: cp config/logging.yaml windows/logging.yaml
- name: Copy LICENSE
run: cp LICENSE windows/LICENSE
- name: Copy VERSION file
run: cp release_deps/VERSION.txt windows/VERSION.txt
VERSION: ${{ github.event.inputs.version }}
- name: Build Windows Binaries
run: make build-windows
- name: Copy Shared Files to MSI Build Directory
run: |
cp -r release_deps/plugins windows/
cp config/example.yaml windows/config.yaml
cp config/logging.yaml windows/logging.yaml
cp LICENSE windows/LICENSE
cp release_deps/VERSION.txt windows/VERSION.txt
- name: Copy AMD64 Binaries
run: |
cp dist/collector_windows_amd64.exe windows/observiq-otel-collector.exe
cp dist/updater_windows_amd64.exe windows/updater.exe
# HACK: Copy build directory to C drive to avoid this error, since there must be a relative path from the tempdir that go-msi uses
# for the MSI to build properly
- name: Copy Build Dir
Expand All @@ -52,42 +45,52 @@ jobs:
- name: Install Build Tools
run: |
curl -f -L -o go-msi.exe https://github.com/observIQ/go-msi/releases/download/v2.2.0/go-msi.exe
curl -f -L -o wix310-binaries.zip https://github.com/wixtoolset/wix3/releases/download/wix3104rtm/wix310-binaries.zip
unzip wix310-binaries.zip
curl -f -L -o wix314-binaries.zip https://github.com/wixtoolset/wix3/releases/download/wix314rtm/wix314-binaries.zip
unzip wix314-binaries.zip
working-directory: C:/build
- name: Build AMD64 MSI
run: go-msi.exe make -m observiq-otel-collector-amd64.msi --version ${{ github.event.inputs.version }} --arch x64
working-directory: C:/build
- name: "Build MSI from Tagged Release"
run: go-msi.exe make -m observiq-otel-collector.msi --version ${{ github.event.inputs.version }} --arch amd64
- name: Copy ARM64 Binaries to Build Dir
run: |
cp dist/collector_windows_arm64.exe C:/build/observiq-otel-collector.exe
cp dist/updater_windows_arm64.exe C:/build/updater.exe
- name: Build ARM64 MSI
run: go-msi.exe make -m observiq-otel-collector-arm64.msi --version ${{ github.event.inputs.version }} --arch arm64
working-directory: C:/build
- name: Install DigiCert Client tools from Github Custom Actions marketplace
uses: digicert/ssm-code-signing@v1.0.0
- name: Set up certificate
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
- name: Set up certificate
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
shell: bash
- name: Set variables for signing
id: variables
run: |
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
id: variables
run: |
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
shell: bash
- name: Signing using keypair alias
- name: Sign AMD64 MSI
run: |
smctl sign --keypair-alias ${{ secrets.BDOT_DIGICERT_KEYPAIR_ALIAS }} --input C:/build/observiq-otel-collector.msi --config-file C:\Users\RUNNER~1\AppData\Local\Temp\smtools-windows-x64\pkcs11properties.cfg
smctl sign --keypair-alias ${{ secrets.BDOT_DIGICERT_KEYPAIR_ALIAS }} --input C:/build/observiq-otel-collector-amd64.msi --config-file C:\Users\RUNNER~1\AppData\Local\Temp\smtools-windows-x64\pkcs11properties.cfg
shell: cmd
- name: "Upload MSI"
- name: Sign ARM64 MSI
run: |
smctl sign --keypair-alias ${{ secrets.BDOT_DIGICERT_KEYPAIR_ALIAS }} --input C:/build/observiq-otel-collector-arm64.msi --config-file C:\Users\RUNNER~1\AppData\Local\Temp\smtools-windows-x64\pkcs11properties.cfg
shell: cmd
- name: "Upload AMD64 MSI"
uses: actions/upload-artifact@v4
with:
name: observiq-otel-collector.msi
path: C:/build/observiq-otel-collector.msi
name: observiq-otel-collector-amd64.msi
path: C:/build/observiq-otel-collector-amd64.msi
# Short lived because this is meant as an action for developers
retention-days: 1
- name: "Upload ZIP Archive"
- name: "Upload ARM64 MSI"
uses: actions/upload-artifact@v4
with:
name: windows-archive
path: dist/windows_amd64/*.zip
# Short lived because this is meant as an action for developers
name: observiq-otel-collector-arm64.msi
path: C:/build/observiq-otel-collector-arm64.msi
retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/manual_multi_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ jobs:
- name: Scan Third Party Dependency Licenses
run: |
go install github.com/uw-labs/lichen@v0.1.7
lichen --config=./license.yaml dist/collector_windows_amd64.exe dist/updater_windows_amd64.exe
lichen --config=./license.yaml dist/collector_windows_amd64.exe dist/updater_windows_amd64.exe dist/collector_windows_arm64.exe dist/updater_windows_arm64.exe
144 changes: 69 additions & 75 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
default: "v0.0.1"

jobs:
build-64bit-msi:
build-msi:
runs-on: windows-2022
steps:
- name: Checkout Sources
Expand All @@ -17,31 +17,24 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser-pro
version: "v2.12.5"
args: release --single-target --skip=validate,publish --clean --config=.goreleaser-windows.yml
- name: Prepare Release Dependencies
run: make release-prep CURR_VERSION=${VERSION#v}
shell: bash
env:
GORELEASER_CURRENT_TAG: ${{ github.event.inputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- name: Copy Windows Collector Binary
run: cp dist/windows_amd64/collector_windows_amd64_v1/observiq-otel-collector.exe windows/observiq-otel-collector.exe
- name: Copy Windows Updater Binary
run: cp dist/windows_amd64/updater_windows_amd64_v1/updater.exe windows/updater.exe
- name: Copy Plugins to MSI Build Directory
run: cp -r release_deps/plugins windows/
- name: Copy Example Config
run: cp config/example.yaml windows/config.yaml
- name: Copy Logging Config
run: cp config/logging.yaml windows/logging.yaml
- name: Copy LICENSE
run: cp LICENSE windows/LICENSE
- name: Copy VERSION file
run: cp release_deps/VERSION.txt windows/VERSION.txt
VERSION: ${{ github.event.inputs.version }}
- name: Build Windows Binaries
run: make build-windows
- name: Copy Shared Files to MSI Build Directory
run: |
cp -r release_deps/plugins windows/
cp config/example.yaml windows/config.yaml
cp config/logging.yaml windows/logging.yaml
cp LICENSE windows/LICENSE
cp release_deps/VERSION.txt windows/VERSION.txt
- name: Copy AMD64 Binaries
run: |
cp dist/collector_windows_amd64.exe windows/observiq-otel-collector.exe
cp dist/updater_windows_amd64.exe windows/updater.exe
# HACK: Copy build directory to C drive to avoid this error, since there must be a relative path from the tempdir that go-msi uses
# for the MSI to build properly
- name: Copy Build Dir
Expand All @@ -52,51 +45,58 @@ jobs:
- name: Install Build Tools
run: |
curl -f -L -o go-msi.exe https://github.com/observIQ/go-msi/releases/download/v2.2.0/go-msi.exe
curl -f -L -o wix310-binaries.zip https://github.com/wixtoolset/wix3/releases/download/wix3104rtm/wix310-binaries.zip
unzip wix310-binaries.zip
curl -f -L -o wix314-binaries.zip https://github.com/wixtoolset/wix3/releases/download/wix314rtm/wix314-binaries.zip
unzip wix314-binaries.zip
working-directory: C:/build
- name: "Build MSI from Tagged Release"
run: go-msi.exe make -m observiq-otel-collector.msi --version ${{ github.event.inputs.version }} --arch amd64
- name: Build AMD64 MSI
run: go-msi.exe make -m observiq-otel-collector-amd64.msi --version ${{ github.event.inputs.version }} --arch x64
working-directory: C:/build
- name: Copy ARM64 Binaries to Build Dir
run: |
cp dist/collector_windows_arm64.exe C:/build/observiq-otel-collector.exe
cp dist/updater_windows_arm64.exe C:/build/updater.exe
- name: Build ARM64 MSI
run: go-msi.exe make -m observiq-otel-collector-arm64.msi --version ${{ github.event.inputs.version }} --arch arm64
working-directory: C:/build
- name: Install DigiCert Client tools from Github Custom Actions marketplace
uses: digicert/ssm-code-signing@v1.0.0
- name: Set up certificate
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
- name: Set up certificate
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
shell: bash
- name: Set variables for signing
id: variables
run: |
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
id: variables
run: |
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
shell: bash
- name: Signing using keypair alias
- name: Sign AMD64 MSI
run: |
smctl sign --keypair-alias ${{ secrets.BDOT_DIGICERT_KEYPAIR_ALIAS }} --input C:/build/observiq-otel-collector-amd64.msi --config-file C:\Users\RUNNER~1\AppData\Local\Temp\smtools-windows-x64\pkcs11properties.cfg
shell: cmd
- name: Sign ARM64 MSI
run: |
smctl sign --keypair-alias ${{ secrets.BDOT_DIGICERT_KEYPAIR_ALIAS }} --input C:/build/observiq-otel-collector.msi --config-file C:\Users\RUNNER~1\AppData\Local\Temp\smtools-windows-x64\pkcs11properties.cfg
smctl sign --keypair-alias ${{ secrets.BDOT_DIGICERT_KEYPAIR_ALIAS }} --input C:/build/observiq-otel-collector-arm64.msi --config-file C:\Users\RUNNER~1\AppData\Local\Temp\smtools-windows-x64\pkcs11properties.cfg
shell: cmd
- name: "Upload MSI"
- name: "Upload AMD64 MSI"
uses: actions/upload-artifact@v4
with:
name: observiq-otel-collector.msi
path: C:/build/observiq-otel-collector.msi
# Short lived because this is meant as an action for developers
name: observiq-otel-collector-amd64.msi
path: C:/build/observiq-otel-collector-amd64.msi
retention-days: 1
- name: "DEBUG: List dist/"
run: tree /F dist/
- name: "Upload Windows ZIP Archive"
- name: "Upload ARM64 MSI"
uses: actions/upload-artifact@v4
with:
name: windows-archive
path: dist/**/*.zip
# Short lived because this is meant as an action for developers
name: observiq-otel-collector-arm64.msi
path: C:/build/observiq-otel-collector-arm64.msi
retention-days: 1

release-test:
runs-on: namespace-profile-bindplane-default-ubuntu-24-04-32x128
needs: [build-64bit-msi]
needs: [build-msi]
steps:
- name: Checkout Repo
uses: namespacelabs/nscloud-checkout-action@v7
Expand All @@ -119,28 +119,16 @@ jobs:

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Retrieve Windows 64-bit MSI Installer

- name: Retrieve Windows AMD64 MSI Installer
uses: actions/download-artifact@v4
with:
name: observiq-otel-collector.msi
path: observiq-otel-collector.msi
name: observiq-otel-collector-amd64.msi

- name: Retrieve Windows 64-bit ZIP Archive
- name: Retrieve Windows ARM64 MSI Installer
uses: actions/download-artifact@v4
with:
name: windows-archive
path: windows-archive

- name: "DEBUG: Install tree"
run: |
sudo apt-get update
sudo apt-get install -y tree

- name: "DEBUG: List Windows 64-bit ZIP Archive"
run: |
tree windows-archive
du -sh windows-archive
name: observiq-otel-collector-arm64.msi

- name: Install cosign
run: go install github.com/sigstore/cosign/cmd/cosign@v1.13.1
Expand All @@ -150,8 +138,14 @@ jobs:
env:
COSIGN_PRIVATE_KEY: ${{secrets.ORG_COSIGN_PRIVATE_KEY}}

- name: Sign MSI
run: cosign sign-blob --key=cosign.key --output-signature ./observiq-otel-collector.msi/observiq-otel-collector.msi.sig ./observiq-otel-collector.msi/observiq-otel-collector.msi
- name: Sign AMD64 MSI
run: cosign sign-blob --key=cosign.key --output-signature ./observiq-otel-collector-amd64.msi.sig ./observiq-otel-collector-amd64.msi
shell: bash
env:
COSIGN_PASSWORD: ${{ secrets.ORG_COSIGN_PWD }}

- name: Sign ARM64 MSI
run: cosign sign-blob --key=cosign.key --output-signature ./observiq-otel-collector-arm64.msi.sig ./observiq-otel-collector-arm64.msi
shell: bash
env:
COSIGN_PASSWORD: ${{ secrets.ORG_COSIGN_PWD }}
Expand Down Expand Up @@ -185,17 +179,17 @@ jobs:

- name: Debug list dist/
run: |
tree dist/
du -sh dist/
ls -laR dist/

- name: Create artifact archive
run: |
mkdir artifacts
cp ./scripts/install/*.sh ./artifacts
cp ./release_deps/gpg-keys.tar.gz ./artifacts/gpg-keys.tar.gz
cp ./observiq-otel-collector.msi/observiq-otel-collector.msi ./artifacts
cp ./observiq-otel-collector-amd64.msi ./artifacts
cp ./observiq-otel-collector-arm64.msi ./artifacts
cp ./dist/*tar.gz ./artifacts
cp ./windows-archive/windows_amd64/*.zip ./artifacts
cp ./dist/*.zip ./artifacts
cp ./dist/*.rpm ./artifacts
cp ./dist/*.deb ./artifacts
cp ./dist/*SHA256SUMS ./artifacts
Expand Down
Loading