Skip to content

Instantly share code, notes, and snippets.

View AaronMcCaughan's full-sized avatar

AaronMcCaughan

View GitHub Profile
/**************************************************************
**********ENVIRONMENT HEALTH CHECK SAMPLE SCRIPT *************
**************************************************************
This script will connect to Jenkins using Basic Authentication and trigger the execution of a Job using API' requests. It will then copy the log file from Jenkins to the execution log in Plutora
The script accepts the input parameters below, triggers the execution of a Jenkins job and captures the console output in Plutora.
The paramaters entered into the UI need to be named as follows and are case sensitive:
- host = <This is the url of your instance of Jenkins>
- user = <This is the user to authenticate with Jenkins>
@AaronMcCaughan
AaronMcCaughan / Execute a test against Plutora APIs.js
Last active August 14, 2019 01:33
Environment Health Check - Test Plutora APIs
/**************************************************************
**********ENVIRONMENT HEALTH CHECK SAMPLE SCRIPT *************
**************************************************************
The following scripts executes a plain JS Test script.
The script accepts a URL and API Credentials as parameters passed in from the UI, generates a Oauth token and makes a simple API call
The paramaters entered into the UI need to be named as follows and are case sensitive:
- url = <The API oauth url of your Plutora Instance>
- clientId = <The API clientId for your instance of Plutora>
@AaronMcCaughan
AaronMcCaughan / Test Plutora SSO Login using a Selenium Test.js
Last active August 14, 2019 01:37
Environment Health Check - Test Plutora SSO Login
/**************************************************************
**********ENVIRONMENT HEALTH CHECK SAMPLE SCRIPT *************
**************************************************************
The following scripts accepts a URL and SSO Credentials as parameters passed in from the UI and logs into the Plutora Application using SSO
The script executes a headless selenium script to perform the test.
The script accepts a URL, email, password and failure email address as parameters passed in from the UI and logs into Plutora using SSO
The paramaters entered into the UI need to be named as follows and are case sensitive:
@AaronMcCaughan
AaronMcCaughan / Upcoming Release Widget.css
Last active October 18, 2019 01:24
Upcoming Release Widget
/*
This script will create a useful series of widgets for the next 8 Enterpise releases and show the following information :
- List each phase along with Start and End Dates
- The Go Live Date
- The list of Features associated to the Enterprise release and all releases within the release manifest via the 'Features' button
Refer to the Plutora knowledge base on how to add a new widget. To implement this widget on your own site, following the instructions below
*/
/*
@AaronMcCaughan
AaronMcCaughan / Sample script to trigger email notifications.js
Last active June 28, 2020 10:33
Sample script to trigger email notifications
let run = function (args) {
return new Promise((resolve,reject)=>{
console.log('Sending email');
mailData = {
to: 'email@email.com', // Required - Address data can be passed as a single string with commmas separating addresses or an array of single address strings. ie: ['a@a.com', 'b@b.com']
//cc: 'a@a.com', //optional
//bcc: 'a@a.com', //optional
subject: 'Test Email', //Required
@AaronMcCaughan
AaronMcCaughan / Create_Health_Check_Status_history_via_API.js
Created August 13, 2020 05:03
Create_Health_Check_Status_history_via_API
/*
This script will connect to Plutora using Oauth 2.0 Authentication and retrieve a list of environments to be based on the search parameters defined in the Plutora UI.
It will then console.log the response to the execution log in Plutora.
This script uses credentials that are defined in Plutora UI as Job Parameters. Refer to the knowledge base in Plutora for more information on adding parameters
To execute this script on your own instance of Plutora, create a new Job, upload the script and define the parameters in the Plutora UI as follows (Note the parameter names are case sensitive):
- oauthurl = <This is the oauth url of your instance of Plutora>
- apiUrl = <This is the API url of your instance of Plutora>
- username = <This is the user email to authenticate with your instance of Plutora>