Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rh-push-to-registry-redhat-io tests #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ kind: Application
metadata:
name: rh-push-to-registry-redhat-iotest
spec:
description: AppStudio
displayName: AppStudio
description: rh-push-to-registry-redhat-iotest
displayName: rh-push-to-registry-redhat-iotest
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: appstudio.redhat.com/v1alpha1
kind: BuildPipelineSelector
metadata:
name: build-pipeline-selector
namespace: dev-release-team-tenant
spec:
selectors:
- name: Docker build
pipelineRef:
bundle: >-
quay.io/redhat-appstudio-tekton-catalog/pipeline-docker-build:eb5492a82d57efe60d00d41ddb0798f6b34fab2e
name: docker-build
when:
dockerfile: true
pipelineParams:
- name: build-source-image
value: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ kind: Component
metadata:
name: rh-push-to-registry-redhat-iotest-component
annotations:
pipelinesascode: '1'
image.redhat.com/generate: 'true'
spec:
application: rh-push-to-registry-redhat-iotest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ spec:
Includes rules for levels 1, 2 & 3 of SLSA v0.1.
publicKey: "k8s://openshift-pipelines/public-key"
sources:
- name: Default
- data:
- github.com/release-engineering/rhtap-ec-policy//data
- oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest
name: Default
policy:
- github.com/enterprise-contract/ec-policies//policy/lib
- github.com/enterprise-contract/ec-policies//policy/release
data:
- github.com/release-engineering/rhtap-ec-policy//data
configuration:
include:
- '@slsa1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ spec:
value: pipelines/rh-push-to-registry-redhat-io/rh-push-to-registry-redhat-io.yaml
resolver: "git"
policy: rh-push-to-registry-redhat-io-test-policy
serviceAccount: release-service-account
serviceAccount: rh-push-to-registry-redhat-io-sa
data:
pyxis:
server: stage
secret: pyxis
images:
addGitShaTag: true
tagPrefix: "rh-product-prefix"
mapping:
components:
- name: rh-push-to-registry-redhat-iotest-component
repository: quay.io/hacbs-release-tests/rh-push-to-registry-redhat-iotest-component
repository: quay.io/redhat-pending/rhtap----rh-push-to-registry-redhat-iotest-component
sign:
configMapName: hacbs-signing-pipeline-config-redhatrelease2
5 changes: 5 additions & 0 deletions rh-push-to-registry-redhat-io/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ APPLICATION_NAME="rh-push-to-registry-redhat-iotest"
COMPONENT_NAME="rh-push-to-registry-redhat-iotest-component"
RELEASE_PLAN_NAME="rh-push-to-registry-redhat-io-test-rp"
RELEASE_PLAN_ADMISSION_NAME="rh-push-to-registry-redhat-io-test-rpa"
BUILD_PIPELINE_SELECTOR_NAME="rh-push-to-registry-redhat-io-build-pipeline-selector"
TIMEOUT_SECONDS=600

DEV_WORKSPACE="dev-release-team"
Expand Down Expand Up @@ -39,6 +40,9 @@ print_help(){

function setup() {

echo "Creating BuildPipelineSelector"
kubectl apply -f release-resources/buildpipelineselector.yaml "${DEV_KUBECONFIG_ARG}"

echo "Creating Application"
kubectl apply -f release-resources/application.yaml "${DEV_KUBECONFIG_ARG}"

Expand All @@ -62,6 +66,7 @@ function teardown() {
kubectl delete pr -l "appstudio.openshift.io/application=$APPLICATION_NAME,pipelines.appstudio.openshift.io/type=release" "${MANAGED_KUBECONFIG_ARG}"
kubectl delete release "${DEV_KUBECONFIG_ARG}" -o=jsonpath="{.items[?(@.spec.releasePlan==\"$RELEASE_PLAN_NAME\")].metadata.name}"
kubectl delete releaseplanadmission "$RELEASE_PLAN_ADMISSION_NAME" "${MANAGED_KUBECONFIG_ARG}"
kubectl delete buildpipelineselector "${BUILD_PIPELINE_SELECTOR_NAME}" "${DEV_KUBECONFIG_ARG}"

if kubectl get application "$APPLICATION_NAME" "${DEV_KUBECONFIG_ARG}" &> /dev/null; then
echo "Application $APPLICATION_NAME exists. Deleting..."
Expand Down