Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Jenkins Plugin for AWS Lambda Test Runner

License

Notifications You must be signed in to change notification settings

jenkinsci/lambda-test-runner-plugin

Repository files navigation

Jenkins Plugin for AWS Lambda Test Runner

Adds the Pipeline step lambdaTestRunner to trigger execution of AWS Lambda Test Runner.

Plugin site on Jenkins Plugin portal.

Project status

This project has been discontinued. See here for more information.

Project goal

To provide Jenkins users with simple means of using AWS Lambda Test Runner.

How it works

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.

Architecture

This is the big picture:

How to install it

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 under Upload 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.

Pipeline example

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.

About

Jenkins Plugin for AWS Lambda Test Runner

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •