Top Banner
Automating & Integrating Pantheon with JIRA, Slack, Jenkins, and More
29

Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Jan 17, 2017

Download

Technology

Pantheon
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Automating & Integrating Pantheon with JIRA, Slack, Jenkins, and More

Page 2: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io

Who Are We?

2

Brian Thompson, Lead Software Engineer, Mindgrub

Dave Wikoff, Lead Software Engineer, Mindgrub

Ari Gold, Associate Product Manager, Pantheon

Page 3: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More
Page 4: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

LOTS OF COMPLEXITYLOTS OF DETAIL

Page 5: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

LOTS OF TEDIUM

Page 6: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

HUMAN BEINGS ARE NOT GOOD AT ROBOT WORK

Page 7: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

MAKE THE ROBOTS DO THE WORK

Page 8: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More
Page 9: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 9

Automation Benefits

✓ Frees developer time to improve quality, skills, or deliver features faster.

✓ Machines aren’t prone to human error.

✓ Improves project visibility through dependable notifications.

Page 10: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 10

The

Page 11: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 11

Cloud Integration Tools

● Quicksilver Platform Hooks

● The pantheon.yml config file

● Terminus Command Line Interface

● SAML Centralized Authentication

Page 12: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 12

SAML Centralized Authentication

● Integrate Pantheon into your organization-wide security strategy.

● Authenticate against your identity provider (IdP) when logging into the Pantheon dashboard.

● If your organization does not already make use of SAML, you can use Okta, OneLogin, or open-source tools as a no-cost way to get started.

Page 13: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 13

Terminus Command Line Interface

● Now supports token-based authentication

● Securely use Terminus on remote servers,

a must-have for continuous integration.

● Includes advanced interfaces to track

workflows on Pantheon

Page 14: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 14

Quicksilver Platform Hooks

Some examples of what you can do:

● Update issue tracker (e.g. JIRA) based on Pantheon activity

● Automatically sanitize Dev databases after cloning from Live

● Post notifications to Slack to keep your teams in sync

● Clear CDN caches on deploy

● Integrate almost anything via simple webhooks

Page 15: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 15

Pull Requests are Most Welcome!

pantheon-systems/quicksilver-examples

Page 16: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io

Developers trigger workflows identified in pantheon.yml

● sync_code

● deploy

● clone_database

● clear_cache

16

Quicksilver Platform Hooks

Platform Hooks respond by running the Quicksilver operations listed for that workflow in pantheon.yml and stored in code/private/scripts/example.php

Page 17: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 17

----api_version: 1workflows: sync_code: after: - type: webphp description: 'Clear cache after code push.' script: private/scripts/cc_after_push.php

The pantheon.yml configuration file

Page 18: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 18

<?php

echo "Hello, Quicksilver.";echo "\n\n";echo "\n========= START PAYLOAD ===========\n";print_r($_POST);echo "\n========== END PAYLOAD ============\n";echo "\n";echo "\n---------- ENVIRONMENT ------------\n";passthru("printenv");

Quicksilver WebPHP Scripts

- Web-requested PHP- Subject to 120s timeout

Page 19: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Pantheon.io 19

files/private/secrets.json

- Keep machine tokens, Slack webhook URLs, and keys - files is not in git- Must add to all environments (doesn’t deploy with code)- Script! https://github.com/pantheon-systems/quicksilver-

examples/pull/14

secrets.json

Page 20: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

[email protected] | mindgrub.com | @mindgrub

1. Agencies have a lot of simultaneous projects 2. Moving configuration between environments3. Code quality enforcement4. Continuous integration

The Hard Way

Page 21: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

[email protected] | mindgrub.com | @mindgrub

1. Features solves configuration Issues in Drupal 72. Drupal 8 makes it easier with CMI3. Solve similar issues in WordPress using WP-CFM4. This can all be run synced using Quicksilver

Moving Configuration Between Environments

Page 22: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

[email protected] | mindgrub.com | @mindgrub

Enforcing Code Quality

● SimpleTest / PHPUnit● PHP Mess Detector, PHP Code Style● JS Linting

Page 23: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

[email protected] | mindgrub.com | @mindgrub

● Run any CI build on push● Mindgrub uses Jenkins, works for anything● Opens many other possibilities

Continuous Integration

Page 24: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

[email protected] | mindgrub.com | @mindgrub

● Deployments should be stress free● Multiple moving parts● Communication between all parties is important● https://github.com/rvtraveller/pantheon-slack-integration

Turning Deployments from High Stress to Low Stress

Page 25: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

[email protected] | mindgrub.com | @mindgrub

Demo

Page 27: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

[email protected] | mindgrub.com | @mindgrub

● Integration with ticket tracking system to automatically update tickets

● Polling via Slack● Enhanced Terminus integration

Future Enhancements

Page 29: Automating & Integrating Pantheon with JIRA, Slack, Jenkins and More

Questions?