Skip to content

Commit

Permalink
Update pull-request.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
tnevrlka committed Nov 14, 2024
1 parent c4ef107 commit df0405c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .tekton/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,22 @@ spec:
name: e2e-test
# Added a timeout due to https://issues.redhat.com/browse/STONEBLD-2265
timeout: "2h"
- name: create-repositories-if-missing
runAfter:
- build-bundles
taskSpec:
steps:
- name: run-check-repos
image: quay.io/konflux-ci/pull-request-builds:appstudio-utils-{{revision}}
workingDir: $(workspaces.source.path)/source
script: |
#!/usr/bin/env bash
.tekton/scripts/check-task-pipeline-bundle-repos.sh
workspaces:
- name: source
workspaces:
- name: source
workspace: workspace
- name: ec-task-checks
runAfter:
- fetch-repository
Expand Down
11 changes: 5 additions & 6 deletions .tekton/scripts/check-task-pipeline-bundle-repos.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/bash

set -o errexit
set -o pipefail
set -o nounset
#set -o errexit
#set -o pipefail
#set -o nounset

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPTDIR/../.."
Expand All @@ -25,15 +25,14 @@ locate_in_all_namespaces() {

local rc=0

echo "Missing $type bundle repo: ${quay_namespace}/${type}-${object}, creating..."
for quay_namespace in "${CATALOG_NAMESPACES[@]}"; do
found=$(locate_bundle_repo "$quay_namespace" "$type" "$object")
if [ "$found" != "200" ]; then
echo "Missing $type bundle repo: ${quay_namespace}/${type}-${object}, creating..."
echo "DEBUG: Creating quay repository https://quay.io/${quay_namespace}/tekton-catalog/${object}..."
echo "DEBUG: Creating quay repository https://quay.io/${quay_namespace}/tekton-catalog/${type}-${object}..."
# curl --oauth2-bearer "${QUAY_TOKEN}" 'https://quay.io/api/v1/repository' --json '{
# "namespace": '"${quay_namespace}"',
# "repository": "tekton-catalog/'"${object}"'",
# "repository": "tekton-catalog/'"${type}-${object}"'",
# "visibility": "public",
# "description": ""
# }'
Expand Down

0 comments on commit df0405c

Please sign in to comment.