Skip to content
Snippets Groups Projects
Commit 9053ba4b authored by lcappelli's avatar lcappelli
Browse files

Try to improve CI using .devcontainer scripts

parent afb87b09
No related branches found
No related tags found
1 merge request!23Use nginx with njs instead of openresty with lua
Pipeline #92125 failed
......@@ -30,7 +30,10 @@ 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
cd /workspaces/ngx_http_voms_module
if [ -z ${CI_PROJECT_DIR} ]; then
CI_PROJECT_DIR="/workspaces/ngx_http_voms_module";
fi
cd $CI_PROJECT_DIR
}
......
stages:
- build-nginx-httpg-rpm
- build-voms-module-rpm
- build-rpms
- docker-build-ngx-httpg-voms
build-ngx-httpg-rpm:
stage: build-nginx-httpg-rpm
image: centos:7
script:
- env | sort
- yum install -y wget openssl-devel zlib-devel pcre2-devel make rpmdevtools rpmlint
- sh rpm/build-httpg-nginx-rpm.sh
- cd ${CI_PROJECT_DIR} && mkdir ngx-artifacts
- cp ~/rpmbuild/SRPMS/* ngx-artifacts/
- cp ~/rpmbuild/RPMS/x86_64/* ngx-artifacts/
artifacts:
paths:
- ngx-artifacts/
build-ngx-voms-module-rpm:
stage: build-voms-module-rpm
build-rpms:
stage: build-rpms
image: centos:7
script:
- env | sort
- yum -y install epel-release
- yum install -y wget openssl-devel zlib-devel pcre2-devel make rpmdevtools rpmlint boost-devel voms-devel gcc-c++
- sh rpm/build-voms-rpm.sh
- cd ${CI_PROJECT_DIR} && mkdir voms-artifacts
- cp ~/rpmbuild/SRPMS/* voms-artifacts/
- cp ~/rpmbuild/RPMS/x86_64/* voms-artifacts/
- source .devcontainer/assets/build-library.sh
- CI_PROJECT_DIR=$PWD
- downloadNginx
- buildHttpgNginxRPM
- buildVomsModuleRPM
- cd ${CI_PROJECT_DIR}/docker && mkdir artifacts
- cp ~/rpmbuild/SRPMS/* artifacts/
- cp ~/rpmbuild/RPMS/x86_64/* artifacts/
artifacts:
paths:
- voms-artifacts/
- docker/artifacts/
build-ngx-httpg-voms-module-container:
stage: docker-build-ngx-httpg-voms
......@@ -40,15 +29,11 @@ build-ngx-httpg-voms-module-container:
- name: docker:dind
command: ["--tls=false"]
dependencies:
- build-ngx-httpg-rpm
- build-ngx-voms-module-rpm
- build-rpms
script:
- apk add git bash
- git clone https://baltig.infn.it/mw-devel/helper-scripts.git helper-scripts
- cp helper-scripts/scripts/* /usr/local/bin
- mkdir ${CI_PROJECT_DIR}/docker/artifacts/
- cp ${CI_PROJECT_DIR}/ngx-artifacts/*.x86_64.rpm ${CI_PROJECT_DIR}/docker/artifacts/
- cp ${CI_PROJECT_DIR}/voms-artifacts/*.x86_64.rpm ${CI_PROJECT_DIR}/docker/artifacts/
- rm ${CI_PROJECT_DIR}/docker/artifacts/*-debuginfo*.rpm
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- export DOCKER_REGISTRY_HOST=${CI_REGISTRY}
......
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