Slide 1

Slide 1 text

Phing All The Things - Omni Adams

Slide 2

Slide 2 text

Phing All The Things - Omni Adams lazy development

Slide 3

Slide 3 text

Phing All The Things - Omni Adams

Slide 4

Slide 4 text

Phing All The Things - Omni Adams Stay DRY

Slide 5

Slide 5 text

Phing All The Things - Omni Adams

Slide 6

Slide 6 text

Phing All The Things - Omni Adams

Slide 7

Slide 7 text

Phing All The Things - Omni Adams

Slide 8

Slide 8 text

Phing All The Things - Omni Adams

Slide 9

Slide 9 text

Phing All The Things - Omni Adams

Slide 10

Slide 10 text

Phing All The Things - Omni Adams

Slide 11

Slide 11 text

Phing All The Things - Omni Adams phing-the-things$ phing test Buildfile: /Users/Omni/phing-example/build.xml [property] Loading /Users/Omni/phing-example/build.properties phing-example > test: PHPUnit 3.7.13 by Sebastian Bergmann. Configuration read from /Users/Omni/phing-example/phpunit.xml .............................. Time: 0 seconds, Memory: 7.25Mb OK (30 tests, 52 assertions) BUILD FINISHED Total time: 0.3155 seconds

Slide 12

Slide 12 text

Phing All The Things - Omni Adams F............................. Time: 0 seconds, Memory: 7.25Mb There was 1 failure: 1) GitTest::testGetCommitInfo LOL cats have clogged the tubes! /Users/Omni/phing-example/tests/GitTest.php:51 FAILURES! Tests: 30, Assertions: 51, Failures: 1.Execution of target "test" failed for the following reason: / Users/Omni/phing-example/build.xml:102:46: Task exited with code 1 BUILD FAILED /Users/Omni/phing-example/build.xml:102:46: Task exited with code 1 Total time: 0.5653 seconds

Slide 13

Slide 13 text

Phing All The Things - Omni Adams

Slide 14

Slide 14 text

Phing All The Things - Omni Adams

Slide 15

Slide 15 text

Phing All The Things - Omni Adams F............................. Time: 0 seconds, Memory: 7.25Mb There was 1 failure: 1) GitTest::testGetCommitInfo LOL cats have clogged the tubes! /Users/Omni/phing-example/tests/GitTest.php:51 FAILURES! Tests: 30, Assertions: 51, Failures: 1. BUILD FINISHED Total time: 0.5619 seconds

Slide 16

Slide 16 text

Phing All The Things - Omni Adams

Slide 17

Slide 17 text

Phing All The Things - Omni Adams ●  strict ●  colors ●  groups ●  command line flags

Slide 18

Slide 18 text

Phing All The Things - Omni Adams

Slide 19

Slide 19 text

Phing All The Things - Omni Adams

Slide 20

Slide 20 text

Phing All The Things - Omni Adams

Slide 21

Slide 21 text

Phing All The Things - Omni Adams

Slide 22

Slide 22 text

Phing All The Things - Omni Adams phing-the-things$ phing test -DphpunitFlag=--group=smoke Buildfile: /Users/Omni/phing-example/build.xml [property] Loading /Users/Omni/phing-example/build.properties phing-example > test: PHPUnit 3.7.13 by Sebastian Bergmann. Configuration read from /Users/Omni/phing-example/phpunit.xml ........ Time: 0 seconds, Memory: 7.25Mb OK (8 tests, 12 assertions) BUILD FINISHED Total time: 0.1058 seconds

Slide 23

Slide 23 text

Phing All The Things - Omni Adams composer=/opt/composer.phar server1.user=oadams server1.url=www.example.lan

Slide 24

Slide 24 text

Phing All The Things - Omni Adams things

Slide 25

Slide 25 text

Phing All The Things - Omni Adams author=Omni title=Phing All The Things

Slide 26

Slide 26 text

Phing All The Things - Omni Adams

Slide 27

Slide 27 text

Phing All The Things - Omni Adams

Slide 28

Slide 28 text

Phing All The Things - Omni Adams

Slide 29

Slide 29 text

Phing All The Things - Omni Adams

Slide 30

Slide 30 text

Phing All The Things - Omni Adams

Slide 31

Slide 31 text

Phing All The Things - Omni Adams

Slide 32

Slide 32 text

Phing All The Things - Omni Adams

Slide 33

Slide 33 text

Phing All The Things - Omni Adams ...

Slide 34

Slide 34 text

Phing All The Things - Omni Adams

Slide 35

Slide 35 text

Phing All The Things - Omni Adams

Slide 36

Slide 36 text

Phing All The Things - Omni Adams

Slide 37

Slide 37 text

Phing All The Things - Omni Adams

Slide 38

Slide 38 text

Phing All The Things - Omni Adams

Slide 39

Slide 39 text

Phing All The Things - Omni Adams

Slide 40

Slide 40 text

Phing All The Things - Omni Adams

Slide 41

Slide 41 text

Phing All The Things - Omni Adams

Slide 42

Slide 42 text

Phing All The Things - Omni Adams

Slide 43

Slide 43 text

Phing All The Things - Omni Adams

Slide 44

Slide 44 text

Phing All The Things - Omni Adams

Slide 45

Slide 45 text

Phing All The Things - Omni Adams

Slide 46

Slide 46 text

Phing All The Things - Omni Adams

Slide 47

Slide 47 text

Phing All The Things - Omni Adams

Slide 48

Slide 48 text

Phing All The Things - Omni Adams

Slide 49

Slide 49 text

Phing All The Things - Omni Adams

Slide 50

Slide 50 text

Phing All The Things - Omni Adams

Slide 51

Slide 51 text

