Skip to content
Snippets Groups Projects
Commit ed7003dd authored by Andrea Ceccanti's avatar Andrea Ceccanti
Browse files

Merge branch 'issue-9' into 'master'

Issue 9

See merge request storm2/ngx_http_voms_module!6
parents 7a81642f 40b27268
No related branches found
No related tags found
No related merge requests found
......@@ -5,23 +5,43 @@ image: storm2/ngx-voms-build:latest
stages:
- build
- test
- deploy
build:
build4c:
stage: build
script:
- env
- sh ${HOME}/build-install-ngx-voms.sh
- sh ${HOME}/build-install-ngx-voms.sh -d -c
- mv ${HOME}/local local
- mv ${HOME}/openresty-1.13.6.1/build/nginx-1.13.6 nginx-1.13.6
artifacts:
paths:
- local
- nginx-1.13.6
test:
test4c:
stage: test
dependencies:
- build
- build4c
script:
- rm -rf ${HOME}/local/
- rm -rf ${HOME}/openresty-1.13.6.1/build/nginx-1.13.6/
- mv local ${HOME}
#- mv -f local/* ${HOME}/local/
- mv nginx-1.13.6 ${HOME}/openresty-1.13.6.1/build/
- sh test-ngx-voms.sh
- sh cov-ngx-voms.sh
- mv /tmp/coverage-report coverage
artifacts:
paths:
- coverage
pages:
stage: deploy
dependencies:
- test4c
script:
- mv coverage/ public/
artifacts:
paths:
- public
expire_in: 30 days
# ngx_http_voms_module
[![pipeline status](https://baltig.infn.it/storm2/ngx_http_voms_module/badges/master/pipeline.svg)](https://baltig.infn.it/storm2/ngx_http_voms_module/commits/master)
## Description
_ngx_http_voms_module_ is a module for the [Nginx web server](https://www.nginx.org/) that enables client-side authentication based on X.509 proxy certificates augmented with VOMS Attribute Certificates, typically obtained from a [Virtual Organization Membership Service](https://italiangrid.github.io/voms/) (VOMS) server.
......
#!/bin/sh
# Copyright 2018 Istituto Nazionale di Fisica Nucleare
#
# Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the
# European Commission - subsequent versions of the EUPL (the "Licence"). You may
# not use this work except in compliance with the Licence. You may obtain a copy
# of the Licence at:
#
# https://joinup.ec.europa.eu/software/page/eupl
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# Licence for the specific language governing permissions and limitations under
# the Licence.
# This script builds in debug mode and installs openresty together with the
# ngx_http_voms_module.
#
# The script requires the locations of the openresty bundle and of the
# ngx_http_voms_module code (for example as checked-out from git). The locations
# are expressed by the environment variables OPENRESTY_ROOT and
# NGX_HTTP_VOMS_MODULE_ROOT respectively, if available. If they are not set,
# they are guessed:
# * a unique openresty bundle is looked for in ${HOME}
# * the ngx_http_voms_module code is looked for in the working directory of the
# continuous integration environment first and then in ${HOME}
#
# The script works best (i.e. it is tested) if run within a docker container
# started from the storm2/ngx-voms-build image.
#geninfo --base-directory ${HOME}/openresty-1.13.6.1/build/nginx-1.13.6/objs/addon/src/ --output-filename coverage.info ${HOME}/openresty-1.13.6.1/build/nginx-1.13.6/objs/addon/src/
geninfo --output-filename /tmp/coverage.info ${HOME}/openresty-1.13.6.1/build/nginx-1.13.6/objs/addon/src/
genhtml --prefix ${HOME}/openresty-1.13.6.1/build/nginx-1.13.6/objs/addon/src/ --ignore-errors source --demangle-cpp /tmp/coverage.info \
--legend --title "coverage ngix" --output-directory=/tmp/coverage-report
exit_status=$?
if [ ! $exit_status -eq 0 ]; then
echo "check output"
fi
echo $exit_status
......@@ -43,6 +43,9 @@ The above command generates data files aside the source files for all Nginx. To
Then run the tests, e.g. with `prove`. This will create other data files with coverage information. To view that information, run `gcov <source of object file>`, e.g. `gcov /home/build/openresty-1.13.6.1/build/nginx-1.13.6/objs/addon/src/ngx_http_voms_module.o`. This will produce files with the ``.gcov`` extension in the current directory.
Check result on [storm2 ngx_http_voms_module pages](https://storm2.baltig-pages.infn.it/ngx_http_voms_module/)
### Testing directly the NGINX server
You can reuse the config file `t/servroot/conf/nginx.conf` produced by `test::Nginx`, which contains e.g. something like
......
......@@ -41,5 +41,5 @@ if [ ! -d "${module_root}" ]; then
exit 1
fi
mkdir /tmp/t
mkdir -p /tmp/t
prove ${module_root}/t
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment