Skip to content

Commit

Permalink
test: Update version of NGINX Plus in Molecule tests (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessfg committed Nov 30, 2024
1 parent a1c4c02 commit 20c51c6
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches: [main]
tags-ignore: ["**"]
merge_group:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
Expand Down Expand Up @@ -38,6 +39,7 @@ jobs:
env:
NGINX_CRT: ${{ secrets.NGINX_CRT }}
NGINX_KEY: ${{ secrets.NGINX_KEY }}
NGINX_JWT: ${{ secrets.NGINX_JWT }}
strategy:
fail-fast: false
matrix:
Expand Down
28 changes: 22 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
# Any private crt and keys #
############################
########################
# Any crt/keys/license #
########################
*.crt
*.key
*~
\#*
*.jwt
!molecule.crt
!molecule.key
!rand.key

# OS Specific #
###############
##########################
# Backup/temporary files #
##########################
*~
\#*

##################
# MacOS specific #
##################
Thumbs.db
.DS_Store
.vscode

########################
# Code editor specific #
########################
.idea
.vscode

####################
# Ansible specific #
####################
.cache
*.retry

###################
# Python specific #
###################
__pycache__

########
# Logs #
########
*.log
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ TESTS:
- Update the platforms used in the various Molecule scenarios.
- Use the local role name (`ansible-role-nginx-config`) instead of the fully qualified role name (`nginxinc.nginx_config`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand.
- Update RHEL UBI images to UBI 9.4.
- Update Molecule NGINX Plus tests to work with R33 by introducing the new license JWT.

DOCUMENTATION:

Expand Down
8 changes: 8 additions & 0 deletions molecule/api_plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
force: false
mode: "0444"

- name: Create ephemeral license JWT file from b64 encoded env var
ansible.builtin.copy:
content: "{{ lookup('env', 'NGINX_JWT') }}"
dest: ../common/files/license/license.jwt
force: false
mode: "0444"

- name: Install NGINX Plus
hosts: all
tasks:
Expand All @@ -28,4 +35,5 @@
nginx_license:
certificate: ../common/files/license/nginx-repo.crt
key: ../common/files/license/nginx-repo.key
jwt: ../common/files/license/license.jwt
nginx_remove_license: false
2 changes: 1 addition & 1 deletion molecule/common/requirements/oss_requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
roles:
- name: nginxinc.nginx
version: 0.24.3
version: 0.25.0
8 changes: 4 additions & 4 deletions molecule/common/requirements/plus_requirements.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
roles:
- name: nginxinc.nginx
version: 0.24.3
- name: nginxinc.nginx_app_protect
src: https://github.com/nginxinc/ansible-role-nginx-app-protect
version: main
version: 0.25.0
# - name: nginxinc.nginx_app_protect
# src: https://github.com/nginxinc/ansible-role-nginx-app-protect
# version: main
8 changes: 8 additions & 0 deletions molecule/complete_plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
force: false
mode: "0444"

- name: Create ephemeral license JWT file from b64 encoded env var
ansible.builtin.copy:
content: "{{ lookup('env', 'NGINX_JWT') }}"
dest: ../common/files/license/license.jwt
force: false
mode: "0444"

- name: Install NGINX Plus
hosts: all
tasks:
Expand All @@ -28,6 +35,7 @@
nginx_license:
certificate: ../common/files/license/nginx-repo.crt
key: ../common/files/license/nginx-repo.key
jwt: ../common/files/license/license.jwt
nginx_remove_license: false

# - name: Install NGINX App Protect WAF
Expand Down

0 comments on commit 20c51c6

Please sign in to comment.