Skip to content

Commit

Permalink
Merge pull request kubevirt#3503 from oshoval/focus
Browse files Browse the repository at this point in the history
Add make focus target to ease lane focusing
  • Loading branch information
kubevirt-bot authored Jun 8, 2020
2 parents fcec63f + b56f798 commit bf4b94d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ olm-push:
bump-kubevirtci:
./hack/bump-kubevirtci.sh

focus:
./hack/focus.sh "$(lanes)"

.PHONY: \
build-verify \
go-build \
Expand All @@ -160,4 +163,5 @@ bump-kubevirtci:
cluster-deploy \
cluster-sync \
olm-verify \
olm-push
olm-push \
focus
13 changes: 13 additions & 0 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ The other lanes will fail immediately, thus saving CI resources and allow develo
In addition, the PR won't be mergeable until this selection will be reverted (unset the KUBEVIRT_LANE_FOCUS),
and all the lanes will run and succeed.

## Using make targets to focus lanes

Focus on one target
`make focus lanes=target`
or
`make focus lanes="target"`

Clear focus
`make focus`

Focus on multi targets
`make focus lanes="target1 target2"`

25 changes: 25 additions & 0 deletions hack/focus.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash -e
#
# This file is part of the KubeVirt project
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2020 Red Hat, Inc.
#

LANES=${1:-}

function main() {
sed -i "s/export KUBEVIRT_LANE_FOCUS.*/export KUBEVIRT_LANE_FOCUS="\""$1"\""/" automation/test.sh
}

main "$@"

0 comments on commit bf4b94d

Please sign in to comment.