-
Notifications
You must be signed in to change notification settings - Fork 25
enh(stream-connectors-lib): package lua-sql-mysql for el8 and el9 #286
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
Merged
sdepassio
merged 8 commits into
develop
from
CTOR-1529-influxdb-add-lua-sql-mysql-for-el
Jul 3, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9f824ca
enh(stream-connectors-lib): package lua-sql-mysql for el8 and el9
sdepassio 82f05cb
fix yaml file path
sdepassio abc9eb0
fix file name
sdepassio 9b8327d
fix file path
sdepassio bdf360f
update
sdepassio ad94457
add the ability to upload the packages as artifacts
sdepassio 71460a8
fix
sdepassio 71dd71a
add missing dependency
sdepassio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 contains hidden or 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,111 @@ | ||
| name: lua-sql-mysql | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| paths: | ||
| - dependencies/lua-sql-mysql/** | ||
| push: | ||
| branches: | ||
| - develop | ||
| - master | ||
| paths: | ||
| - dependencies/lua-sql-mysql/** | ||
|
|
||
| jobs: | ||
| get-environment: | ||
| uses: ./.github/workflows/get-environment.yml | ||
|
|
||
| package: | ||
| needs: [get-environment] | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| distrib: [el8, el9] | ||
| include: | ||
| - image: packaging-stream-connectors-nfpm-alma8 | ||
| distrib: el8 | ||
| lua_version: 5.3 | ||
| - image: packaging-stream-connectors-nfpm-alma9 | ||
| distrib: el9 | ||
| lua_version: 5.4 | ||
|
|
||
| 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Checkout luasql sources | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| repository: "lunarmodules/luasql" | ||
| path: "lua-sql-src" | ||
| ref: "2.6.0" | ||
|
|
||
| - name: Prepare packaging of lua-sql-mysql | ||
| run: | | ||
| dnf install -y dnf-plugins-core | ||
| if [ "${{ matrix.distrib }}" == "el8" ]; then | ||
| dnf config-manager --set-enabled powertools | ||
| else | ||
| dnf config-manager --set-enabled crb | ||
| fi | ||
| dnf install -y make gcc lua lua-devel mysql mysql-devel | ||
| cd lua-sql-src | ||
| make mysql DRIVER_LIBS_mysql="-L/usr/lib64/mysql -lmysqlclient" DRIVER_INCS_mysql=-I/usr/include/mysql LUA_SYS_VER=${{ matrix.lua_version }} | ||
| cd .. | ||
|
|
||
| sed -i "s/@luaver@/${{ matrix.lua_version }}/g" dependencies/lua-sql-mysql/packaging/lua-sql-mysql.yaml | ||
| shell: bash | ||
|
|
||
| - name: Package | ||
| uses: ./.github/actions/package-nfpm | ||
| with: | ||
| nfpm_file_pattern: "dependencies/lua-sql-mysql/packaging/*.yaml" | ||
| distrib: ${{ matrix.distrib }} | ||
| package_extension: rpm | ||
| arch: amd64 | ||
| version: "2.6.0" | ||
| release: "1" | ||
| commit_hash: ${{ github.sha }} | ||
| cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-lua-sql-mysql-${{ 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 }} | ||
|
|
||
| deliver-rpm: | ||
| if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-environment.outputs.stability) }} | ||
| needs: [get-environment, package] | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| matrix: | ||
| distrib: [el8, el9] | ||
| name: deliver ${{ matrix.distrib }} | ||
|
|
||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Publish RPM packages | ||
| uses: ./.github/actions/rpm-delivery | ||
| with: | ||
| module_name: lua-sql-mysql | ||
| distrib: ${{ matrix.distrib }} | ||
| artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | ||
| cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-lua-sql-mysql-${{ matrix.distrib }} | ||
| stability: ${{ needs.get-environment.outputs.stability }} |
This file contains hidden or 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,34 @@ | ||
| name: "lua-sql-mysql" | ||
| arch: "${ARCH}" | ||
| platform: "linux" | ||
| version_schema: "none" | ||
| version: "${VERSION}" | ||
| release: "${RELEASE}${DIST}" | ||
| section: "default" | ||
| priority: "optional" | ||
| maintainer: "Centreon <contact@centreon.com>" | ||
| description: | | ||
| LuaSQL MySQL library | ||
| Commit: @COMMIT_HASH@ | ||
| vendor: "Centreon" | ||
| homepage: "https://www.centreon.com" | ||
| license: "Apache-2.0" | ||
|
|
||
| contents: | ||
| - src: "../../../lua-sql-src/src/mysql.so" | ||
| dst: "/usr/lib64/lua/@luaver@/luasql/mysql.so" | ||
| file_info: | ||
| mode: 0644 | ||
| packager: rpm | ||
|
|
||
| overrides: | ||
| rpm: | ||
| depends: | ||
| - lua | ||
| - mysql-libs | ||
|
|
||
| rpm: | ||
| summary: LuaSQL MySQL | ||
| signature: | ||
| key_file: ${RPM_SIGNING_KEY_FILE} | ||
| key_id: ${RPM_SIGNING_KEY_ID} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.