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

DO NOT MERGE - update to test builds #909

Closed
wants to merge 3 commits into from
Closed
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
40 changes: 40 additions & 0 deletions .tekton/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,46 @@ spec:
secretName: redhat-appstudio-tekton-catalog-build-definitions-pull-secret
workspaces:
- name: source
- name: build-acceptable-bundles
runAfter:
- build-bundles
workspaces:
- name: artifacts
workspace: workspace
taskSpec:
workspaces:
- name: artifacts
description: Workspace containing arbitrary artifacts used during the task run.
volumes:
- name: quay-secret
secret:
secretName: redhat-appstudio-tekton-catalog-build-definitions-pull-secret
steps:
- name: build-bundles
image: quay.io/redhat-appstudio/appstudio-utils:{{ revision }}
workingDir: $(workspaces.artifacts.path)/source
env:
- name: REVISION
value: "$(params.revision)"
- name: GIT_URL
value: "$(params.git-url)"
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent
# also per direction from Ralph Bean, we want to use image digest based tags to use a cue to automation like dependabot or renovatebot to periodially submit pull requests that update the digest as new images are released.
script: |-
#!/usr/bin/env bash

export BUNDLES=(
$(workspaces.artifacts.path)/source/task-bundle-list
$(workspaces.artifacts.path)/source/pipeline-bundle-list
)

.tekton/scripts/build-acceptable-bundles.sh

volumeMounts:
- mountPath: /root/.docker/config.json
subPath: .dockerconfigjson
name: quay-secret
- name: e2e-tests
params:
- name: e2e_test_namespace
Expand Down
1 change: 1 addition & 0 deletions .tekton/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ spec:
steps:
- name: build-bundles
image: quay.io/redhat-appstudio/appstudio-utils:{{ revision }}
workingDir: $(workspaces.artifacts.path)/source
env:
- name: REVISION
value: "$(params.revision)"
Expand Down
22 changes: 12 additions & 10 deletions .tekton/scripts/build-acceptable-bundles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ fi
BUNDLES_PARAM=($(cat ${BUNDLES[@]} | awk '{ print "--bundle=" $0 }'))

PARAMS=("${TASK_PARAM[@]}" "${BUNDLES_PARAM[@]}")
ec track bundle --debug \
--input "oci:${DATA_BUNDLE_REPO}:latest" \
--output "oci:${DATA_BUNDLE_REPO}:${TAG}" \
--timeout "15m0s" \
--freshen \
--prune \
${PARAMS[@]}

# To facilitate usage in some contexts, tag the image with the floating "latest" tag.
skopeo copy "docker://${DATA_BUNDLE_REPO}:${TAG}" "docker://${DATA_BUNDLE_REPO}:latest"

echo ${PARAMS[@]}
# ec track bundle --debug \
# --input "oci:${DATA_BUNDLE_REPO}:latest" \
# --output "oci:${DATA_BUNDLE_REPO}:${TAG}" \
# --timeout "15m0s" \
# --freshen \
# --prune \
# ${PARAMS[@]}

# # To facilitate usage in some contexts, tag the image with the floating "latest" tag.
# skopeo copy "docker://${DATA_BUNDLE_REPO}:${TAG}" "docker://${DATA_BUNDLE_REPO}:latest"