Produced by Araxis Merge on 12/7/2018 11:36:00 AM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\SCRUB\MHED\MHED\VAR 4.10.0\var-resources-release-4.10@1091a011694 | Jenkinsfile-AWS | Thu Oct 18 18:44:32 2018 UTC |
| 2 | C:\MHED-scrubbed\MHED\MHED\VAR 4.10.0\var-resources-release-4.10@1091a011694 | Jenkinsfile-AWS | Fri Dec 7 13:05:22 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 6 | 254 |
| Changed | 6 | 14 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /* | |
| 2 | The AWS en vironment uses a Jen kins decla rative pip eline and executes b uild stage s using | |
| 3 | the Stagin g Cluster via a Kube rnetes age nt defined below. | |
| 4 | ||
| 5 | The yaml d efined und er the Kub ernetes ag ent create s a build pod with m ultiple co ntainers | |
| 6 | that can b e used by any of the build sta ges. For t his build we are usi ng: | |
| 7 | ||
| 8 | - gradle: A custom docker ima ge with gr adle 4.10 pre-instal led in ord er to run the build script | |
| 9 | - docker: An image with docke r used to build the applicatio n image | |
| 10 | - dind-da emon: The docker eng ine used b y the dock er contain er. We use dind to a void using the Kuber netes dock er daemon | |
| 11 | - k8-depl oy: A cust om image w ith kubect l that pul ls credent ails at ru ntime to d eploy to t he cluster . | |
| 12 | The conta iner will look for k ubernetes manifests in the ./k ubernetes/ dir. It w ill also s upport | |
| 13 | variable substituti on in the yaml files following the $ENV_ VAR patter n | |
| 14 | ||
| 15 | */ | |
| 16 | ||
| 17 | pipeline { | |
| 18 | agent { | |
| 19 | kubern etes { | |
| 20 | labe l 'var-res ources-ima ge-build' | |
| 21 | defa ultContain er 'gradle ' | |
| 22 | yaml """ | |
| 23 | apiVersion : v1 | |
| 24 | kind: Pod | |
| 25 | metadata: | |
| 26 | labels: | |
| 27 | image- build: var -resources -v4 | |
| 28 | spec: | |
| 29 | containe rs: | |
| 30 | - name: gradle | |
| 31 | image: uti lity.apps. DOMAIN . EX /base-imag es/gradle: 4.10 | |
| 32 | securi tyContext: | |
| 33 | priv ileged: tr ue | |
| 34 | env: | |
| 35 | - name : DOCKER_H OST | |
| 36 | valu e: tcp://l ocalhost:2 375 | |
| 37 | comman d: | |
| 38 | - cat | |
| 39 | tty: t rue | |
| 40 | - name: docker | |
| 41 | image: docker:1. 12.6 | |
| 42 | env: | |
| 43 | - name : DOCKER_H OST | |
| 44 | valu e: tcp://l ocalhost:2 375 | |
| 45 | comman d: | |
| 46 | - cat | |
| 47 | tty: t rue | |
| 48 | - name: dind-daemo n | |
| 49 | image: uti lity.apps. DOMAIN . EX /base-imag es/map-din d-image:1. 0.1 | |
| 50 | securi tyContext: | |
| 51 | priv ileged: tr ue | |
| 52 | ports: | |
| 53 | - cont ainerPort: 2375 | |
| 54 | volume Mounts: | |
| 55 | - name : docker-g raph-stora ge | |
| 56 | moun tPath: /va r/lib/dock er | |
| 57 | tty: t rue | |
| 58 | - name: k8-deploy | |
| 59 | image: uti lity.apps. DOMAIN . EX /base-imag es/k8-depl oy:1.0.4 | |
| 60 | comman d: | |
| 61 | - cat | |
| 62 | tty: t rue | |
| 63 | imagePul lSecrets: | |
| 64 | - name: map-dtr | |
| 65 | volumes: | |
| 66 | - name: docker-gra ph-storage | |
| 67 | emptyD ir: {} | |
| 68 | """ | |
| 69 | } | |
| 70 | } | |
| 71 | ||
| 72 | environm ent { | |
| 73 | SERV ICE_VERSIO N = '4.6.0 ' | |
| 74 | IMAG E = '/var/ var-resour ces' | |
| 75 | DTR_URL = 'utility.a pps. DOMAIN . EX ' | |
| 76 | DTR_PREFIX = 'utilit y.apps. DOMAIN . EX ' | |
| 77 | DTR_ ORG = '/ba se-images' | |
| 78 | } | |
| 79 | ||
| 80 | ||
| 81 | stages { | |
| 82 | ||
| 83 | stage( 'App Build ') { | |
| 84 | step s { | |
| 85 | wi thCredenti als([strin g(credenti alsId: 'VA _NEXUS_PWD ', variabl e: 'VA_NEX US_PWD'), string(cre dentialsId : 'VA_NEXU S_USER', v ariable: ' VA_NEXUS_U SER'), str ing(creden tialsId: ' MAP_DTR_PW D', variab le: 'MAP_D TR_PWD'), string(cre dentialsId : 'MAP_DTR _USER', va riable: 'M AP_DTR_USE R')]) { | |
| 86 | containe r('gradle' ) { | |
| 87 | sh './ build.sh' | |
| 88 | } | |
| 89 | } | |
| 90 | } | |
| 91 | } | |
| 92 | ||
| 93 | stage( 'Image Bui ld and Pus h') { | |
| 94 | step s { | |
| 95 | wi thCredenti als([strin g(credenti alsId: 'MA P_DTR_PWD' , variable : 'MAP_DTR _PWD'), st ring(crede ntialsId: 'MAP_DTR_U SER', vari able: 'MAP _DTR_USER' )]) { | |
| 96 | containe r('docker' ) { | |
| 97 | sh 'docker login -u $MAP_DTR_U SER -p $MA P_DTR_PWD utility.ap ps. DOMAIN . EX ' | |
| 98 | sh 'cd dist/ && docker bui ld -t $DTR _URL$IMAGE :$SERVICE_ VERSION .' | |
| 99 | sh 'do cker push $DTR_URL$I MAGE:$SERV ICE_VERSIO N' | |
| 100 | } | |
| 101 | } | |
| 102 | } | |
| 103 | } | |
| 104 | ||
| 105 | stage( 'Deploy to Staging') { | |
| 106 | ||
| 107 | en vironment { | |
| 108 | K8_API_A DDR = 'htt ps://inter nal-stagin g-kube-api -336601082 .us-gov-we st-1.elb.a mazonaws.c om:6443' | |
| 109 | VAMF_ENV IRONMENT = 'map-stag ing' | |
| 110 | VAULT_AD DR = 'http ://ip-172- 16-2-10.us -gov-west- 1.compute. internal:8 200' | |
| 111 | CONSUL_A DDR = 'ip- 172-16-2-1 1.us-gov-w est-1.comp ute.intern al:8500' | |
| 112 | SECRET_P ATH = 'sec ret/map-st aging/depl oy' | |
| 113 | CONSUL_P ATH = 'app config/map -staging/d eploy' | |
| 114 | NAMESPAC E = 'defau lt' | |
| 115 | } | |
| 116 | ||
| 117 | st eps { | |
| 118 | withCred entials([s tring(cred entialsId: 'CONSUL_M ASTER_TOKE N', variab le: 'CONSU L_TOKEN')] ) { | |
| 119 | cont ainer('k8- deploy') { | |
| 120 | sh 'echo " Deploying $DTR_URL$I MAGE:$VERS ION"' | |
| 121 | sh '/entry point.sh' | |
| 122 | } | |
| 123 | } | |
| 124 | } | |
| 125 | } | |
| 126 | ||
| 127 | } | |
| 128 | ||
| 129 | post { | |
| 130 | always { | |
| 131 | clea nWs() /* c lean up ou r workspac e */ | |
| 132 | } | |
| 133 | } | |
| 134 | }TTTTTT |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.