Skip to content

Commit

Permalink
Fix/8280 Fix the material page update since moving private repo (#8378)
Browse files Browse the repository at this point in the history
* Add artifact and remove pushed to git repo

* Change job's name

* Extract file from docker container

* Fix create directory to extract material.html file
  • Loading branch information
JeGoi authored Nov 5, 2024
1 parent 68c2691 commit 7d66da6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ variables:
DST_FILE: layouts/partials/about/material.html
script:
- ${BUILDDIR}/generate-material.sh
artifacts:
expire_in: 1 day
paths:
- result/material.html
tags:
- shell

Expand Down Expand Up @@ -1149,14 +1153,14 @@ build_artifacts_website_release:
- .release_only_rules

# build_artificats_material job for development
material_devel_and_branches:
build_artifacts_material_devel_and_branches:
image: ${PFBUILD_DEB_IMG}:${PFBUILD_DEFAULT_DEV_TAG}
extends:
- .build_artifacts_material_job
- .build_artifacts_material_devel_and_branches_rules

# build_artificats_material job for release
material_release:
build_artifacts_material_release:
image: ${PFBUILD_DEB_IMG}:${CI_COMMIT_TAG}
extends:
- .build_artifacts_material_job
Expand Down
6 changes: 4 additions & 2 deletions ci/lib/build/generate-material.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ generate_material() {
make -C ${PF_SRC_DIR} configurations
make -C ${PF_SRC_DIR} conf/unified_api_system_pass
make -C ${PF_SRC_DIR} conf/local_secret
mkdir -p ${PF_SRC_DIR}/result

echo "Starting ${CONTAINER_NAME} container"
docker run --detach --name=${CONTAINER_NAME} --rm -e PFCONFIG_PROTO=unix \
Expand All @@ -51,6 +52,7 @@ generate_material() {
-v ${PF_SRC_DIR}/ci/lib:/usr/local/pf/ci/lib \
-v ${PF_SRC_DIR}/config.mk:/usr/local/pf/config.mk \
-v ${PF_SRC_DIR}/Makefile:/usr/local/pf/Makefile \
-v ${PF_SRC_DIR}/result:/usr/local/pf/result \
ghcr.io/inverse-inc/packetfence/pfconfig:${IMAGE_TAG}

echo "Let some time to container to start"
Expand All @@ -59,8 +61,8 @@ generate_material() {
echo "Generating material.html file"
docker exec ${CONTAINER_NAME} /usr/bin/make material

echo "Publishing material.html to git if necessary"
docker exec ${CONTAINER_NAME} /usr/local/pf/ci/lib/release/publish-to-git.sh ${SRC_FILE} ${DST_FILE}
#echo "Publishing material.html to git if necessary"
#docker exec ${CONTAINER_NAME} /usr/local/pf/ci/lib/release/publish-to-git.sh ${SRC_FILE} ${DST_FILE}
}

cleanup() {
Expand Down

0 comments on commit 7d66da6

Please sign in to comment.