docs: Add Jenkins CI doc. Fixes #2067
Signed-off-by: Jeremy Adams <jeremy@dagger.io>
This commit is contained in:
parent
e110ac05a2
commit
d57901a741
@ -105,7 +105,38 @@ build:
|
|||||||
|
|
||||||
<TabItem value="jenkins">
|
<TabItem value="jenkins">
|
||||||
|
|
||||||
If you would like us to document Jenkins next, vote for it here: [dagger#1677](https://github.com/dagger/dagger/discussions/1677)
|
With `docker` and `dagger` installed on your Jenkins agent.
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
environment {
|
||||||
|
//https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#handling-credentials
|
||||||
|
//e.g.
|
||||||
|
//DH_CREDS=credentials('jenkins-dockerhub-creds')
|
||||||
|
//AWS_ACCESS_KEY_ID = credentials('jenkins-aws-secret-key-id')
|
||||||
|
//AWS_SECRET_ACCESS_KEY = credentials('jenkins-aws-secret-access-key')
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage("setup") {
|
||||||
|
steps {
|
||||||
|
//only needed if you don't commit the cue.mod directory to git
|
||||||
|
//sh '''
|
||||||
|
// dagger project init
|
||||||
|
// dagger project update
|
||||||
|
//'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("do") {
|
||||||
|
steps {
|
||||||
|
//substitute your action name for 'helloworld'
|
||||||
|
//e.g. 'build' or 'push' or whatever you've created!
|
||||||
|
sh 'dagger do helloworld --log-format=plain'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user