Skip to content
Snippets Groups Projects
Select Git revision
  • cdc19e6cf0366f44e835938ad58918ad6f2aa8ee
  • master default protected
  • l.hofer-master-patch-46791
  • dependabot-pip-mkdocs-material-9.6.18
  • l.hofer-master-patch-59936
  • attribute_rework_25
  • update-dcache-doc-vendor
  • update-dcache-doc-vos
  • l.hofer-master-patch-20045
  • old-env
  • clean-up-helmholtz-id-docs
  • remove-cloud-helmholtzid-entry-pages
  • services-on-top-level-flat-hierarchy
  • services-on-top-level
  • the-toppest-level
  • personas-to-main-page
  • resource-booking-role-dcache
  • service-registration-improvement
  • user-stories-to-overview-page
  • docs-struct-uj1
  • how-to-identify-helmholtz-staff
21 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 2.52 KiB
    image: python:3.11-slim
    
    stages:
      - build
      - test
      - review
      - deploy
    
    build:
      stage: build
      variables:
        GIT_DEPTH: 0
        GIT_SUBMODULE_STRATEGY: recursive
      before_script:
        - apt-get update && apt-get install -qy git-core
        - pip install pipenv
        - pipenv install
      script:
        - pipenv run mkdocs build
        - mv site public
      artifacts:
        paths:
          - public
    
    check_links:
      image: node:slim
      stage: test
      dependencies:
        - build
      before_script:
        - npm install broken-link-checker http-server -g
        - http-server -a 127.0.0.1 -s &
        # Allow the web server to successfully spawn
        - sleep 10
      script:
        - blc -get http://localhost:8080 -ro --exclude 'https://b2access.eudat.eu/saml-idp/SLO-WEB' --exclude 'https://nubes.helmholtz-berlin.de/f/*' --exclude 'https://webfts.fedcloud-tf.fedcloud.eu/' --exclude 'https://hdf-cloud.fz-juelich.de' --exclude 'https://fts3-public.cern.ch' --exclude 'https://events.hifis.net' --exclude 'https://login.helmholtz.de/oauth2' --exclude 'https://login.helmholtz.de/saml-idp/'  --exclude 'https://www.hzdr.de' --exclude 'https://kroki.hzdr.de/' --exclude 'https://geant3plus.archive.geant.net'  --exclude 'https://rancher.desy.de' --exclude 'https://sonar.desy.de' --exclude 'https://portswigger.net' --exclude 'https://gitlab.desy.de/thomas.beermann/hifiscp-deployment-triggers' --exclude 'https://hifis-cloud-portal-int.desy.de/'
      allow_failure: true
    
    review:
      stage: review
      variables:
        GIT_STRATEGY: none
        REVIEW_APPS_PATH: review-apps/$CI_PROJECT_PATH_SLUG/$CI_COMMIT_REF_SLUG
      dependencies:
        - build
      needs: ["build"]
      script:
        - mkdir -p /var/www/html/gl-review-apps/$REVIEW_APPS_PATH
        - rsync -a --delete ./public/. /var/www/html/gl-review-apps/$REVIEW_APPS_PATH/.
      environment:
        name: review/$CI_COMMIT_REF_NAME
        url: https://$APPS_DOMAIN/review-apps/$CI_PROJECT_PATH_SLUG/$CI_COMMIT_REF_SLUG/
        on_stop: stop_review
      tags:
        - review-apps
      allow_failure: true
    
    stop_review:
      stage: review
      variables:
        GIT_STRATEGY: none
        REVIEW_APPS_PATH: review-apps/$CI_PROJECT_PATH_SLUG/$CI_COMMIT_REF_SLUG
      script:
        - rm -rf public /var/www/html/gl-review-apps/$REVIEW_APPS_PATH
        - rmdir --ignore-fail-on-non-empty /var/www/html/gl-review-apps/review-apps/$CI_PROJECT_PATH_SLUG/
      dependencies: []
      when: manual
      environment:
        name: review/$CI_COMMIT_REF_NAME
        action: stop