Skip to content

Commit

Permalink
Add Jenkins CI (#15)
Browse files Browse the repository at this point in the history
* intial jenkinsfile

* jenkinsfile pulls profile.json from credentials

* README updates
  • Loading branch information
Andrew Wang authored Dec 21, 2020
1 parent 4c37a0c commit 3f080c6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pipeline {
agent {
docker {
label "docker"
image 'maven:3-alpine'
args '-v /root/.m2:/root/.m2'
}
}
stages {
stage('Unit Tests') {
steps {
withCredentials([file(credentialsId: 'snowflake-kafka-connector-test-creds', variable: 'CREDFILE')]) {
sh 'mv $CREDFILE profile.json'
sh 'mvn test'
}
}
post {
always {
junit 'target/surefire-reports/*.xml'
}
}
}
}
}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,14 @@
[![License](http://img.shields.io/:license-Apache%202-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)

Snowflake-kafka-connector is a plugin of Apache Kafka Connect.

### Tests
To run:
```
mvn test
```

#### Jenkins prerequisites:
* Ensure `JENKINS_CONNECTOR_TESTS` database and `TEST` schema exist.
* Grant `MONITOR, USAGE` for `PUBLIC` role on the database
* Grant `CREATE*, MONITOR, USAGE` for `PUBLIC` role on the schema

0 comments on commit 3f080c6

Please sign in to comment.