Adds the Pipeline step lambdaTestRunner
to trigger execution of AWS Lambda Test Runner.
Plugin site on Jenkins Plugin portal.
This project has been discontinued. See here for more information.
To provide Jenkins users with simple means of using AWS Lambda Test Runner.
Jenkins plugin for AWS Lambda Test Runner will:
- Invoke AWS Lambda Test Runner and wait for it to finish.
- Download from S3 any build outputs stored there by AWS Lambda Test Runner.
- Include test execution log from Lambda in Jenkins build console output.
- Unzip any ZIP archives downloaded as part of build outputs.
This is the big picture:
Plugin is available in official Jenkins plugin repository:
- Navigate to
https://<your-jenkins-instance>/pluginManager
. - Select relevant tab.
- Search for
AWS Lambda Test Runner
.
If you want to build and install from sources:
- Clone this repo.
- Build HPI file:
./mvnw clean package -DskipTests
. - Navigate to
https://<your-jenkins-instance>/pluginManager/advanced
. - Upload
target/lambda-test-runner-jenkins-plugin.hpi
underUpload Plugin
.
Other requirements:
- AWS Lambda Test Runner deployed to AWS cloud.
- Jenkins version 2.150.1 or higher.
- AWS IAM permissions for:
- Invoking Lambda functions.
- Downloading content from S3.
Jenkins Plugin for AWS Lambda Test Runner adds lambdaTestRunner
to available Jenkins Pipeline steps.
Below is a sample Jenkinsfile with Declarative Pipeline which implements complete end-to-end functionality:
pipeline {
agent {
label 'master'
}
stages {
stage('Plugin') {
steps {
lambdaTestRunner branch: 'master', command: './mvnw -pl lightning-core verify -DmockS3 -Dmaven.repo.local=${MAVEN_USER_HOME}', functionName: 'LambdaTestRunner', region: 'eu-west-2', repoUri: 'https://github.com/automatictester/lightning.git', s3Bucket: 'automatictester.co.uk-lambda-test-runner-build-outputs', storeToS3: 'lightning-core/target/surefire-reports,lightning-core/target/failsafe-reports'
junit 'downloads/**/junitreports/*.xml'
}
}
}
}
Please note that functionName
, region
and s3Bucket
have to match deployed AWS Lambda Test Runner settings.