Skip to content

Commit 08dda76

Browse files
Merge pull request #353 from RaphaelBut/fix-boilerplate
Fix and bump boilerplate
2 parents 71be6d5 + 44503a9 commit 08dda76

File tree

16 files changed

+278
-43
lines changed

16 files changed

+278
-43
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: boilerplate
33
namespace: openshift
4-
tag: image-v5.0.0
4+
tag: image-v6.0.1

.github/dependabot.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
version: 2
22
updates:
3-
- package-ecosystem: 'gomod'
4-
directories:
5-
- '/'
6-
- 'interceptor/'
7-
allow:
8-
- dependency-type: all
9-
schedule:
10-
interval: 'daily'
113
- package-ecosystem: "docker"
12-
directory: "/"
13-
ignore:
14-
# Only update runners base image not builder
15-
- dependency-name: "registry.ci.openshift.org/openshift/release"
4+
directory: "/build"
5+
labels:
6+
- "area/dependency"
7+
- "ok-to-test"
168
schedule:
179
interval: "weekly"
10+
ignore:
11+
- dependency-name: "app-sre/boilerplate"
12+
# don't upgrade boilerplate via these means
13+
- dependency-name: "openshift4/ose-operator-registry"
14+
# don't upgrade ose-operator-registry via these means

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
include project.mk
1+
IMAGE_REGISTRY?=quay.io
2+
IMAGE_REPOSITORY?=app-sre
3+
IMAGE_NAME?=configuration-anomaly-detection
4+
DOCKERFILE?=./build/Dockerfile
5+
define ADDITIONAL_IMAGE_SPECS
6+
./build/Dockerfile $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(IMAGE_NAME):$(CURRENT_COMMIT)
7+
endef
8+
29
include boilerplate/generated-includes.mk
310

411
GOLANGCI_LINT_VERSION=v1.59.1
@@ -121,4 +128,4 @@ install-linter: check-curl-install check-go121-install
121128

122129
.PHONY: install-mockgen
123130
install-mockgen: check-go121-install
124-
@type mockgen 1> /dev/null || (echo && echo "Installing 'mockgen'..." && go install go.uber.org/mock/mockgen@$(MOCKGEN_VERSION))
131+
@type mockgen 1> /dev/null || (echo && echo "Installing 'mockgen'..." && go install go.uber.org/mock/mockgen@$(MOCKGEN_VERSION))

OWNERS_ALIASES

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# ================================ DO NOT EDIT ================================
2+
# This file is managed in https://github.com/openshift/boilerplate
3+
# See the OWNERS_ALIASES docs: https://git.k8s.io/community/contributors/guide/owners.md#OWNERS_ALIASES
4+
# =============================================================================
5+
aliases:
6+
srep-functional-team-aurora:
7+
- abyrne55
8+
- dakotalongRH
9+
- joshbranham
10+
- luis-falcon
11+
- reedcort
12+
srep-functional-team-fedramp:
13+
- tonytheleg
14+
- theautoroboto
15+
- rhdedgar
16+
- katherinelc321
17+
- robotmaxtron
18+
- rojasreinold
19+
- hbhushan3
20+
- fsferraz-rh
21+
srep-functional-team-hulk:
22+
- a7vicky
23+
- ravitri
24+
- shitaljante
25+
- devppratik
26+
- Tafhim
27+
- tkong-redhat
28+
- TheUndeadKing
29+
- vaidehi411
30+
- chamalabey
31+
srep-functional-team-orange:
32+
- bergmannf
33+
- bng0y
34+
- typeid
35+
- Makdaam
36+
- mrWinston
37+
- Nikokolas3270
38+
- ninabauer
39+
- RaphaelBut
40+
srep-functional-team-rocket:
41+
- aliceh
42+
- anispate
43+
- clcollins
44+
- Mhodesty
45+
- nephomaniac
46+
- tnierman
47+
srep-functional-team-security:
48+
- jaybeeunix
49+
- sam-nguyen7
50+
- wshearn
51+
- dem4gus
52+
- npecka
53+
- pshickeydev
54+
- casey-williams-rh
55+
srep-functional-team-thor:
56+
- bmeng
57+
- MitaliBhalla
58+
- hectorakemp
59+
- feichashao
60+
- samanthajayasinghe
61+
- xiaoyu74
62+
- Dee-6777
63+
- Tessg22
64+
srep-infra-cicd:
65+
- mmazur
66+
- mrsantamaria
67+
- ritmun
68+
- jbpratt
69+
- yiqinzhang
70+
srep-functional-leads:
71+
- abyrne55
72+
- clcollins
73+
- Nikokolas3270
74+
- theautoroboto
75+
- bmeng
76+
- sam-nguyen7
77+
- ravitri
78+
srep-team-leads:
79+
- rafael-azevedo
80+
- iamkirkbater
81+
- rogbas
82+
- fahlmant
83+
- dustman9000
84+
- wanghaoran1988
85+
- bng0y
86+
sre-group-leads:
87+
- apahim
88+
- maorfr
89+
- rogbas
90+
srep-architects:
91+
- jewzaam
92+
- jharrington22
93+
- cblecker

