Skip to content

Commit

Permalink
#81 add Markdown class
Browse files Browse the repository at this point in the history
- link check functionality
- test class
  • Loading branch information
Vincent committed Jun 27, 2022
1 parent 46db382 commit ad6944e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/com/cloudogu/ces/cesbuildlib/Markdown.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.cloudogu.ces.cesbuildlib

class Markdown implements Serializable{
Sh sh
private script
Docker docker

Markdown(script) {
this.sh = new Sh(script)
}

def check(){
docker.image("ghcr.io/tcort/markdown-link-check:stable")
.mountJenkinsUser()
.inside('--entrypoint="" -v ${WORKSPACE}/docs:/tmp') {
script.sh 'find /tmp -name \\*.md -print0 | xargs -0 -n1 markdown-link-check -v'
}
}

}
5 changes: 5 additions & 0 deletions test/com/cloudogu/ces/cesbuildlib/MarkdownTest.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.cloudogu.ces.cesbuildlib

class MarkdownTest extends GroovyTestCase {

}

0 comments on commit ad6944e

Please sign in to comment.