Skip to content

Commit

Permalink
make test
Browse files Browse the repository at this point in the history
  • Loading branch information
day0hero committed Jul 18, 2023
1 parent 1640f02 commit 4349c03
Show file tree
Hide file tree
Showing 10 changed files with 215 additions and 30 deletions.
48 changes: 42 additions & 6 deletions tests/region-cosign-industrial-edge-factory.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
---
# Source: cosign/templates/rbac/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cosign-sa
namespace: openshift-pipelines
annotations: {}
---
# Source: cosign/templates/cosign-cm-script.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: create-cosign-pubkey
namespace: openshift-pipelines
data:
cosign.sh: |
#!/bin/bash
# check for signing-secrets in openshift-pipelines
SECRET=$(oc get secret signing-secrets -n openshift-pipelines)
if [[ $? -ne 0 ]]
then
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign generate-key-pair k8s://openshift-pipelines/signing-secrets --output-file /tmp/cosign.pub
oc create secret generic cosign-pubkey --from-file=/tmp/cosign.pub
else
echo "the signing-secrets secret exists in openshift-pipelines"
fi
---
# Source: cosign/templates/rbac/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -19,6 +47,7 @@ rules:
- patch
- create
- update
- delete
---
# Source: cosign/templates/rbac/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -31,7 +60,7 @@ metadata:
argocd.argoproj.io/sync-wave: "-15"
subjects:
- kind: ServiceAccount
name: pipelines
name: cosign-sa
namespace: openshift-pipelines
apiGroup: ""
roleRef:
Expand All @@ -56,14 +85,21 @@ spec:
- /bin/bash
- -c
- |
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign key-generate k8s://openshift-pipelines/signing-secrets
oc create secret generic cosign-pubkey --from-file=cosign.pub
'/tmp/cosign.sh'
name: create-cosign-pubkey
volumeMounts:
- mountPath: /tmp/cosign.sh
name: cosign
subPath: cosign.sh
volumes:
- name: cosign
configMap:
name: create-cosign-pubkey
defaultMode: 0755
dnsPolicy: ClusterFirst
restartPolicy: Never
serviceAccount: pipeline
serviceAccountName: pipeline
serviceAccount: cosign-sa
serviceAccountName: cosign-sa
terminationGracePeriodSeconds: 60
---
# Source: cosign/templates/buildconfig.yaml
Expand Down
48 changes: 42 additions & 6 deletions tests/region-cosign-industrial-edge-hub.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
---
# Source: cosign/templates/rbac/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cosign-sa
namespace: openshift-pipelines
annotations: {}
---
# Source: cosign/templates/cosign-cm-script.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: create-cosign-pubkey
namespace: openshift-pipelines
data:
cosign.sh: |
#!/bin/bash
# check for signing-secrets in openshift-pipelines
SECRET=$(oc get secret signing-secrets -n openshift-pipelines)
if [[ $? -ne 0 ]]
then
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign generate-key-pair k8s://openshift-pipelines/signing-secrets --output-file /tmp/cosign.pub
oc create secret generic cosign-pubkey --from-file=/tmp/cosign.pub
else
echo "the signing-secrets secret exists in openshift-pipelines"
fi
---
# Source: cosign/templates/rbac/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -19,6 +47,7 @@ rules:
- patch
- create
- update
- delete
---
# Source: cosign/templates/rbac/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -31,7 +60,7 @@ metadata:
argocd.argoproj.io/sync-wave: "-15"
subjects:
- kind: ServiceAccount
name: pipelines
name: cosign-sa
namespace: openshift-pipelines
apiGroup: ""
roleRef:
Expand All @@ -56,14 +85,21 @@ spec:
- /bin/bash
- -c
- |
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign key-generate k8s://openshift-pipelines/signing-secrets
oc create secret generic cosign-pubkey --from-file=cosign.pub
'/tmp/cosign.sh'
name: create-cosign-pubkey
volumeMounts:
- mountPath: /tmp/cosign.sh
name: cosign
subPath: cosign.sh
volumes:
- name: cosign
configMap:
name: create-cosign-pubkey
defaultMode: 0755
dnsPolicy: ClusterFirst
restartPolicy: Never
serviceAccount: pipeline
serviceAccountName: pipeline
serviceAccount: cosign-sa
serviceAccountName: cosign-sa
terminationGracePeriodSeconds: 60
---
# Source: cosign/templates/buildconfig.yaml
Expand Down
48 changes: 42 additions & 6 deletions tests/region-cosign-medical-diagnosis-hub.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
---
# Source: cosign/templates/rbac/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cosign-sa
namespace: openshift-pipelines
annotations: {}
---
# Source: cosign/templates/cosign-cm-script.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: create-cosign-pubkey
namespace: openshift-pipelines
data:
cosign.sh: |
#!/bin/bash
# check for signing-secrets in openshift-pipelines
SECRET=$(oc get secret signing-secrets -n openshift-pipelines)
if [[ $? -ne 0 ]]
then
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign generate-key-pair k8s://openshift-pipelines/signing-secrets --output-file /tmp/cosign.pub
oc create secret generic cosign-pubkey --from-file=/tmp/cosign.pub
else
echo "the signing-secrets secret exists in openshift-pipelines"
fi
---
# Source: cosign/templates/rbac/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -19,6 +47,7 @@ rules:
- patch
- create
- update
- delete
---
# Source: cosign/templates/rbac/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -31,7 +60,7 @@ metadata:
argocd.argoproj.io/sync-wave: "-15"
subjects:
- kind: ServiceAccount
name: pipelines
name: cosign-sa
namespace: openshift-pipelines
apiGroup: ""
roleRef:
Expand All @@ -56,14 +85,21 @@ spec:
- /bin/bash
- -c
- |
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign key-generate k8s://openshift-pipelines/signing-secrets
oc create secret generic cosign-pubkey --from-file=cosign.pub
'/tmp/cosign.sh'
name: create-cosign-pubkey
volumeMounts:
- mountPath: /tmp/cosign.sh
name: cosign
subPath: cosign.sh
volumes:
- name: cosign
configMap:
name: create-cosign-pubkey
defaultMode: 0755
dnsPolicy: ClusterFirst
restartPolicy: Never
serviceAccount: pipeline
serviceAccountName: pipeline
serviceAccount: cosign-sa
serviceAccountName: cosign-sa
terminationGracePeriodSeconds: 60
---
# Source: cosign/templates/buildconfig.yaml
Expand Down
48 changes: 42 additions & 6 deletions tests/region-cosign-naked.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
---
# Source: cosign/templates/rbac/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cosign-sa
namespace: openshift-pipelines
annotations: {}
---
# Source: cosign/templates/cosign-cm-script.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: create-cosign-pubkey
namespace: openshift-pipelines
data:
cosign.sh: |
#!/bin/bash
# check for signing-secrets in openshift-pipelines
SECRET=$(oc get secret signing-secrets -n openshift-pipelines)
if [[ $? -ne 0 ]]
then
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign generate-key-pair k8s://openshift-pipelines/signing-secrets --output-file /tmp/cosign.pub
oc create secret generic cosign-pubkey --from-file=/tmp/cosign.pub
else
echo "the signing-secrets secret exists in openshift-pipelines"
fi
---
# Source: cosign/templates/rbac/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -19,6 +47,7 @@ rules:
- patch
- create
- update
- delete
---
# Source: cosign/templates/rbac/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -31,7 +60,7 @@ metadata:
argocd.argoproj.io/sync-wave: "-15"
subjects:
- kind: ServiceAccount
name: pipelines
name: cosign-sa
namespace: openshift-pipelines
apiGroup: ""
roleRef:
Expand All @@ -56,14 +85,21 @@ spec:
- /bin/bash
- -c
- |
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign key-generate k8s://openshift-pipelines/signing-secrets
oc create secret generic cosign-pubkey --from-file=cosign.pub
'/tmp/cosign.sh'
name: create-cosign-pubkey
volumeMounts:
- mountPath: /tmp/cosign.sh
name: cosign
subPath: cosign.sh
volumes:
- name: cosign
configMap:
name: create-cosign-pubkey
defaultMode: 0755
dnsPolicy: ClusterFirst
restartPolicy: Never
serviceAccount: pipeline
serviceAccountName: pipeline
serviceAccount: cosign-sa
serviceAccountName: cosign-sa
terminationGracePeriodSeconds: 60
---
# Source: cosign/templates/buildconfig.yaml
Expand Down
48 changes: 42 additions & 6 deletions tests/region-cosign-normal.expected.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
---
# Source: cosign/templates/rbac/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cosign-sa
namespace: openshift-pipelines
annotations: {}
---
# Source: cosign/templates/cosign-cm-script.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: create-cosign-pubkey
namespace: openshift-pipelines
data:
cosign.sh: |
#!/bin/bash
# check for signing-secrets in openshift-pipelines
SECRET=$(oc get secret signing-secrets -n openshift-pipelines)
if [[ $? -ne 0 ]]
then
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign generate-key-pair k8s://openshift-pipelines/signing-secrets --output-file /tmp/cosign.pub
oc create secret generic cosign-pubkey --from-file=/tmp/cosign.pub
else
echo "the signing-secrets secret exists in openshift-pipelines"
fi
---
# Source: cosign/templates/rbac/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -19,6 +47,7 @@ rules:
- patch
- create
- update
- delete
---
# Source: cosign/templates/rbac/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -31,7 +60,7 @@ metadata:
argocd.argoproj.io/sync-wave: "-15"
subjects:
- kind: ServiceAccount
name: pipelines
name: cosign-sa
namespace: openshift-pipelines
apiGroup: ""
roleRef:
Expand All @@ -56,14 +85,21 @@ spec:
- /bin/bash
- -c
- |
export COSIGN_PASSWORD=$(openssl rand -base64 32)
cosign key-generate k8s://openshift-pipelines/signing-secrets
oc create secret generic cosign-pubkey --from-file=cosign.pub
'/tmp/cosign.sh'
name: create-cosign-pubkey
volumeMounts:
- mountPath: /tmp/cosign.sh
name: cosign
subPath: cosign.sh
volumes:
- name: cosign
configMap:
name: create-cosign-pubkey
defaultMode: 0755
dnsPolicy: ClusterFirst
restartPolicy: Never
serviceAccount: pipeline
serviceAccountName: pipeline
serviceAccount: cosign-sa
serviceAccountName: cosign-sa
terminationGracePeriodSeconds: 60
---
# Source: cosign/templates/buildconfig.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ metadata:
namespace: openshift-pipelines
annotations:
argocd.argoproj.io/sync-options: PruneLast=true
argocd.argoproj.io/sync-options: ServerSideApply=true
data:
artifacts.oci.storage: 'oci'
artifacts.taskrun.format: tekton
Expand Down
Loading

0 comments on commit 4349c03

Please sign in to comment.