-
Notifications
You must be signed in to change notification settings - Fork 16
task CSI-2892/add community checks to operator #157
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
Draft
matancarmeli7
wants to merge
55
commits into
develop
Choose a base branch
from
task/CSI-2892_cert_community_operator_hub
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
f2952d0
add community checks to operator
matancarmeli7 9650ea5
add code review answers
matancarmeli7 58a46c1
complete the CI
matancarmeli7 135b96f
remove triger on push
matancarmeli7 352247c
use the fork way
matancarmeli7 3ca3975
answer codereview comments
matancarmeli7 b267d6d
remove sed from create_demo_pr.sh
matancarmeli7 f9fdda3
move back the sed command to create_pr
matancarmeli7 218a95a
pass operator_image_in_branch variable
matancarmeli7 975fc66
passed operator_image_for_test to CI-csi-demo-pr
matancarmeli7 362c38f
move csv_file variable to CI-csi-demo-pr
matancarmeli7 3bb0c93
add check and clean stages
matancarmeli7 89e065e
changed files name
matancarmeli7 f3959c6
add debug in the ci
matancarmeli7 c57a0a6
remove debug
matancarmeli7 4181fe0
add summary check
matancarmeli7 466059a
add install_ci_dependencies.sh file
matancarmeli7 aefc113
change fail check
matancarmeli7 68c5583
remove underscore
matancarmeli7 5fd4b11
add new line in install_ci_dependencies.sh
matancarmeli7 f58e6f4
create are_all_tests_were_passed function
matancarmeli7 ca18f57
add some cache handle
matancarmeli7 bf9eac4
fix image field in yq
matancarmeli7 afdc338
move variable to stage env
matancarmeli7 4584130
ignore error on pr checks
matancarmeli7 0672ae8
remove operator_image_in_branch variable
matancarmeli7 7e9d305
add github_build_number env parameter
matancarmeli7 88bd0a3
moved scripts to community dir
matancarmeli7 9386785
remove wrong `
matancarmeli7 5eff30a
call gh_pr_checks_command as variable
matancarmeli7 c0140d0
changed yq stracture
matancarmeli7 79bf3dc
removed shell from github actions
matancarmeli7 c30c381
add parameters to wait_fot_checks_to_start
matancarmeli7 caef19d
Merge branch 'develop' into task/CSI-2892_cert_community_operator_hub
matancarmeli7 219b1a2
change while check
matancarmeli7 28777cf
remove exports
matancarmeli7 e52e5f9
add loop for editing the csv file
matancarmeli7 8bf24e1
remove exports
matancarmeli7 2f2a1bd
eval repo_pr
matancarmeli7 0b6a6b5
change repo_pr
matancarmeli7 5f3c8dd
Merge branch 'develop' into task/CSI-2892_cert_community_operator_hub
matancarmeli7 abff90b
add some tickets
matancarmeli7 1fcdb33
add more permmisions to edit csv_file
matancarmeli7 e4b57bf
change wait for checks condition
matancarmeli7 75f4007
add some functions
matancarmeli7 c0bd35d
Merge branch 'develop' into task/CSI-2892_cert_community_operator_hub
matancarmeli7 d40871f
support new way of community operators
matancarmeli7 e9da769
add cd -
matancarmeli7 3e2f6d2
change master branch to main
matancarmeli7 c79479c
Merge branch 'develop' into task/CSI-2892_cert_community_operator_hub
matancarmeli7 d4a0f6b
remove file from function
matancarmeli7 a13fab7
copy only the latest csv
matancarmeli7 613014a
fix image_version
matancarmeli7 e25ec2b
remove test directory
matancarmeli7 7ff7b63
change comment on redhat
matancarmeli7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
name: Operator test | ||
|
||
env: | ||
OP_TEST_DEBUG: 1 | ||
OP_TEST_CONTAINER_OPT: "-t" | ||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- master | ||
jobs: | ||
operator_image_build: | ||
name: "set env" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
outputs: | ||
operator_image: "csiblock1/ibm-block-csi-operator-amd64:new" | ||
oriyarde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
prepare_env: | ||
name: "prepare_env" | ||
oriyarde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
needs: operator_image_build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: python -m pip install --upgrade pip yq | ||
- uses: FranzDiebold/github-env-vars-action@v2 | ||
- name: prepare_env | ||
id: environment_setup | ||
env: | ||
operator_image: ${{ needs.operator_image_build.outputs.operator_image }} | ||
run: | | ||
build/ci/prepare_env.sh | ||
outputs: | ||
current_operator_image: "${{ steps.environment_setup.outputs.current_operator_image }}" | ||
wanted_operator_image: "${{ steps.environment_setup.outputs.wanted_operator_image }}" | ||
oriyarde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
csv_file: "${{ steps.environment_setup.outputs.csv_file }}" | ||
community_operators_path: "${{ steps.environment_setup.outputs.community_operators_path }}" | ||
upstream_community_operators_path: "${{ steps.environment_setup.outputs.upstream_community_operators_path }}" | ||
repository_path: "${{ steps.environment_setup.outputs.repository_path }}" | ||
|
||
CI-csi-kiwi: | ||
name: "kiwi / Full operator test" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
# reduce code repetition in CSI-2992 ticket | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "kiwi ${{ needs.prepare_env.outputs.upstream_community_operators_path }}" | ||
build/ci/op-test.sh kiwi "${{ needs.prepare_env.outputs.upstream_community_operators_path }}" | ||
|
||
CI-csi-lemon: | ||
name: "lemon / Deploy from scratch" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "lemon ${{ needs.prepare_env.outputs.upstream_community_operators_path }}" | ||
build/ci/op-test.sh lemon "${{ needs.prepare_env.outputs.upstream_community_operators_path }}" | ||
|
||
CI-csi-lemon-openshift_4_6: | ||
name: "lemon / Deploy from scratch (v4.6)" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "lemon_v4.6 ${{ needs.prepare_env.outputs.community_operators_path }}" | ||
build/ci/op-test.sh lemon_v4.6 "${{ needs.prepare_env.outputs.community_operators_path }}" | ||
|
||
CI-csi-lemon-openshift_4_7: | ||
name: "lemon / Deploy from scratch (v4.7)" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "lemon_v4.7 ${{ needs.prepare_env.outputs.community_operators_path }}" | ||
build/ci/op-test.sh lemon_v4.7 "${{ needs.prepare_env.outputs.community_operators_path }}" | ||
|
||
CI-csi-lemon-openshift_4_8: | ||
name: "lemon / Deploy from scratch (v4.8)" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "lemon_v4.8 ${{ needs.prepare_env.outputs.community_operators_path }}" | ||
build/ci/op-test.sh lemon_v4.8 "${{ needs.prepare_env.outputs.community_operators_path }}" | ||
|
||
CI-csi-orange-k8s: | ||
name: "orange / Deploy k8s latest" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "orange ${{ needs.prepare_env.outputs.upstream_community_operators_path }}" | ||
build/ci/op-test.sh orange "${{ needs.prepare_env.outputs.upstream_community_operators_path }}" | ||
|
||
CI-csi-orange-openshift_4_6: | ||
name: "orange / Deploy openshift v4.6" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "orange_v4.6 ${{ needs.prepare_env.outputs.community_operators_path }}" | ||
build/ci/op-test.sh orange_v4.6 "${{ needs.prepare_env.outputs.community_operators_path }}" | ||
|
||
CI-csi-orange-openshift_4_7: | ||
name: "orange / Deploy openshift v4.7" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "orange_v4.7 ${{ needs.prepare_env.outputs.community_operators_path }}" | ||
build/ci/op-test.sh orange_v4.7 "${{ needs.prepare_env.outputs.community_operators_path }}" | ||
|
||
CI-csi-orange-openshift_4_8: | ||
name: "orange / Deploy openshift v4.8" | ||
needs: prepare_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: update_csv | ||
run: | | ||
build/ci/update_csv.sh | ||
env: | ||
current_operator_image: ${{ needs.prepare_env.outputs.current_operator_image }} | ||
wanted_operator_image: ${{ needs.prepare_env.outputs.wanted_operator_image }} | ||
csv_file: ${{ needs.prepare_env.outputs.csv_file }} | ||
repository_path: ${{ needs.prepare_env.outputs.repository_path }} | ||
- name: Operator test | ||
run: | | ||
echo "orange_v4.8 ${{ needs.prepare_env.outputs.community_operators_path }}" | ||
build/ci/op-test.sh orange_v4.8 "${{ needs.prepare_env.outputs.community_operators_path }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
OP_TEST_SCRIPT_URL=${OP_TEST_SCRIPT_URL-"https://raw.githubusercontent.com/operator-framework/operator-test-playbooks/master/upstream/test/test.sh"} | ||
|
||
bash <(curl -sL $OP_TEST_SCRIPT_URL) $* | ||
rc=$? | ||
[[ $rc -eq 0 ]] && echo "rc=$rc" || { echo "Error: rc=$rc"; exit $rc; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash -xe | ||
set +o pipefail | ||
|
||
export csv_version=`yq .channels[0].currentCSV deploy/olm-catalog/ibm-block-csi-operator-community/ibm-block-csi-operator.package.yaml` | ||
export csv_version=`echo ${csv_version//ibm-block-csi-operator.v}` | ||
export csv_version=`echo ${csv_version//\"}` | ||
oriyarde marked this conversation as resolved.
Show resolved
Hide resolved
|
||
export repository_path=~/work/$CI_REPOSITORY_NAME/$CI_REPOSITORY_NAME | ||
export csv_file=$repository_path/deploy/olm-catalog/ibm-block-csi-operator-community/$csv_version/ibm-block-csi-operator.v$csv_version.clusterserviceversion.yaml | ||
export wanted_image=$operator_image | ||
export current_image=`yq .metadata.annotations.containerImage $csv_file` | ||
export current_image=`echo ${current_image//\"}` | ||
export upstream_community_operators_path=upstream-community-operators/ibm-block-csi-operator-community/$csv_version | ||
export community_operators_path=community-operators/ibm-block-csi-operator-community/$csv_version | ||
|
||
echo "::set-output name=current_operator_image::${current_image}" | ||
echo "::set-output name=wanted_operator_image::${wanted_image}" | ||
echo "::set-output name=csv_file::${csv_file}" | ||
echo "::set-output name=upstream_community_operators_path::${upstream_community_operators_path}" | ||
echo "::set-output name=community_operators_path::${community_operators_path}" | ||
echo "::set-output name=repository_path::${repository_path}" | ||
oriyarde marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash -xe | ||
set +o pipefail | ||
|
||
sed -i "s+$current_operator_image+$wanted_operator_image+g" $csv_file | ||
sed -i 's/.*minKubeVersion.*/ minKubeVersion: 1.19.0/' $csv_file | ||
matancarmeli7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
mkdir $repository_path/upstream-community-operators/ | ||
mkdir $repository_path/community-operators/ | ||
|
||
cp -r $repository_path/deploy/olm-catalog/ibm-block-csi-operator-community/ $repository_path/upstream-community-operators/ | ||
cp -r $repository_path/deploy/olm-catalog/ibm-block-csi-operator-community/ $repository_path/community-operators/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
matancarmeli7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"categories":[ | ||
"AI/Machine Learning", | ||
"Application Runtime", | ||
"Big Data", | ||
"Cloud Provider", | ||
"Developer Tools", | ||
"Database", | ||
"Drivers and plugins", | ||
"Integration & Delivery", | ||
"Logging & Tracing", | ||
"Modernization & Migration", | ||
"Monitoring", | ||
"Networking", | ||
"OpenShift Optional", | ||
"Security", | ||
"Storage", | ||
"Streaming & Messaging" | ||
] | ||
} | ||
matancarmeli7 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
# Use `replaces-mode` or `semver-mode`. Once you switch to `semver-mode`, there is no easy way back. | ||
updateGraph: replaces-mode | ||
matancarmeli7 marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.