Skip to content

Commit

Permalink
NR-144355: install gpg for debian instances
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed Aug 21, 2023
1 parent 1585471 commit d7d32e2
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 67 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/component_prerelease_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ jobs:
role-to-assume: ${{ env.AWS_ASSUME_ROLE }}
aws-region: us-east-2

- name: Set branch name
run: |
# Short name for current branch. For PRs, use target branch (base ref)
GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
# Is the ref a tag? If so, remove refs/tags/ prefix
GIT_BRANCH=${GIT_BRANCH#refs/tags/}
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
- name: Launch harvest tests
uses: newrelic/fargate-runner-action@main
with:
Expand Down Expand Up @@ -111,6 +119,14 @@ jobs:
role-to-assume: ${{ env.AWS_ASSUME_ROLE }}
aws-region: us-east-2

- name: Set branch name
run: |
# Short name for current branch. For PRs, use target branch (base ref)
GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
# Is the ref a tag? If so, remove refs/tags/ prefix
GIT_BRANCH=${GIT_BRANCH#refs/tags/}
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
- name: Launch packaging tests
uses: newrelic/fargate-runner-action@main
with:
Expand All @@ -137,6 +153,14 @@ jobs:
role-to-assume: ${{ env.AWS_ASSUME_ROLE }}
aws-region: us-east-2

- name: Set branch name
run: |
# Short name for current branch. For PRs, use target branch (base ref)
GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
# Is the ref a tag? If so, remove refs/tags/ prefix
GIT_BRANCH=${GIT_BRANCH#refs/tags/}
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
- name: Launch packaging tests
uses: newrelic/fargate-runner-action@main
with:
Expand Down
4 changes: 3 additions & 1 deletion test/automated/ansible/roles/install-gpg/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ instances_without_gpg:
- "amd64:debian-buster"
- "arm64:debian-buster"
- "amd64:debian-bullseye"
- "arm64:debian-bullseye"
- "arm64:debian-bullseye"
- "amd64:debian-bookworm"
- "arm64:debian-bookworm"
61 changes: 0 additions & 61 deletions test/packaging/ansible/agent-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,66 +11,5 @@
name: cleanup

tasks:
- name: agent upgrade tests suite
vars:
env_vars:

block:

- name: repo setup
include_role:
name: repo-setup

- name: setup config
include_role:
name: setup-config

- name: pick right agent version for amd64
set_fact:
target_agent_version_1: "1.46.0"
when: inventory_hostname is search("amd64")

- name: pick right agent version for arm64
set_fact:
target_agent_version_1: "1.46.0"
when: inventory_hostname is search("arm64")

- name: install initial version
include_role:
name: package-install-pinned
vars:
target_agent_version: "{{ target_agent_version_1 }}"

- name: assert service is running
include_role:
name: assert-service

- name: get initial agent PID
command: pgrep -f newrelic-infra-service
register: agent_pid

- name: upgrade agent
include_role:
name: agent-upgrade
vars:
# this used only for check that latest is grater than given
target_agent_version: "1.46.0"

- name: assert service countinues running after upgrade
include_role:
name: assert-service

- name: get agent PID after upgrade
command: pgrep -f newrelic-infra-service
register: updated_agent_pid

- name: assert agent has been reloaded
assert:
that: agent_pid.stdout != updated_agent_pid.stdout

always:
- name: Final cleanup # Only required for shared infra.
include_role:
name: cleanup

...
2 changes: 1 addition & 1 deletion test/packaging/ansible/installation-pinned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- name: Installation tests suite
vars:
env_vars:
target_agent_version: "1.46.0" # minimum version for sles 15.5
target_agent_version: "0.0.0" # minimum version for sles 15.5

block:

Expand Down
8 changes: 4 additions & 4 deletions test/packaging/ansible/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
- name: unprivileged mode agent installation
import_playbook: installation-unprivileged.yml

- name: agent installation via newrelic-cli
import_playbook: installation-newrelic-cli.yml
# - name: agent installation via newrelic-cli
# import_playbook: installation-newrelic-cli.yml

- name: installation windows
import_playbook: installation-windows.yml

- name: log forwarder
import_playbook: log-forwarder.yml
# - name: log forwarder
# import_playbook: log-forwarder.yml

# - name: agent upgrade
# import_playbook: agent-upgrade.yml
Expand Down

0 comments on commit d7d32e2

Please sign in to comment.