Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/szcn/validating-email-parameter-plugin

Jenkins Validating Email Parameter
https://github.com/szcn/validating-email-parameter-plugin

email email-validation emailext jenkins-builder jenkins-ci jenkins-plugin parameter

Last synced: 30 days ago
JSON representation

Jenkins Validating Email Parameter

Awesome Lists containing this project

README

        

Jenkins Validating Email Parameter Plugin
==============

master: [![Build Status](https://travis-ci.com/szcn/validating-email-parameter-plugin.svg?branch=master)](https://travis-ci.com/szcn/validating-email-parameter-plugin)

```
Plugin;
- performs e-mail validation
- prevents sending e-mails except the specified domain.
- prevents typo
- [email protected] [email protected] [email protected] --> user1 user2 user3 can be written and performs specific validation. E-mail address will be generated automatically in the build process.
```

## Parameter Definition
![](./src/main/resources/io/jenkins/plugins/image/p1.png)

- Default Value : Specifies the default value of the field, which allows the user to save typing the actual value.

- Domain : Permitted domain name for sending mail.

![](./src/main/resources/io/jenkins/plugins/image/p2.png)

## Validation

### External Email : If checked, Sending mail is allowed outside the set domain name.

### External Email : false

## Build

- Invalid Email

![](./src/main/resources/io/jenkins/plugins/image/p9.png)

- Valid Email

![](./src/main/resources/io/jenkins/plugins/image/p10.png)

## You can copy that code directly into the pipeline block in your Jenkinsfile

```node

pipeline {
agent any

parameters {
email defaultValue: 'sezai.can', description: 'Email address', domain: 'sahibinden.com', externalEmail: true, name: 'EMAIL'
}

stages {
stage('Email') {
steps {
echo "${params.EMAIL}"
}
}
}
}

```

![](./src/main/resources/io/jenkins/plugins/image/p11.png)