Skip to content

Commit

Permalink
ci: update pinned, upgrade test and canaries (#2019)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajrohanyadav authored Feb 24, 2025
1 parent da069a4 commit 9d0968d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 0 additions & 2 deletions test/canaries/deploy_canaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
fips_enabled: "{{ '-fips' in inventory_hostname }}"

- name: install previous agent in container
# Remove the "when" condition after second release https://new-relic.atlassian.net/browse/NR-355851
when: "'-fips' not in inventory_hostname"
ansible.builtin.include_role:
name: caos.ansible_roles.infra_agent
vars:
Expand Down
8 changes: 5 additions & 3 deletions test/packaging/ansible/agent-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
name: caos.ansible_roles.infra_agent
vars:
uninstall: true
fips_enabled: "{{ '-fips' in inventory_hostname }}"

tasks:
- name: agent upgrade tests suite
# TODO: https://new-relic.atlassian.net/browse/NR-355851 Update when two releases with FIPS are done
# Also add FIPS tests
vars:
target_agent_version: "1.57.1"
target_agent_version: "1.60.0"

block:

Expand All @@ -27,6 +26,7 @@
vars:
target_version: "{{ target_agent_version }}"
repo_endpoint: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent"
fips_enabled: "{{ '-fips' in inventory_hostname }}"

- name: Assert version
include_role:
Expand All @@ -45,6 +45,7 @@
name: caos.ansible_roles.infra_agent
vars:
install_only_if_present: "yes"
fips_enabled: "{{ '-fips' in inventory_hostname }}"

- name: assert service countinues running after upgrade
include_role:
Expand Down Expand Up @@ -75,4 +76,5 @@
name: caos.ansible_roles.infra_agent
vars:
uninstall: true
fips_enabled: "{{ '-fips' in inventory_hostname }}"
...
5 changes: 3 additions & 2 deletions test/packaging/ansible/installation-pinned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
- name: Installation tests suite
vars:
target_agent_version: "1.57.1" # minimum version for ubuntu sles 15.6
target_agent_version_fips: "1.60.0" # minimum version for FIPS

block:
- name: Install agent
ansible.builtin.include_role:
name: caos.ansible_roles.infra_agent
vars:
target_version: "{{ target_agent_version }}"
target_version: "{{ target_agent_version_fips if ('-fips' in inventory_hostname) else target_agent_version }}"
repo_endpoint: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent"
fips_enabled: "{{ '-fips' in inventory_hostname }}"

Expand All @@ -32,7 +33,7 @@
vars:
target_versions:
- exec: "/usr/bin/newrelic-infra --version"
version: "{{ target_agent_version }}"
version: "{{ target_agent_version_fips if ('-fips' in inventory_hostname) else target_agent_version }}"


...
2 changes: 0 additions & 2 deletions test/packaging/ansible/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

- name: Pinned version agent installation
import_playbook: installation-pinned.yml
when: "'-fips' not in inventory_hostname" # TODO: https://new-relic.atlassian.net/browse/NR-355845

- name: Agent installation as root
import_playbook: installation-root.yml
Expand All @@ -26,7 +25,6 @@

- name: Agent upgrade
import_playbook: agent-upgrade.yml
when: "'-fips' not in inventory_hostname" # TODO: https://new-relic.atlassian.net/browse/NR-355851

- name: Shutdown , terminate and HNR alerts
import_playbook: shutdown-and-terminate.yml
Expand Down

0 comments on commit 9d0968d

Please # to comment.