Commit eb507911 authored by ASN.1 Documenter's avatar ASN.1 Documenter
Browse files

Use new ci/cd approach

parent bf06025e
Loading
Loading
Loading
Loading
−42

File deleted.

+7 −27
Changes for .gitlab-ci.yml: 7 added lines, 27 removed lines.
Original line number Diff line number Diff line
variables:
 GIT_SUBMODULE_STRATEGY: normal
include:
  - project: 'forge-tools/asn2md'
    file: '/gitlab-ci/base.yml'

image: danya25/asn1c:0.0.5
variables:
  ASN1_SRC: 'asn/*.asn asn/cam/*.asn asn/cdd/*.asn'
  
validate:
  stage: test
  script: make -f .gitlab-ci.mk validate
  cache:
    paths:
      - iso/*
  only:
    changes:
      - "asn/*.asn"
  extends: .validate

documentation:
  stage: deploy
  script:
    - curl -o asn2md.py --header "PRIVATE-TOKEN:$CI_DOC_TOKEN" "https://forge.etsi.org/rep/api/v4/projects/592/repository/files/asn2md.py/raw?ref=v1.1.1"
    - make -f .gitlab-ci.mk doc
    - >
      if [ -z "$(git status --untracked-files=no --porcelain)" ]; then
        echo "No changes found";
      else 
        git add docs/*.md &&
        git commit -m "Documentation update" &&
        git remote rm origin && git remote add origin https://oauth2:$CI_DOC_TOKEN@forge.etsi.org/rep/$CI_PROJECT_PATH.git &&
        git push origin HEAD:$CI_COMMIT_REF_NAME;
      fi
  only:
    changes:
      - "asn/*.asn"
  extends: .documentation