Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
202 changes: 202 additions & 0 deletions .github/workflows/lua-base64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
name: lua-base64

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/lua-base64.yml'
- '../../dependencies/lua-base64/**'
Comment thread
sdepassio marked this conversation as resolved.
Outdated
push:
branches:
- develop
- master
paths:
- '.github/workflows/lua-base64.yml'
- '../../dependencies/lua-base64/**'
Comment thread
sdepassio marked this conversation as resolved.
Outdated

jobs:
dependency-scan:
uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main

get-environment:
needs: [dependency-scan]
uses: ./.github/workflows/get-environment.yml

package:
needs: [get-environment]

strategy:
fail-fast: false
matrix:
distrib: [el8, el9, el10, bullseye, bookworm, trixie, jammy, noble]
include:
- package_extension: rpm
image: packaging-stream-connectors-nfpm-alma8
distrib: el8
- package_extension: rpm
image: packaging-stream-connectors-nfpm-alma9
distrib: el9
- package_extension: rpm
image: packaging-stream-connectors-nfpm-alma10
distrib: el10
- package_extension: deb
image: packaging-stream-connectors-nfpm-bullseye
distrib: bullseye
- package_extension: deb
image: packaging-stream-connectors-nfpm-bookworm
distrib: bookworm
- package_extension: deb
image: packaging-stream-connectors-nfpm-trixie
distrib: trixie
- package_extension: deb
image: packaging-stream-connectors-nfpm-jammy
distrib: jammy
- package_extension: deb
image: packaging-stream-connectors-nfpm-noble
distrib: noble

runs-on: ubuntu-24.04

container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
credentials:
username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}

name: package ${{ matrix.distrib }}

steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Checkout base64 sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: "iskolbin/lbase64"
path: "base64-src"
ref: "v1.5.3"
Comment thread
sdepassio marked this conversation as resolved.
Outdated

- name: Prepare packaging of lua-base64
run: |
mkdir -p dependencies/lua-base64/lbase64
cp base64-src/base64.lua dependencies/lua-base64/lbase64/base64.lua
shell: bash

- name: Package
uses: ./.github/actions/package-nfpm
with:
nfpm_file_pattern: "dependencies/lua-base64/packaging/*.yaml"
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: all
version: "1.5"
release: "3"
Comment thread
sdepassio marked this conversation as resolved.
Outdated
commit_hash: ${{ github.sha }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-lua-base64-${{ matrix.distrib }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-environment.outputs.stability }}
artifact_name: "package-lua-base64-${{ matrix.distrib }}"

test-packages:
needs: [get-environment, package]
strategy:
fail-fast: false
matrix:
include:
- package_extension: rpm
image: almalinux:8
distrib: el8
- package_extension: rpm
image: almalinux:9
distrib: el9
- package_extension: rpm
image: almalinux:10
distrib: el10
- package_extension: deb
image: debian:bullseye
distrib: bullseye
- package_extension: deb
image: debian:bookworm
distrib: bookworm
- package_extension: deb
image: debian:trixie
distrib: trixie
- package_extension: deb
image: ubuntu:jammy
distrib: jammy
- package_extension: deb
image: ubuntu:noble
distrib: noble

runs-on: ubuntu-24.04
container:
image: ${{ matrix.image }}

name: Test lua packages on ${{ matrix.package_extension }} ${{ matrix.distrib }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Test packaged libs
uses: ./.github/actions/test-packages
with:
package_extension: ${{ matrix.package_extension }}
distrib: ${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-lua-base64-${{ matrix.distrib }}
test_type: dependency

- name: Upload error log
if: failure()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: install_error_log_${{ matrix.distrib }}
path: install_error_${{ matrix.distrib }}.log

deliver-rpm:
if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-environment.outputs.stability) }}
needs: [get-environment, package, test-packages]
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [el8, el9, el10]
name: deliver ${{ matrix.distrib }}

steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Publish RPM packages
uses: ./.github/actions/rpm-delivery
with:
module_name: lua-base64
distrib: ${{ matrix.distrib }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-lua-base64-${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}

deliver-deb:
if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-environment.outputs.stability) }}
needs: [get-environment, package, test-packages]
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [bullseye, bookworm, trixie, jammy, noble]
name: deliver ${{ matrix.distrib }}

steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Publish DEB packages
uses: ./.github/actions/deb-delivery
with:
module_name: lua-tz
Comment thread
sdepassio marked this conversation as resolved.
Outdated
distrib: ${{ matrix.distrib }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-lua-base64-${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}
Loading
Loading