boilerplate/_data/backing-image-tag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
image-v5.0.0
1+
image-v6.0.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f8b6c332db4579b4869fcd98d16c762e63db9211
1+
70a51ed11e104b317f9f6996a9f4491bbc34391a

boilerplate/_lib/boilerplate-commit

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
22

33
set -e
4+
if [ "$BOILERPLATE_SET_X" ]; then
5+
set -x
6+
fi
47

58
REPO_ROOT=$(git rev-parse --show-toplevel)
69
source $REPO_ROOT/boilerplate/_lib/common.sh
@@ -53,8 +56,14 @@ elif grep -q '^ M boilerplate/_data/last-boilerplate-commit$' $git_status; then
5356
bp_compare_url="https://github.com/openshift/boilerplate/compare/$bp_commit_change"
5457
# Generate the commit history for this range. This will go in the commit message.
5558
(
56-
$BOILERPLATE_GIT_CLONE $bp_clone
57-
cd $bp_clone
59+
if [[ -z "${BOILERPLATE_IN_CI}" ]]; then
60+
git clone "${BOILERPLATE_GIT_REPO}" "${bp_clone}"
61+
else
62+
# HACK: We can't get around safe.directory in CI, so just leverage cp instead of git
63+
cp -r /go/src/github.com/openshift/boilerplate/* "${bp_clone}"
64+
cp -r /go/src/github.com/openshift/boilerplate/.git "${bp_clone}"
65+
fi
66+
cd "${bp_clone}"
5867
# Matches promote.sh
5968
git log --no-merges --pretty=format:'commit: %H%nauthor: %an%n%s%n%n%b%n%n' $bp_commit_change > $bp_log
6069
)

boilerplate/_lib/common.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ image_exists_in_repo() {
8989

9090
local skopeo_stderr=$(mktemp)
9191

92+
if ! command -v skopeo &>/dev/null; then
93+
echo "Failed to find the skopeo binary. If you are on Mac: brew install skopeo." >&2
94+
exit 1
95+
fi
96+
9297
output=$(skopeo inspect docker://${image_uri} 2>$skopeo_stderr)
9398
rc=$?
9499
# So we can delete the temp file right away...
@@ -107,12 +112,12 @@ image_exists_in_repo() {
107112
fi
108113
echo "Image ${image_uri} exists with digest $digest."
109114
return 0
110-
elif [[ "$stderr" == *"manifest unknown"* ]]; then
115+
elif [[ "$output" == *"manifest unknown"* || "$stderr" == *"manifest unknown"* ]]; then
111116
# We were able to talk to the repository, but the tag doesn't exist.
112117
# This is the normal "green field" case.
113118
echo "Image ${image_uri} does not exist in the repository."
114119
return 1
115-
elif [[ "$stderr" == *"was deleted or has expired"* ]]; then
120+
elif [[ "$output" == *"manifest unknown"* || "$stderr" == *"was deleted or has expired"* ]]; then
116121
# This should be rare, but accounts for cases where we had to
117122
# manually delete an image.
118123
echo "Image ${image_uri} was deleted from the repository."
@@ -177,10 +182,9 @@ fi
177182
if [ -z "$BOILERPLATE_GIT_REPO" ]; then
178183
export BOILERPLATE_GIT_REPO=https://github.com/openshift/boilerplate.git
179184
fi
180-
if [ -z "$BOILERPLATE_GIT_CLONE" ]; then
181-
export BOILERPLATE_GIT_CLONE="git clone $BOILERPLATE_GIT_REPO"
182-
fi
183185

186+
# Base image repo url
187+
IMAGE_REPO=quay.io/redhat-services-prod/openshift
184188
# The namespace of the ImageStream by which prow will import the image.
185189
IMAGE_NAMESPACE=openshift
186190
IMAGE_NAME=boilerplate
@@ -197,4 +201,4 @@ if [[ -z "$LATEST_IMAGE_TAG" ]]; then
197201
fi
198202
fi
199203
# The public image location
200-
IMAGE_PULL_PATH=${IMAGE_PULL_PATH:-quay.io/app-sre/$IMAGE_NAME:$LATEST_IMAGE_TAG}
204+
IMAGE_PULL_PATH=${IMAGE_PULL_PATH:-$IMAGE_REPO/$IMAGE_NAME:$LATEST_IMAGE_TAG}

boilerplate/_lib/freeze-check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ git reset --hard FETCH_HEAD
6767
# close a security hole whereby the latter is overridden.
6868
echo "Running update"
6969
cd $REPO_ROOT
70-
BOILERPLATE_GIT_CLONE="git clone $TMPD" boilerplate/update
70+
BOILERPLATE_GIT_REPO="${TMPD}" boilerplate/update
7171

7272
# Okay, if anything has changed, that's bad.
7373
if [[ $(git status --porcelain -- ':!build/Dockerfile*' | wc -l) -ne 0 ]]; then
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# ================================ DO NOT EDIT ================================
2+
# This file is managed in https://github.com/openshift/boilerplate
3+
# See the OWNERS_ALIASES docs: https://git.k8s.io/community/contributors/guide/owners.md#OWNERS_ALIASES
4+
# =============================================================================
5+
aliases:
6+
srep-functional-team-aurora:
7+
- abyrne55
8+
- dakotalongRH
9+
- joshbranham
10+
- luis-falcon
11+
- reedcort
12+
srep-functional-team-fedramp:
13+
- tonytheleg
14+
- theautoroboto
15+
- rhdedgar
16+
- katherinelc321
17+
- robotmaxtron
18+
- rojasreinold
19+
- hbhushan3
20+
- fsferraz-rh
21+
srep-functional-team-hulk:
22+
- a7vicky
23+
- ravitri
24+
- shitaljante
25+
- devppratik
26+
- Tafhim
27+
- tkong-redhat
28+
- TheUndeadKing
29+
- vaidehi411
30+
- chamalabey
31+
srep-functional-team-orange:
32+
- bergmannf
33+
- bng0y
34+
- typeid
35+
- Makdaam
36+
- mrWinston
37+
- Nikokolas3270
38+
- ninabauer
39+
- RaphaelBut
40+
srep-functional-team-rocket:
41+
- aliceh
42+
- anispate
43+
- clcollins
44+
- Mhodesty
45+
- nephomaniac
46+
- tnierman
47+
srep-functional-team-security:
48+
- jaybeeunix
49+
- sam-nguyen7
50+
- wshearn
51+
- dem4gus
52+
- npecka
53+
- pshickeydev
54+
- casey-williams-rh
55+
srep-functional-team-thor:
56+
- bmeng
57+
- MitaliBhalla
58+
- hectorakemp
59+
- feichashao
60+
- samanthajayasinghe
61+
- xiaoyu74
62+
- Dee-6777
63+
- Tessg22
64+
srep-infra-cicd:
65+
- mmazur
66+
- mrsantamaria
67+
- ritmun
68+
- jbpratt
69+
- yiqinzhang
70+
srep-functional-leads:
71+
- abyrne55
72+
- clcollins
73+
- Nikokolas3270
74+
- theautoroboto
75+
- bmeng
76+
- sam-nguyen7
77+
- ravitri
78+
srep-team-leads:
79+
- rafael-azevedo
80+
- iamkirkbater
81+
- rogbas
82+
- fahlmant
83+
- dustman9000
84+
- wanghaoran1988
85+
- bng0y
86+
sre-group-leads:
87+
- apahim
88+
- maorfr
89+
- rogbas
90+
srep-architects:
91+
- jewzaam
92+
- jharrington22
93+
- cblecker

0 commit comments

Comments
 (0)