Skip to content

Commit 20c51c6

Browse files
committed
test: Update version of NGINX Plus in Molecule tests (#503)
1 parent a1c4c02 commit 20c51c6

File tree

7 files changed

+46
-11
lines changed

7 files changed

+46
-11
lines changed

.github/workflows/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
branches: [main]
88
tags-ignore: ["**"]
9+
merge_group:
910
schedule:
1011
- cron: "0 0 1 * *"
1112
workflow_dispatch:
@@ -38,6 +39,7 @@ jobs:
3839
env:
3940
NGINX_CRT: ${{ secrets.NGINX_CRT }}
4041
NGINX_KEY: ${{ secrets.NGINX_KEY }}
42+
NGINX_JWT: ${{ secrets.NGINX_JWT }}
4143
strategy:
4244
fail-fast: false
4345
matrix:

.gitignore

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
1-
# Any private crt and keys #
2-
############################
1+
########################
2+
# Any crt/keys/license #
3+
########################
34
*.crt
45
*.key
5-
*~
6-
\#*
6+
*.jwt
77
!molecule.crt
88
!molecule.key
99
!rand.key
1010

11-
# OS Specific #
12-
###############
11+
##########################
12+
# Backup/temporary files #
13+
##########################
14+
*~
15+
\#*
16+
17+
##################
18+
# MacOS specific #
19+
##################
1320
Thumbs.db
1421
.DS_Store
1522
.vscode
1623

24+
########################
25+
# Code editor specific #
26+
########################
27+
.idea
28+
.vscode
29+
30+
####################
1731
# Ansible specific #
1832
####################
1933
.cache
2034
*.retry
2135

36+
###################
2237
# Python specific #
2338
###################
2439
__pycache__
2540

41+
########
2642
# Logs #
2743
########
2844
*.log

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ TESTS:
2020
- Update the platforms used in the various Molecule scenarios.
2121
- 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.
2222
- Update RHEL UBI images to UBI 9.4.
23+
- Update Molecule NGINX Plus tests to work with R33 by introducing the new license JWT.
2324

2425
DOCUMENTATION:
2526

molecule/api_plus/prepare.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
force: false
1818
mode: "0444"
1919

20+
- name: Create ephemeral license JWT file from b64 encoded env var
21+
ansible.builtin.copy:
22+
content: "{{ lookup('env', 'NGINX_JWT') }}"
23+
dest: ../common/files/license/license.jwt
24+
force: false
25+
mode: "0444"
26+
2027
- name: Install NGINX Plus
2128
hosts: all
2229
tasks:
@@ -28,4 +35,5 @@
2835
nginx_license:
2936
certificate: ../common/files/license/nginx-repo.crt
3037
key: ../common/files/license/nginx-repo.key
38+
jwt: ../common/files/license/license.jwt
3139
nginx_remove_license: false
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
roles:
33
- name: nginxinc.nginx
4-
version: 0.24.3
4+
version: 0.25.0
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
roles:
33
- name: nginxinc.nginx
4-
version: 0.24.3
5-
- name: nginxinc.nginx_app_protect
6-
src: https://github.com/nginxinc/ansible-role-nginx-app-protect
7-
version: main
4+
version: 0.25.0
5+
# - name: nginxinc.nginx_app_protect
6+
# src: https://github.com/nginxinc/ansible-role-nginx-app-protect
7+
# version: main

molecule/complete_plus/prepare.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
force: false
1818
mode: "0444"
1919

20+
- name: Create ephemeral license JWT file from b64 encoded env var
21+
ansible.builtin.copy:
22+
content: "{{ lookup('env', 'NGINX_JWT') }}"
23+
dest: ../common/files/license/license.jwt
24+
force: false
25+
mode: "0444"
26+
2027
- name: Install NGINX Plus
2128
hosts: all
2229
tasks:
@@ -28,6 +35,7 @@
2835
nginx_license:
2936
certificate: ../common/files/license/nginx-repo.crt
3037
key: ../common/files/license/nginx-repo.key
38+
jwt: ../common/files/license/license.jwt
3139
nginx_remove_license: false
3240

3341
# - name: Install NGINX App Protect WAF

0 commit comments

Comments
 (0)