From c0b24d846f6deae812d99d8d2b1a401bdafae0fd Mon Sep 17 00:00:00 2001
From: lcappelli <laura.cappelli@cnaf.infn.it>
Date: Fri, 18 Nov 2022 15:31:21 +0100
Subject: [PATCH] Fix other CI bugs (path dir)

---
 .gitlab-ci.yml               | 1 +
 rpm/build-httpg-nginx-rpm.sh | 4 ++--
 rpm/build-voms-rpm.sh        | 8 ++++----
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f404471..2493973 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,6 +10,7 @@ build-ngx-httpg-rpm:
   script: 
     - env | sort
     - sh docker/library-scripts/provide-deps.sh
+    - pwd && echo ${CI_PROJECT_DIR}
     - sh rpm/build-httpg-nginx-rpm.sh
     - mkdir ngx-artifacts
     - cp rpmbuild/SRPMS/* ngx-artifacts/
diff --git a/rpm/build-httpg-nginx-rpm.sh b/rpm/build-httpg-nginx-rpm.sh
index 6377d94..db0d69b 100644
--- a/rpm/build-httpg-nginx-rpm.sh
+++ b/rpm/build-httpg-nginx-rpm.sh
@@ -19,8 +19,8 @@ wget http://nginx.org/packages/centos/7/SRPMS/nginx-$ngxVersion-1.el7.ngx.src.rp
 rpm2cpio nginx-$ngxVersion-1.el7.ngx.src.rpm | cpio -idm
 
 # set the nginx spec file with the httpg patch
-cp ~/nginx-httpg_no_delegation.patch ${HOME}/rpmbuild/SOURCES/
-cp ~/rpm/nginx.spec ~/rpmbuild/SPECS
+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
diff --git a/rpm/build-voms-rpm.sh b/rpm/build-voms-rpm.sh
index 28d9172..7023ece 100644
--- a/rpm/build-voms-rpm.sh
+++ b/rpm/build-voms-rpm.sh
@@ -21,10 +21,10 @@ tar xzf ngx-http-echo-module.tar.gz
 
 # set voms modules sources
 mkdir ngx-http-voms-module
-cp ~/config ngx-http-voms-module/
-cp ~/config.make ngx-http-voms-module/
-cp -r ~/src ngx-http-voms-module/
-cp ~/rpm/nginx-module-http-voms.spec ~/rpmbuild/SPECS
+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
-- 
GitLab