Skip to content
Snippets Groups Projects
Commit 3b4f457b authored by Alfin Johny's avatar Alfin Johny
Browse files

Fix CI issues

parent f049a0f4
Branches
No related tags found
2 merge requests!55[WEBPAGE] Update style of current unicado page,!17Integrate mkdoxy in CI pipeline
Pipeline #1590340 waiting for manual action
......@@ -35,6 +35,7 @@ clone:
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@git.rwth-aachen.de/unicado/aircraft-design
- cd aircraft-design || { echo "Directory not found! Exiting..."; exit 1; }
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@git.rwth-aachen.de/unicado/libraries
- cd libraries || { echo "Directory not found! Exiting..."; exit 1; }
# Change to the project directory (useful for multi-directory repositories)
- cd $CI_PROJECT_DIR
......@@ -68,67 +69,9 @@ pages:
- export DOXYGEN_BIN=/usr/bin/doxygen
- pipenv install --dev # Install all necessary dependencies
script:
# Setup the pipeline for deploying the project homepage
# Copyright (c) UNICADO 2023
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# === Configure pipeline ===
stages:
- build
- deploy
# === Build the doxygen documentation ===
doxygen:
image: alpine:latest
stage: build
tags:
- documentation
before_script:
- apk update && apk --no-cache add git doxygen graphviz ttf-freefont texmf-dist texmf-dist-latexextra texlive texlive-dvi
script:
# libaries
- git clone --recurse-submodules https://gitlab-ci-token:${CI_JOB_TOKEN}@git.rwth-aachen.de/unicado/libraries
- cd libraries/aircraftGeometry2/doc/ && ( cat Doxyfile ; echo "OUTPUT_DIRECTORY = $CI_PROJECT_DIR/docs/documentation/" ) | doxygen -
- cd ../../engine/doc/ && ( cat Doxyfile ; echo "OUTPUT_DIRECTORY = $CI_PROJECT_DIR/docs/documentation/" ) | doxygen -
- cd $CI_PROJECT_DIR
# aircraft design
- git clone --recurse-submodules https://gitlab-ci-token:${CI_JOB_TOKEN}@git.rwth-aachen.de/unicado/aircraft-design
- cd aircraft-design/propulsion_design/doc/ && ( cat Doxyfile ; echo "OUTPUT_DIRECTORY = $CI_PROJECT_DIR/docs/documentation/" ) | doxygen -
- cd ../../aircraft-design/wing_design/doc/ && ( cat Doxyfile ; echo "OUTPUT_DIRECTORY = $CI_PROJECT_DIR/docs/documentation/" ) | doxygen -
- cd ../../aircraft-design/empennage_design/doc/ && ( cat Doxyfile ; echo "OUTPUT_DIRECTORY = $CI_PROJECT_DIR/docs/documentation/" ) | doxygen -
- cd ../../aircraft-design/ecological_assessment/doc/ && ( cat Doxyfile ; echo "OUTPUT_DIRECTORY = $CI_PROJECT_DIR/docs/documentation/" ) | doxygen -
artifacts:
paths:
- $CI_PROJECT_DIR/docs/documentation
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: on_success
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
when: manual
- if: '$CI_PIPELINE_SOURCE == "trigger"'
when: on_success
# === Build and deploy the website ===
pages:
image: python:latest
stage: deploy
tags:
- documentation
before_script:
- pip install pipenv
- pipenv install
script:
# Use the persisted content from the previous stage (aircraft-design)
- cp -r $CI_PROJECT_DIR/aircraft-design $CI_PROJECT_DIR/docs/documentation # Copy content to the docs/documentation folder
- cp -r $CI_PROJECT_DIR/libraries $CI_PROJECT_DIR/docs/documentation # Copy content to the docs/documentation folder
- mkdir $CI_PROJECT_DIR/docs/aircraft-xml
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title General --level 1 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/general.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title MassesAndLoadings --level 3 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/masses.md
......@@ -144,7 +87,8 @@ pages:
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title EcologicalValues --level 4 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/ecological.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title Requirements --level 3 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/requirements.md
- python $CI_PROJECT_DIR/scripts/document_aircraft_xml.py --title DesignSpecification --level 4 $CI_PROJECT_DIR/scripts/CSR-02.xml > $CI_PROJECT_DIR/docs/aircraft-xml/specification.md
- pipenv run mkdocs build --site-dir $CI_PROJECT_DIR/public
# Build the MkDocs documentation site
- pipenv run mkdocs build --verbose --site-dir $CI_PROJECT_DIR/public
needs:
- clone # This job depends on the successful completion of the clone job
artifacts:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment