Pipelinesでやっていること
- 前提
- trigger:masterかfeatureでdoc配下が更新された時
- asciidocのtheme、fontがdoc配下にある状態
- BaseとなるRubyインストール
- JREインストール
- PlantUML環境のインストール
- asciidoc用ライブラリインストール
- asciidocのPDF化
- Artifactで回収
azure_pipelines.yml
# Ruby
# Package your Ruby project.
# Add steps that install rails, analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/ruby
trigger:
branches:
include:
- master
- feature/*
paths:
include:
- doc
pool:
vmImage: ubuntu-latest
steps:
- task: UseRubyVersion@0
inputs:
versionSpec: '>= 2.5'
- script: |
sudo apt -y install default-jre
displayName: "JRE install"
- script: |
sudo apt -y install graphviz
sudo apt -y install fonts-takao
displayName: "PlantUML install"
- script: |
gem install asciidoctor
gem install asciidoctor-pdf -v "1.5.4"
gem install coderay
gem install asciidoctor-pdf-cjk
gem install asciidoctor-diagram
gem install concurrent-ruby
displayName: 'gem install lib'
- script: |
asciidoctor-pdf -r asciidoctor-diagram -r asciidoctor-pdf-cjk -a pdf-style=default-theme.yml -a pdf-stylesdir=doc/_pdf_themes -a pdf-fontsdir=doc/_pdf_fonts doc/*.adoc -o
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Asciidoc'
inputs:
PathtoPublish: doc
ArtifactName: 'Asciidoc'