Merge pull request #2102 from jpadams/add-jenkins-ci-doc

docs: Add Jenkins CI doc. Fixes #2067
This commit is contained in:
Jeremy Adams 2022-04-12 15:22:41 -07:00 committed by GitHub
commit fe0dbf01d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,38 @@ build:
<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>