Skip to content

route443 is triggering pipeline #37

route443 is triggering pipeline

route443 is triggering pipeline #37

name: CI for NJS-based SAML Implementation
run-name: ${{ github.actor }} is triggering pipeline
on:
push:
workflow_dispatch:
jobs:
test-njs-saml:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https lsb-release apt-utils ubuntu-keyring gnupg2 \
ca-certificates wget mercurial
- name: Get secrets from Azure
uses: nginx/ci-self-hosted/.github/actions/get-from-vault@5c3e1f8b51f66a851fdba80f70e19cf966199730
with:
client-id: ${{secrets.NGINX_PLUS_CLIENT_ID}}
tenant-id: ${{secrets.NGINX_PLUS_TENANT_ID}}
vault-name: ${{secrets.NGINX_COMMON_VAULT_NAME}}
secret-names: "nginx-pkg-certificate, nginx-pkg-key, nginx-pkg-jwt"
env-names: "NGINX_REPO_CRT, NGINX_REPO_KEY, NGINX_LIC"
- name: Prepare keys and certificates
run: |
sudo mkdir /etc/ssl/nginx
echo '${{ env.NGINX_REPO_CRT }}' | sudo tee /etc/ssl/nginx/nginx-repo.crt > /dev/null
echo '${{ env.NGINX_REPO_KEY }}' | sudo tee /etc/ssl/nginx/nginx-repo.key > /dev/null
- name: Prepare NGINX Plus license token
run: |
echo '${{ env.NGINX_LIC }}' | tee $RUNNER_TEMP/lic > /dev/null
- name: Import NGINX Plus signing key
run: |
wget -qO - https://cs.nginx.com/static/keys/nginx_signing.key \
| gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg > /dev/null
- name: Configure NGINX Plus repository
run: |
echo "Acquire::https::pkgs-test.nginx.com::Verify-Peer \"true\";" | sudo tee -a /etc/apt/apt.conf.d/90nginx
echo "Acquire::https::pkgs-test.nginx.com::Verify-Host \"true\";" | sudo tee -a /etc/apt/apt.conf.d/90nginx
echo "Acquire::https::pkgs-test.nginx.com::SslCert \"/etc/ssl/nginx/nginx-repo.crt\";" \
| sudo tee -a /etc/apt/apt.conf.d/90nginx
echo "Acquire::https::pkgs-test.nginx.com::SslKey \"/etc/ssl/nginx/nginx-repo.key\";" \
| sudo tee -a /etc/apt/apt.conf.d/90nginx
printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
https://pkgs-test.nginx.com/nightly/ubuntu $(lsb_release -cs) nginx-plus\n" \
| sudo tee /etc/apt/sources.list.d/nginx-plus.list
- name: Install NGINX Plus
run: |
sudo apt-get update
sudo apt-get install -y nginx-plus nginx-plus-module-njs
- name: Install required Perl modules
run: |
sudo apt-get install -y perl libxml-libxml-perl libdatetime-perl libcrypt-openssl-x509-perl \
libcrypt-openssl-rsa-perl
- name: Checkout nginx-test
run: |
git clone https://github.com/nginx/nginx-tests.git
- name: Run tests
working-directory: t
run: |
PERL5LIB=../nginx-tests/lib TEST_NGINX_BINARY=/usr/sbin/nginx TEST_NGINX_VERBOSE=1 \
TEST_NGINX_GLOBALS="load_module /etc/nginx/modules/ngx_http_js_module-debug.so; mgmt {license_token $RUNNER_TEMP/lic;}" \
prove -v .