Phing All The Things - Omni Adams

Slide 52

Slide 52 text

Phing All The Things - Omni Adams

Slide 53

Slide 53 text

Phing All The Things - Omni Adams ASS UMPTIONS

Slide 54

Slide 54 text

Phing All The Things - Omni Adams

Slide 55

Slide 55 text

Phing All The Things - Omni Adams

Slide 56

Slide 56 text

Phing All The Things - Omni Adams

Slide 57

Slide 57 text

Phing All The Things - Omni Adams

Slide 58

Slide 58 text

Phing All The Things - Omni Adams phing-the-things$ phing tag Buildfile: /Users/Omni/Sites/phing/build.xml [property] Loading /Users/Omni/Sites/phing/build.properties phing-the-things > require-version: [if] Error in IfTask Execution of target "require-version" failed for the following reason: /Users/Omni/Sites/phing/build.xml:146:12: / Users/Omni/Sites/phing/build.xml:150:18: You must pass in a version: -Dversion=1.2.3 BUILD FAILED /Users/Omni/Sites/phing/build.xml:146:12: /Users/Omni/Sites/phing/build.xml:150:18: You must pass in a version: -Dversion=1.2.3 Total time: 1.5921 second

Slide 59

Slide 59 text

Phing All The Things - Omni Adams phing-the-things$ phing tag-no-version Buildfile: /Users/Omni/Sites/phing/build.xml [property] Loading /Users/Omni/Sites/phing/build.properties phing-the-things > tag-no-version: [gittag] git-tag command: /usr/bin/git tag -a -m'Tagged version ${version}' '${version}' [gittag] git-tag: tags for "." repository [gittag] git-tag output: BUILD FINISHED Total time: 0.2039 seconds phing-the-things $ git tag ${version}

Slide 60

Slide 60 text

Phing All The Things - Omni Adams

Slide 61

Slide 61 text

Phing All The Things - Omni Adams

Slide 62

Slide 62 text

Phing All The Things - Omni Adams

Slide 63

Slide 63 text

Phing All The Things - Omni Adams

Slide 64

Slide 64 text

Phing All The Things - Omni Adams

Slide 65

Slide 65 text

Phing All The Things - Omni Adams phing-the-things$ phing tag-version -Drelease=minor Buildfile: /Users/Omni/Sites/phing/build.xml [property] Loading /Users/Omni/Sites/phing/build.properties phing-the-things > tag-version: [master 4b48e9f] Updated version file to 0.1.0 1 file changed, 1 insertion(+), 1 deletion(-) [gittag] git-tag command: /usr/bin/git tag -a -m'Tagged version 0.1.0' '0.1.0' [gittag] git-tag: tags for "." repository [gittag] git-tag output: BUILD FINISHED Total time: 0.3507 seconds phing-the-things $ git tag 0.0.1 0.1.0

Slide 66

Slide 66 text

Phing All The Things - Omni Adams

Slide 67

Slide 67 text

Phing All The Things - Omni Adams

Slide 68

Slide 68 text

Phing All The Things - Omni Adams ${latest-version}

Slide 69

Slide 69 text

Phing All The Things - Omni Adams

Slide 70

Slide 70 text

Phing All The Things - Omni Adams

Slide 71

Slide 71 text

Phing All The Things - Omni Adams

Slide 72

Slide 72 text

Phing All The Things - Omni Adams

Slide 73

Slide 73 text

Phing All The Things - Omni Adams

Slide 74

Slide 74 text

Phing All The Things - Omni Adams

Slide 75

Slide 75 text

Phing All The Things - Omni Adams

Slide 76

Slide 76 text

Phing All The Things - Omni Adams

Slide 77

Slide 77 text

Phing All The Things - Omni Adams

Slide 78

Slide 78 text

Phing All The Things - Omni Adams Sanity Check

Slide 79

Slide 79 text

Phing All The Things - Omni Adams

Slide 80

Slide 80 text

Phing All The Things - Omni Adams phing-the-things$ phing go-live -Dversion=1.2.3

Slide 81

Slide 81 text

Phing All The Things - Omni Adams phing-the-things$ phing go-live -Dversion=1.2.3

Slide 82

Slide 82 text

Phing All The Things - Omni Adams !$monitored == !$exist

Slide 83

Slide 83 text

Phing All The Things - Omni Adams

Slide 84

Slide 84 text

Phing All The Things - Omni Adams

Slide 85

Slide 85 text

Phing All The Things - Omni Adams

Slide 86

Slide 86 text

Phing All The Things - Omni Adams

Slide 87

Slide 87 text

Phing All The Things - Omni Adams class UpdateNewRelicTask extends Task { protected $version; public function setVersion($version) { $this->version = $version; } }

Slide 88

Slide 88 text

Phing All The Things - Omni Adams

Slide 89

Slide 89 text

Phing All The Things - Omni Adams public function main() { $options = array( CURLOPT_POSTFIELDS => array( 'deployment[application_id]' => $this->appId, 'deployment[description]' => $this->version ), CURLOPT_HTTPHEADER => array( 'x-api-key: ' . $this->apiKey ), CURLOPT_URL => $this->url, ); ... }

Slide 90

Slide 90 text

Phing All The Things - Omni Adams public function main() { ... $ch = curl_init(); curl_setopt_array($ch, $options); curl_exec($ch); curl_close($ch); }

Slide 91

Slide 91 text

Phing All The Things - Omni Adams

Slide 92

Slide 92 text

Phing All The Things - Omni Adams

Slide 93

Slide 93 text

Phing All The Things - Omni Adams •  Omni Adams •  @omnicolor •  http://omni-spot.blogspot.com •  [email protected] •  https://joind.in/11182