diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index fa0ab6fc..fa13b6d8 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -6,6 +6,7 @@ on: push: branches: [main] tags-ignore: ["**"] + merge_group: schedule: - cron: "0 0 1 * *" workflow_dispatch: @@ -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: diff --git a/.gitignore b/.gitignore index 73481b59..bcfa7fe1 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 60104e41..5bed2d9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/molecule/api_plus/prepare.yml b/molecule/api_plus/prepare.yml index 0de8583e..d962353a 100644 --- a/molecule/api_plus/prepare.yml +++ b/molecule/api_plus/prepare.yml @@ -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: @@ -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 diff --git a/molecule/common/requirements/oss_requirements.yml b/molecule/common/requirements/oss_requirements.yml index c0396ce9..e1f75bcb 100644 --- a/molecule/common/requirements/oss_requirements.yml +++ b/molecule/common/requirements/oss_requirements.yml @@ -1,4 +1,4 @@ --- roles: - name: nginxinc.nginx - version: 0.24.3 + version: 0.25.0 diff --git a/molecule/common/requirements/plus_requirements.yml b/molecule/common/requirements/plus_requirements.yml index 84a3b57b..d8ff981d 100644 --- a/molecule/common/requirements/plus_requirements.yml +++ b/molecule/common/requirements/plus_requirements.yml @@ -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 diff --git a/molecule/complete_plus/prepare.yml b/molecule/complete_plus/prepare.yml index db2c6fc4..1f7f41a7 100644 --- a/molecule/complete_plus/prepare.yml +++ b/molecule/complete_plus/prepare.yml @@ -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: @@ -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