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

Add exec_name to allow executing a binary with a different name as the package #30

Merged
merged 2 commits into from
Jan 9, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
with:
repo_base_url: 'https://download.newrelic.com/infrastructure_agent'
package_name: 'newrelic-infra'
package_version: '1.52.3'
package_version: '1.57.1'
gpg_key: 'https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg'
platforms: "al2,al2023,centos7,centos8,debian-bullseye,debian-buster,redhat8,redhat9,suse15.2,suse15.3,suse15.4,suse15.5,suse15.6,ubuntu1604,ubuntu1804,ubuntu2004,ubuntu2204,ubuntu2404"
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
platforms:
description: 'comma separated list of platforms with version we want to run test for'
required: true
exec_name:
description: 'name of the binary that should be executed after installation'
required: false
default: ''

runs:
using: "composite"
Expand All @@ -34,6 +38,7 @@ runs:
PACKAGE_NAME: ${{ inputs.package_name }}
PACKAGE_VERSION: ${{ inputs.package_version }}
GPG_KEY: ${{ inputs.gpg_key }}
EXEC_NAME: ${{ inputs.exec_name != '' && inputs.exec_name || inputs.package_name }}
run: "cd ${GITHUB_ACTION_PATH} && molecule converge"
- name: Teardown
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package_version: "{{ lookup('env', 'PACKAGE_VERSION') }}"
package_name: "{{ lookup('env', 'PACKAGE_NAME') }}"
gpg_key: "{{ lookup('env', 'GPG_KEY') }}"
exec_name: "{{ lookup('env', 'EXEC_NAME') }}"

block:
- name: Repo setup
Expand All @@ -26,6 +27,6 @@
name: caos.ansible_roles.assert_version
vars:
target_versions:
- exec: "{{ package_name }} --version"
- exec: "{{ exec_name }} --version"
version: "{{ package_version }}"

Loading