Skip to content

Commit

Permalink
Add exec_name to allow executing a binary with a different name as th…
Browse files Browse the repository at this point in the history
…e package (#30)

* Add exec_name to allow executing a binary with a different name as the package
* Modify version for self test
  • Loading branch information
alvarocabanas authored Jan 9, 2025
1 parent 03ee6e2 commit d48e720
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
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 }}"

0 comments on commit d48e720

Please sign in to comment.