Skip to content

Commit

Permalink
Added github workflow action for conftest (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
garethahealy committed Jun 5, 2020
1 parent 8d4e833 commit c93d696
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/conftest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Validate

on: [push, pull_request]

jobs:
conftest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Conftest
uses: redhat-cop/github-actions/confbatstest@master
79 changes: 79 additions & 0 deletions _test/tests.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/usr/bin/env bats

@test "basic-dotnet-core/.openshift" {
run conftest test basic-dotnet-core/.openshift --output tap

[ "$status" -eq 0 ]
}

@test "basic-nginx/.openshift" {
run conftest test basic-nginx/.openshift --output tap

[ "$status" -eq 0 ]
}

@test "basic-spring-boot-tekton/.openshift" {
run conftest test basic-spring-boot-tekton/.openshift --output tap

[ "$status" -eq 0 ]
}

@test "basic-spring-boot/.openshift basic-tomcat/.openshift" {
run conftest test basic-spring-boot/.openshift basic-tomcat/.openshift --output tap

[ "$status" -eq 0 ]
}

@test "blue-green-spring/.openshift" {
run conftest test blue-green-spring/.openshift --output tap

[ "$status" -eq 0 ]
}

@test "cucumber-selenium-grid/applier/projects" {
run conftest test cucumber-selenium-grid/applier/projects --output tap

[ "$status" -eq 0 ]
}

@test "cucumber-selenium-grid/applier/templates" {
run conftest test cucumber-selenium-grid/applier/templates --output tap

[ "$status" -eq 0 ]
}

@test "jenkins-s2i multi-cluster-multi-branch-jee/.openshift" {
run conftest test jenkins-s2i multi-cluster-multi-branch-jee/.openshift --output tap

[ "$status" -eq 0 ]
}

@test "multi-cluster-spring-boot/image-mirror-example/.applier/projects" {
run conftest test multi-cluster-spring-boot/image-mirror-example/.applier/projects --output tap

[ "$status" -eq 0 ]
}

@test "multi-cluster-spring-boot/image-mirror-example/.applier/templates" {
run conftest test multi-cluster-spring-boot/image-mirror-example/.applier/templates --output tap

[ "$status" -eq 0 ]
}

@test "multi-cluster-spring-boot/skopeo-example/.applier/projects" {
run conftest test multi-cluster-spring-boot/skopeo-example/.applier/projects --output tap

[ "$status" -eq 0 ]
}

@test "multi-cluster-spring-boot/skopeo-example/.applier/templates" {
run conftest test multi-cluster-spring-boot/skopeo-example/.applier/templates --output tap

[ "$status" -eq 0 ]
}

@test "secure-spring-boot/.openshift-applier/templates" {
run conftest test secure-spring-boot/.openshift-applier/templates --output tap

[ "$status" -eq 0 ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ objects:
namespace: ${NAMESPACE}
groupNames: null
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: edit
subjects:
- kind: ServiceAccount
Expand Down

0 comments on commit c93d696

Please sign in to comment.