get.porter.sh/porter@v1.3.0/tests/integration/testdata/bundles/exec-outputs/porter.yaml (about) 1 schemaVersion: 1.0.0-alpha.1 2 name: exec-outputs 3 version: 0.2.0 4 description: "An example Porter bundle demonstrating exec mixin outputs" 5 registry: ghcr.io/getporter 6 dockerfile: Dockerfile.tmpl 7 8 mixins: 9 - exec 10 11 parameters: 12 - name: kubeconfig 13 type: file 14 applyTo: 15 - add-user 16 - get-users 17 - test 18 - uninstall 19 path: /home/nonroot/.kube/config 20 source: 21 output: kubeconfig 22 - name: users.json 23 type: file 24 applyTo: 25 - add-user 26 - get-users 27 path: /cnab/app/users.json 28 source: 29 output: users.json 30 - name: username 31 type: string 32 default: wei 33 applyTo: 34 - add-user 35 36 install: 37 - exec: 38 description: "Create the kubeconfig" 39 command: ./cluster.sh 40 arguments: 41 - create-cluster 42 - exec: 43 description: "Create users file" 44 command: ./cluster.sh 45 arguments: 46 - generate-users 47 outputs: 48 - name: admin 49 jsonPath: "$.users[0]" 50 - exec: 51 description: "Use a step-level output" 52 command: echo 53 arguments: 54 - "The admin user is: {{ bundle.outputs.admin }}" 55 56 add-user: 57 - exec: 58 description: "Edit a bundle-level output passed in as a parameter" 59 command: ./cluster.sh 60 arguments: 61 - add-user 62 - "{{ bundle.parameters.username }}" 63 64 # normally, test would not persist a run because of how the customActions is configured, but it has a bundle level output so it will be recorded 65 customActions: 66 test: 67 stateless: true 68 modifies: false 69 70 test: 71 - exec: 72 description: "Scrape stdout with regex" 73 command: ./run-tests.sh 74 outputs: 75 - name: failed-tests 76 regex: '--- FAIL: (.*) \(.*\)' 77 78 get-users: 79 - exec: 80 description: "Parse stdout with jsonPath" 81 command: ./cluster.sh 82 arguments: 83 - dump-users 84 outputs: 85 - name: user-names 86 jsonPath: '$.users' 87 88 uninstall: 89 - exec: 90 description: "Uninstall bundle" 91 command: ./cluster.sh 92 arguments: 93 - uninstall 94 95 outputs: 96 - name: users.json 97 type: file 98 path: /cnab/app/users.json 99 applyTo: 100 - install 101 - add-user 102 - name: failed-tests 103 type: string 104 applyTo: 105 - test 106 - name: user-names 107 type: string 108 applyTo: 109 - get-users 110 - name: kubeconfig 111 type: file 112 path: /home/nonroot/.kube/config 113 applyTo: 114 - install