Skip to content
Snippets Groups Projects
Commit 13bd0c86 authored by lcappelli's avatar lcappelli
Browse files

Fix error in pipeline

The nginx.repo file is needed to install the njs module
parent 9053ba4b
No related branches found
No related tags found
No related merge requests found
......@@ -19,12 +19,12 @@ RUN yum update -y && \
COPY artifacts/*.rpm /pkgs/
# install nginx httpg + voms and njs dynamic modules
COPY nginx.repo /etc/yum.repos.d/nginx.repo
RUN rpm -ivh /pkgs/nginx-httpg-1.22.1-1.el7.ngx.x86_64.rpm && \
rpm -ivh /pkgs/nginx-module-http-voms-1.22.1-1.el7.x86_64.rpm && \
yum install -y nginx-module-njs
# install nginx + voms and njs dynamic modules
# COPY nginx.repo /etc/yum.repos.d/nginx.repo
# RUN yum -y install nginx nginx-module-njs && \
# rpm -ivh /pkgs/nginx-module-http-voms-1.22.1-1.el7.x86_64.rpm
......
#!/usr/bin/env bash
# Copyright 2018-2023 Istituto Nazionale di Fisica Nucleare
# SPDX-License-Identifier: EUPL-1.2
set -ex
ngxVersion=1.22.1
# set environment to build rpm
rpmdev-setuptree
cat <<EOF > ${HOME}/.rpmmacros
%_topdir %{getenv:HOME}/rpmbuild
EOF
# download nginx sources
cd ~/rpmbuild/SOURCES/
wget http://nginx.org/packages/centos/7/SRPMS/nginx-$ngxVersion-1.el7.ngx.src.rpm
rpm2cpio nginx-$ngxVersion-1.el7.ngx.src.rpm | cpio -idm
# set the nginx spec file with the httpg patch
cp ${CI_PROJECT_DIR}/nginx-httpg_no_delegation.patch ${HOME}/rpmbuild/SOURCES/
cp ${CI_PROJECT_DIR}/rpm/nginx.spec ~/rpmbuild/SPECS
# build rpm
rpmlint ~/rpmbuild/SPECS/nginx.spec
rpmbuild -ba ~/rpmbuild/SPECS/nginx.spec
mv ~/rpmbuild/RPMS/x86_64/nginx-1.22.1-1.el7.ngx.x86_64.rpm ~/rpmbuild/RPMS/x86_64/nginx-httpg-1.22.1-1.el7.ngx.x86_64.rpm
mv ~/rpmbuild/RPMS/x86_64/nginx-debuginfo-1.22.1-1.el7.ngx.x86_64.rpm ~/rpmbuild/RPMS/x86_64/nginx-httpg-debuginfo-1.22.1-1.el7.ngx.x86_64.rpm
mv ~/rpmbuild/SRPMS/nginx-1.22.1-1.el7.ngx.src.rpm ~/rpmbuild/SRPMS/nginx-httpg-1.22.1-1.el7.ngx.src.rpm
\ No newline at end of file
#!/usr/bin/env bash
# Copyright 2018-2023 Istituto Nazionale di Fisica Nucleare
# SPDX-License-Identifier: EUPL-1.2
set -ex
ngxVersion=1.22.1
# set environment to build rpm
rpmdev-setuptree
cat <<EOF > ${HOME}/.rpmmacros
%_topdir %{getenv:HOME}/rpmbuild
EOF
# set sources
cd ~/rpmbuild/SOURCES
wget -O nginx-$ngxVersion.tar.gz https://nginx.org/download/nginx-$ngxVersion.tar.gz
# set voms modules sources
mkdir ngx-http-voms-module
cp ${CI_PROJECT_DIR}/config ngx-http-voms-module/
cp ${CI_PROJECT_DIR}/config.make ngx-http-voms-module/
cp -r ${CI_PROJECT_DIR}/src ngx-http-voms-module/
cp ${CI_PROJECT_DIR}/rpm/nginx-module-http-voms.spec ~/rpmbuild/SPECS
# build and install rpm
rpmlint ~/rpmbuild/SPECS/nginx-module-http-voms.spec
rpmbuild -ba ~/rpmbuild/SPECS/nginx-module-http-voms.spec
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