Skip to content

Commit

Permalink
Merge pull request opendatahub-io#348 from HumairAK/stable
Browse files Browse the repository at this point in the history
Add v1.2.2 to Stable
  • Loading branch information
openshift-merge-robot authored Sep 18, 2023
2 parents 21d05a5 + 2de2142 commit 6e215a5
Show file tree
Hide file tree
Showing 35 changed files with 1,181 additions and 208 deletions.
91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Bug Report
description: File a bug report.
title: "[Bug]: "
labels: ["kind/bug", "priority/normal"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please, fill this form to help us improve the project.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: dropdown
id: deploy-type
attributes:
label: Deploy type
description: |
How did you deploy DSPO?
multiple: false
options:
- Standalone DSPO (without ODH)
- Manually deployed Kfdef
- ODH Dashboard UI
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: |
If using ODH, please provide the ODH version.
If using standalone DSPO, please provide the tag version
used for this repo, or state "main" if deploying
directly from main branch.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: Describe your environment.
placeholder: |
* Python Version (if relevant):
* SDK Version (if relevant):
* OCP Pipelines Version:
* OCP Version:
validations:
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
- type: textarea
id: workaround
attributes:
label: Workaround (if any)
description: Any manual steps that allow you to resolve the issue
placeholder: Tell us the steps you followed to resolve the issue!
validations:
required: false
- type: textarea
id: anything-else
attributes:
label: Anything else
description: |
Any additional information you'd like to share
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature request
description: Suggest an idea for this project.
title: "[Feature Request]: "
labels: ["kind/enhancement", "priority/normal"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request! Please, fill this form to help us improve the project.
- type: textarea
id: description
attributes:
label: Feature description
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: describe-alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
placeholder: Tell us about alternatives you've considered...
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Add any other context or screenshots about the feature request here.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## The issue resolved by this Pull Request:
Resolves #<issue_number>

## Description of your changes:
<!--- This PR will be merged by any repository approver when it meets all the points in the checklist -->
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->

## Testing instructions
<!--- Add any information that testers/qe should be aware of when testing this PR. Examples include what components
to focus on, or what features are likely to be affected. -->

## Checklist
- [ ] The commits are squashed in a cohesive manner and have meaningful messages.
- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
- [ ] The developer has manually tested the changes and verified that the changes work
63 changes: 63 additions & 0 deletions .github/actions/build/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "Create a podman build"
description: "This workflow can be used to create a podman build and push to quay.io from source branches."
inputs:
IMAGE_REPO:
description: "Quay image repo name."
required: true
DOCKERFILE:
description: "Path to Dockerfile."
required: true
GH_REPO:
description: "GH org/repo that contains the dockerfile to source."
required: true
OVERWRITE:
default: "false"
description: "GH org/repo that contains the dockerfile to source."
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
with:
repository: ${{ inputs.GH_REPO }}
ref: ${{ env.SOURCE_BRANCH }}
path: build
- name: Login to Quay.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ env.QUAY_ID }}
password: ${{ env.QUAY_TOKEN }}
registry: quay.io
# Tags in quay stick around as objects in api, when deleted quay adds "end_ts" time stamp on the tag.
# To determine a tag is deleted, we need to check for the presence of this tag.
# Also note there can be multiple tags created/deleted, thus we have 4 cases:
# Case 1: Only 1 tag was ever created "tags: [{name:..},]" -- no end_ts field
# Case 2: No tag was ever created "tags: []"
# Case 3: >1 tags were created, but they were all deleted at some point [{name:..., end_ts,..},....] -- note they all have "end_ts" field.
# Case 4: >1 tags were created, but the most recent one was never deleted (same as case 3, but the latest tag does not have "end_ts".
- name: Check if Image already exists
shell: bash
if: inputs.OVERWRITE == 'false'
env:
IMAGE: quay.io/${{ env.QUAY_ORG }}/${{ inputs.IMAGE_REPO }}:${{ env.TARGET_IMAGE_TAG }}
run: |
echo ${{ inputs.OVERWRITE }}
tags=$(curl --request GET 'https://quay.io/api/v1/repository/${{ env.QUAY_ORG }}/${{ inputs.IMAGE_REPO }}/tag/?specificTag=${{ env.TARGET_IMAGE_TAG }}')
latest_tag_has_end_ts=$(echo $tags | yq .tags - | yq 'sort_by(.start_ts) | reverse' - -P | yq .[0].end_ts -)
notempty=$(echo ${tags} | yq .tags - | yq any)
# Image only exists if there is a tag that does not have "end_ts" (i.e. it is still present).
if [[ "$notempty" == "true" && $latest_tag_has_end_ts == "null" ]]; then
echo "::error::The image ${{ env.IMAGE }} already exists"
exit 1
else
echo "Image does not exist...proceeding with build & push."
fi
- name: Build image
shell: bash
working-directory: build
env:
IMAGE: quay.io/${{ env.QUAY_ORG }}/${{ inputs.IMAGE_REPO }}:${{ env.TARGET_IMAGE_TAG }}
run: |
podman build . -f ${{ inputs.DOCKERFILE }} -t ${{ env.IMAGE }} && podman push ${{ env.IMAGE }}
46 changes: 46 additions & 0 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build images for Main branch
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
env:
IMAGE_REPO_DSPO: data-science-pipelines-operator
QUAY_ORG: opendatahub
QUAY_ID: ${{ secrets.QUAY_ID }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
SOURCE_BRANCH: main
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate Tag
shell: bash
id: tags
run: |
commit_sha=${{ github.event.after }}
tag=main-${commit_sha:0:7}
echo "tag=${tag}" >> $GITHUB_OUTPUT
- name: Build Image
uses: ./.github/actions/build
env:
IMG: quay.io/${{ env.QUAY_ORG }}/${{ env.IMAGE_REPO_DSPO }}:${{ steps.tags.outputs.tag }}
TARGET_IMAGE_TAG: ${{ steps.tags.outputs.tag }}
with:
OVERWRITE: true
IMAGE_REPO: ${{ env.IMAGE_REPO_DSPO }}
DOCKERFILE: Dockerfile
GH_REPO: ${{ github.repository }}
- name: Tag latest
shell: bash
env:
IMG: quay.io/${{ env.QUAY_ORG }}/${{ env.IMAGE_REPO_DSPO }}
NEWEST_TAG: ${{ steps.tags.outputs.tag }}
run: |
podman tag ${IMG}:${NEWEST_TAG} ${IMG}:latest
podman push ${IMG}:latest
podman tag ${IMG}:${NEWEST_TAG} ${IMG}:main
podman push ${IMG}:main
27 changes: 27 additions & 0 deletions .github/workflows/build-prs-trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Trigger build images for PRs
on:
pull_request:
types:
- opened
- reopened
- closed
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
upload-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Save PR payload
shell: bash
run: |
mkdir -p ./pr
echo ${{ github.event.pull_request.number }} >> ./pr/pr_number
echo ${{ github.event.pull_request.state }} >> ./pr/pr_state
echo ${{ github.event.pull_request.head.sha }} >> ./pr/head_sha
- uses: actions/upload-artifact@v2
with:
name: pr
path: pr/
Loading

0 comments on commit 6e215a5

Please sign in to comment.