Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux package proof of concept #1

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Linux package proof of concept #1

wants to merge 2 commits into from

Conversation

jsirianni
Copy link
Owner

@jsirianni jsirianni commented Dec 21, 2023

Uses Goreleaser to build deb and rpm packages. Includes some specific configuration for special needs that I have, but can be used as a reference for anyone who wants to build Linux packages.

You can give it a try with:

goreleaser release --skip=publish --skip=validate --clean
dist
├── artifacts.json
├── CHANGELOG.md
├── config.yaml
├── metadata.json
├── prometheus-0.48.0.linux-amd64.tar.gz
├── prometheus-0.48.0.linux-arm64.tar.gz
├── prometheus_linux_amd64.deb
├── prometheus_linux_amd64.rpm
├── prometheus_linux_amd64_v1
│   └── prometheus
├── prometheus_linux_arm64
│   └── prometheus
├── prometheus_linux_arm64.deb
├── prometheus_linux_arm64.rpm
├── prometheus-v0.48.0-SHA256SUMS
├── promtool_linux_amd64_v1
│   └── promtool
└── promtool_linux_arm64
    └── promtool

Long term I would probably use Goreleaser to assemble the package using binaries built from the upstream Prometheus release, instead of building them here. Or wait until the Prometheus team implements linux packages.

* wip: ci

* set workflow permissions

* fix concurrency

* fix flags

* include npm license and fix tests

* run install test

* purge package
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 5: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Go
uses: actions/setup-go@v5.0.0

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 5: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
with:
go-version: "1.21.5"

- uses: actions/setup-node@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 5: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue

- name: Install Cinc (Inspec)
run: |
curl -L https://omnitruck.cinc.sh/install.sh | \

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 5: downloadThenRun not pinned by hash
Click Remediation section below to solve this issue
node-version: "20"

- name: Test GoReleaser
uses: goreleaser/goreleaser-action@v5

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 5: third-party GitHubAction not pinned by hash
Click Remediation section below to solve this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant