1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

gitlab-ci: Configure website build to be published via gitlab pages

On pushes to master publish the webpage (built in the 'website_job' job)
via gitlab pages. The 'pages' job uses the default image that gitlab
assumes as it's consuming artifacts from an existing job and naming
them properly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Peter Krempa 2023-04-03 16:02:05 +02:00
parent 7a1285216b
commit 95011026d1

View File

@ -6,6 +6,7 @@ stages:
- builds - builds
- integration_tests - integration_tests
- sanity_checks - sanity_checks
- pages
.script_variables: &script_variables | .script_variables: &script_variables |
export CCACHE_BASEDIR="$(pwd)" export CCACHE_BASEDIR="$(pwd)"
@ -85,6 +86,23 @@ website_job:
NAME: almalinux-8 NAME: almalinux-8
TARGET_BASE_IMAGE: docker.io/library/almalinux:8 TARGET_BASE_IMAGE: docker.io/library/almalinux:8
# On push to master publish the website from 'website_job' via gitlab pages
pages:
stage: pages
script:
- mv website public
dependencies:
- website_job
rules:
- if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: on_success
- when: never
artifacts:
expose_as: 'pages'
name: 'pages'
paths:
- public
.codestyle_job: .codestyle_job:
stage: sanity_checks stage: sanity_checks
needs: needs: