Skip to content

Commit

Permalink
Updates flags in pipeline and migrates test-cases into pipeline direc…
Browse files Browse the repository at this point in the history
…tory
  • Loading branch information
rewanthtammana committed Sep 30, 2019
1 parent 18cc188 commit 9f59cc4
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .pipeline/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ steps:
- cd $GOPATH/src/order
- apk add git
- go get ./...
- go build -o /order/order_exe .pipeline/test.go
- go build -o /order/order_exe main.go
- /order/order_exe -h

- name: running test cases
Expand All @@ -32,36 +32,36 @@ steps:
- name: repo
path: /order/
commands:
- mv /order/order_exe /usr/bin/order # Move executable to global PATH
- mv /order/order_exe /usr/bin/kubectl-fields # Move executable to global PATH

- cd /order
- cd /order/.pipeline

# kubectl explain --recursive po.spec | order capa
- cat test-cases/po.spec.txt | order capa > /tmp/po.spec_capa.sol
- cat test-cases/po.spec.txt | kubectl-fields --stdin capa > /tmp/po.spec_capa.sol
- diff /tmp/po.spec_capa.sol test-cases/po.spec_capa.sol

# kubectl explain --recursive configMap.metadata.initializers | order -i uid
- cat test-cases/configMap.metadata.initializers.txt | order -i uid > /tmp/configMap.metadata.initializers_uid_i.sol
- cat test-cases/configMap.metadata.initializers.txt | kubectl-fields --stdin -i uid > /tmp/configMap.metadata.initializers_uid_i.sol
- diff /tmp/configMap.metadata.initializers_uid_i.sol test-cases/configMap.metadata.initializers_uid_i.sol

# kubectl explain --recursive ingress.spec.rules | order service
- cat test-cases/ingress.spec.rules.txt | order service > /tmp/ingress.spec.rules_service.sol
- cat test-cases/ingress.spec.rules.txt | kubectl-fields --stdin service > /tmp/ingress.spec.rules_service.sol
- diff /tmp/ingress.spec.rules_service.sol test-cases/ingress.spec.rules_service.sol

# kubectl explain --recursive po | order ver
- cat test-cases/po.txt | order ver > /tmp/po_ver.sol
- cat test-cases/po.txt | kubectl-fields --stdin ver > /tmp/po_ver.sol
- diff /tmp/po_ver.sol test-cases/po_ver.sol

# kubectl explain --recursive svc.spec | order -i port
- cat test-cases/svc.spec.txt | order -i port > /tmp/svc.spec_port_i.sol
- cat test-cases/svc.spec.txt | kubectl-fields --stdin -i port > /tmp/svc.spec_port_i.sol
- diff /tmp/svc.spec_port_i.sol test-cases/svc.spec_port_i.sol

# kubectl explain --recursive svc | order -i ip
- cat test-cases/svc.txt | order -i ip > /tmp/svc_ip_i.sol
- cat test-cases/svc.txt | kubectl-fields --stdin -i ip > /tmp/svc_ip_i.sol
- diff /tmp/svc_ip_i.sol test-cases/svc_ip_i.sol

# kubectl explain daemonsets.spec.template --recursive | order -i secretref
- cat test-cases/daemonsets.spec.template.txt | order -i secretref > /tmp/daemonsets.spec.template_secretref_i.sol
- cat test-cases/daemonsets.spec.template.txt | kubectl-fields --stdin -i secretref > /tmp/daemonsets.spec.template_secretref_i.sol
- diff /tmp/daemonsets.spec.template_secretref_i.sol test-cases/daemonsets.spec.template_secretref_i.sol

- echo "Everything looks great"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9f59cc4

Please sign in to comment.