-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch jenkins-remoting-runner from GoReleaser to nFPM.
- Loading branch information
Showing
4 changed files
with
127 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
# This workflow uses actions that are not certified by GitHub. They are provided | ||
# by a third-party and are governed by separate terms of service, privacy | ||
# policy, and support documentation. | ||
|
||
name: "🎯 Step: Build and cache (nFPM)" | ||
on: | ||
workflow_call: | ||
inputs: | ||
package-name: | ||
required: true | ||
type: string | ||
package-version: | ||
required: true | ||
type: string | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-build-and-cache-nfpm | ||
cancel-in-progress: true | ||
|
||
# Variables available to all jobs defined in this file | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
REGISTRY: ${{ vars.REGISTRY }} | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
name: "📦 Build and cache (nFPM)" | ||
strategy: | ||
fail-fast: false | ||
|
||
container: | ||
image: ghcr.io/northwood-labs/package-builder/ubuntu-v22.04:latest | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
options: --privileged | ||
|
||
steps: | ||
- name: Git clone | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
with: | ||
ref: ${{ github.base_ref }} | ||
|
||
- name: "📦 Build the package (nFPM)" | ||
working-directory: packages/${{ inputs.package-name }} | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
GPG_KEY_B64: ${{ secrets.GPG_KEY_B64 }} | ||
NFPM_PASSPHRASE: "${{ secrets.GPG_PWD }}" | ||
PKG_VER: "${{ inputs.package-version }}" | ||
RSA_KEY_B64: ${{ secrets.RSA_KEY_B64 }} | ||
run: | | ||
# Decode the contents into files. | ||
echo -n "${GPG_KEY_B64}" | base64 --decode > 3C7658F0.asc | ||
echo -n "${RSA_KEY_B64}" | base64 --decode > signing.pem | ||
# Build the package | ||
mkdir -p ./dist | ||
nfpm package --packager apk --target ./dist | ||
nfpm package --packager deb --target ./dist | ||
nfpm package --packager rpm --target ./dist | ||
- name: Cache the packages | ||
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | ||
id: cache-packages | ||
with: | ||
key: "${{ inputs.package-name }}-${{ inputs.package-version }}" | ||
path: packages/${{ inputs.package-name }}/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: jenkins-remoting-runner | ||
arch: all | ||
platform: linux | ||
version: ${PKG_VER} | ||
version_schema: none | ||
version_metadata: git | ||
release: 1 | ||
section: default | ||
maintainer: Northwood Labs <[email protected]> | ||
description: |- | ||
Jenkins Remoting is primarily used in communications between the Jenkins | ||
controller and Jenkins agents. | ||
vendor: jenkins-remoting-runner authors | ||
homepage: https://www.jenkins.io/projects/remoting/ | ||
license: MIT | ||
disable_globbing: false | ||
provides: | ||
- jenkins-remoting-runner | ||
suggests: | ||
- java-1.8.0-amazon-corretto | ||
- java-11-amazon-corretto | ||
- java-17-amazon-corretto | ||
- java-21-amazon-corretto | ||
- openjdk8 | ||
- openjdk11 | ||
- openjdk17 | ||
- openjdk21 | ||
contents: | ||
- src: /opt/jenkins/jenkins-remoting-runner.jar | ||
dst: /opt/jenkins/jenkins-remoting-runner.jar | ||
- src: /usr/local/bin/jenkins-remoting-runner | ||
dst: /usr/local/bin/jenkins-remoting-runner | ||
file_info: | ||
mode: 0755 | ||
umask: 0o002 | ||
scripts: | ||
postinstall: postinstall.sh | ||
rpm: | ||
summary: "{{ .Var.Description }}" | ||
packager: Northwood Labs <[email protected]> | ||
compression: lzma | ||
signature: | ||
key_file: 3C7658F0.asc | ||
deb: | ||
signature: | ||
key_file: 3C7658F0.asc | ||
type: archive | ||
apk: | ||
signature: | ||
key_file: signing.pem | ||
key_name: "[email protected]" |