get.porter.sh/porter@v1.3.0/tests/testdata/mybuns/porter.yaml (about) 1 # This is a test bundle that makes no logical sense, but it does exercise lots of different bundle features 2 schemaType: Bundle 3 schemaVersion: 1.0.1 4 name: mybuns 5 version: 0.1.2 6 description: "A very thorough test bundle" 7 registry: localhost:5000 8 dockerfile: Dockerfile.tmpl 9 10 maintainers: 11 - name: "John Doe" 12 email: "john.doe@example.com" 13 url: "https://example.com/a" 14 - name: "Jane Doe" 15 url: "https://example.com/b" 16 - name: "Janine Doe" 17 email: "janine.doe@example.com" 18 - email: "mike.doe@example.com" 19 url: "https://example.com/c" 20 21 custom: 22 app: 23 version: 1.2.3 24 foo: 25 test1: true 26 test2: 1 27 test3: value 28 test4: 29 - one 30 - two 31 - three 32 test5: 33 1: one 34 two: two 35 36 required: 37 - docker 38 39 credentials: 40 - name: username 41 description: "The name you want on the audit log" 42 env: ROOT_USERNAME 43 required: false 44 - name: password 45 path: /tmp/password 46 applyTo: 47 - boom 48 49 parameters: 50 - name: log_level 51 description: "How unhelpful would you like the logs to be?" 52 type: integer 53 minimum: 1 54 maximum: 11 55 default: 5 56 - name: password 57 description: "The super secret data" 58 type: string 59 default: "default-secret" 60 sensitive: true 61 - name: mysql-connstr 62 type: string 63 default: "" # Setting a default so that this isn't required for install 64 source: 65 dependency: db 66 output: connstr 67 - name: chaos_monkey 68 description: "Set to true to make the bundle fail" 69 type: boolean 70 default: false 71 - name: tfstate 72 type: file 73 path: /cnab/app/tfstate 74 source: 75 output: tfstate 76 applyTo: 77 - upgrade 78 - uninstall 79 - name: cfg 80 description: "A json config file" 81 type: file 82 default: '' 83 path: buncfg.json 84 - name: ainteger 85 type: integer 86 default: 1 87 minimum: 0 88 maximum: 10 89 - name: anumber 90 type: number 91 default: 0.5 # This is a regression test that we can both build and push a bundle that uses numeric types 92 exclusiveMinimum: 0 93 exclusiveMaximum: 1 94 - name: astringenum 95 type: string 96 default: blue 97 enum: 98 - blue 99 - red 100 - purple 101 - pink 102 - name: astring 103 type: string 104 minLength: 1 105 maxLength: 10 106 default: 'boop!' 107 - name: aboolean 108 type: boolean 109 default: true 110 - name: installonly 111 type: boolean 112 default: false 113 applyTo: 114 - install 115 - name: sensitive 116 type: string 117 sensitive: true 118 default: "passw0rd123" 119 - name: jsonobject 120 type: string 121 default: '"myobject": { 122 "foo": "true", 123 "bar": [ 124 1, 125 2, 126 3 127 ] 128 }' 129 - name: afile 130 type: file 131 default: '' 132 path: /home/nonroot/.kube/config 133 - name: notype-file 134 default: '' 135 path: /cnab/app/config.toml 136 - name: notype-string 137 default: '' 138 139 outputs: 140 - name: msg 141 type: string 142 default: "" 143 applyTo: 144 - install 145 - upgrade 146 - uninstall 147 - name: connStr 148 $id: "porter.sh/interfaces/mysql.connection-string" 149 default: "" 150 applyTo: 151 - install 152 - name: mylogs 153 applyTo: 154 - install 155 - upgrade 156 - name: result 157 applyTo: 158 - install 159 - upgrade 160 sensitive: true 161 - name: tfstate 162 type: file 163 path: /cnab/app/tfstate 164 applyTo: 165 - install 166 - upgrade 167 - uninstall 168 169 state: 170 - name: magic_file 171 path: magic.txt 172 173 dependencies: 174 requires: 175 - name: db 176 bundle: 177 reference: "localhost:5000/mydb:v0.1.0" 178 parameters: 179 database: bigdb 180 181 images: 182 whalesayd: 183 description: "Whalesay as a service" 184 imageType: "docker" 185 repository: carolynvs/whalesayd 186 tag: "latest" 187 188 mixins: 189 - exec 190 - testmixin: 191 clientVersion: 1.2.3 192 193 customActions: 194 dry-run: 195 description: "Make sure it will work before you run it" 196 stateless: true 197 modifies: false 198 status: 199 description: "Print the installation status" 200 stateless: false 201 modifies: false 202 203 install: 204 - exec: 205 description: "Check the docker socket" 206 command: stat 207 arguments: 208 - /var/run/docker.sock 209 - exec: 210 description: "Let's make some magic" 211 command: ./helpers.sh 212 arguments: 213 - makeMagic 214 - "${ bundle.credentials.username } is a unicorn with ${ bundle.parameters.password } secret." 215 - exec: 216 description: "install" 217 command: ./helpers.sh 218 arguments: 219 - install 220 outputs: 221 - name: mylogs 222 regex: "(.*)" 223 - exec: 224 description: "roll the dice with your chaos monkey" 225 command: ./helpers.sh 226 arguments: 227 - chaos_monkey 228 - ${ bundle.parameters.chaos_monkey } 229 outputs: 230 - name: result 231 regex: "(.*)" 232 233 dry-run: 234 - exec: 235 description: "Check some things" 236 command: echo 237 arguments: 238 - "All clear!" 239 240 status: 241 - exec: 242 description: "Print config" 243 command: cat 244 arguments: 245 - ${ bundle.parameters.cfg } 246 - exec: 247 description: "Print magic" 248 command: cat 249 arguments: 250 - magic.txt 251 252 boom: 253 - exec: 254 description: "modify the bundle in unknowable ways" 255 command: echo 256 arguments: 257 - "YOLO" 258 259 upgrade: 260 - exec: 261 description: "Ensure magic" 262 command: ./helpers.sh 263 arguments: 264 - ensureMagic 265 - exec: 266 description: "upgrade" 267 command: ./helpers.sh 268 arguments: 269 - upgrade 270 - ${ bundle.outputs.msg } 271 outputs: 272 - name: mylogs 273 regex: "(.*)" 274 - exec: 275 description: "roll the dice with your chaos monkey" 276 command: ./helpers.sh 277 arguments: 278 - chaos_monkey 279 - ${ bundle.parameters.chaos_monkey } 280 outputs: 281 - name: result 282 regex: "(.*)" 283 284 uninstall: 285 - exec: 286 description: "Ensure Magic" 287 command: ./helpers.sh 288 arguments: 289 - ensureMagic 290 - exec: 291 description: "uninstall" 292 command: ./helpers.sh 293 arguments: 294 - uninstall 295 - ${ bundle.outputs.msg } 296 - exec: 297 description: "roll the dice with your chaos monkey" 298 command: ./helpers.sh 299 arguments: 300 - chaos_monkey 301 - ${ bundle.parameters.chaos_monkey }