Skip to content

Commit fe9d8c0

Browse files
authored
Merge branch 'main' into add-revisionhistorylimit
2 parents d7e802d + 443fbd0 commit fe9d8c0

36 files changed

Lines changed: 1292 additions & 112 deletions

.e2eignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ README.md
77
LICENSE
88
operator.png
99
kubernetes.svg
10-
release_versions
10+
e2e-tests/release_versions
1111
.github/**
1212
.e2eignore

.github/ISSUE_TEMPLATE/1-feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature request 🧭
22
description: Suggest an idea for this project
3-
labels: "feature-request"
3+
labels: ["feature-request", "Proposed", "PSMDB", "MongoDB"]
44
body:
55
- type: textarea
66
attributes:

.github/workflows/labeler.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: "PR Labeler"
2+
permissions:
3+
contents: read
4+
pull-requests: write
25
on:
36
pull_request:
47
types: [opened, synchronize]
5-
68
jobs:
79
label:
810
runs-on: ubuntu-latest

.github/workflows/reviewdog.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,43 @@ jobs:
105105
run: |
106106
make generate manifests VERSION=main
107107
git diff --exit-code
108+
109+
e2e-release-versions-images:
110+
name: e2e-tests release_versions image availability
111+
runs-on: ubuntu-latest
112+
steps:
113+
- uses: actions/checkout@v6
114+
with:
115+
fetch-depth: 0
116+
- name: Check if e2e-tests/release_versions changed
117+
id: changed
118+
run: |
119+
git fetch origin ${{ github.base_ref }}
120+
if git diff --name-only origin/${{ github.base_ref }}...HEAD -- e2e-tests/release_versions | grep -q .; then
121+
echo "changed=true" >> "$GITHUB_OUTPUT"
122+
else
123+
echo "changed=false" >> "$GITHUB_OUTPUT"
124+
fi
125+
- name: Verify release_versions images exist (docker manifest inspect)
126+
if: steps.changed.outputs.changed == 'true'
127+
run: |
128+
set -e
129+
# All IMAGE_*=value lines, exclude operator image (percona/percona-server-mongodb-operator)
130+
images=$(grep -E '^IMAGE_[^=]+=' e2e-tests/release_versions | cut -d= -f2 | grep -v '^$' | grep -v 'percona/percona-server-mongodb-operator' | sort -u)
131+
if [ -z "$images" ]; then
132+
echo "No non-operator images found in e2e-tests/release_versions"
133+
exit 0
134+
fi
135+
failed=""
136+
for img in $images; do
137+
echo "Checking image $img"
138+
if ! docker manifest inspect "$img"; then
139+
echo "::error::Image not found or inaccessible: $img"
140+
failed="${failed} ${img}"
141+
fi
142+
done
143+
if [ -n "$failed" ]; then
144+
echo "::error::The following images failed docker manifest inspect:$failed"
145+
exit 1
146+
fi
147+
echo "All images are available."

.github/workflows/scan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Scan docker
22
on: [pull_request]
3+
permissions:
4+
contents: read
35

46
env:
57
# Use docker.io for Docker Hub if empty

.github/workflows/stale.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55

66
jobs:
77
stale:
8+
permissions:
9+
contents: read
10+
pull-requests: write
811
runs-on: ubuntu-latest
912
steps:
1013
- uses: actions/stale@v10

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Run tests
2+
permissions:
3+
contents: read
4+
pull-requests: write
25
on: [pull_request]
36
jobs:
47
test:

Jenkinsfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,16 @@ void checkE2EIgnoreFiles() {
394394
echo "Excluded files: $excludedFiles"
395395
echo "Changed files: $changedFiles"
396396

397-
def excludedFilesRegex = excludedFiles.collect{it.replace("**", ".*").replace("*", "[^/]*")}
397+
// Use placeholder so the * in ".*" (from **) is not replaced by [^/]*
398+
def excludedFilesRegex = excludedFiles.collect{
399+
it.replace("**", ".__STARSTAR__").replace("*", "[^/]*").replace(".__STARSTAR__", ".*")
400+
}
398401
needToRunTests = !changedFiles.every{changed -> excludedFilesRegex.any{regex -> changed ==~ regex}}
399402

400403
if (needToRunTests) {
401404
echo "Some changed files are outside of the e2eignore list. Proceeding with execution."
402405
} else {
403-
if (currentBuild.previousBuild?.result != 'SUCCESS') {
406+
if (currentBuild.previousBuild?.result != 'SUCCESS' && currentBuild.number != 1) {
404407
echo "All changed files are e2eignore files, and previous build was unsuccessful. Propagating previous state."
405408
currentBuild.result = currentBuild.previousBuild?.result
406409
error "Skipping execution as non-significant changes detected and previous build was unsuccessful."

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ IMAGE ?= $(IMAGE_TAG_BASE):$(VERSION)
77
DEPLOYDIR = ./deploy
88

99
ENVTEST_K8S_VERSION = 1.31
10+
ENVTEST_VERSION ?= release-0.23
1011

1112
all: build
1213

@@ -94,7 +95,7 @@ kustomize: ## Download kustomize locally if necessary.
9495

9596
ENVTEST = $(shell pwd)/bin/setup-envtest
9697
envtest: ## Download envtest-setup locally if necessary.
97-
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)
98+
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@$(ENVTEST_VERSION))
9899

99100
SWAGGER = $(shell pwd)/bin/swagger
100101
swagger: ## Download swagger locally if necessary.

build/physical-restore-ps-entry.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ trap 'handle_sigterm' 15
2525

2626
touch /opt/percona/restore-in-progress
2727

28+
if [ -d /etc/s3/certs-in ] && [ -n "$(ls -A /etc/s3/certs-in/*.crt 2>/dev/null)" ]; then
29+
cat /etc/s3/certs-in/*.crt > /etc/s3/certs/ca-bundle.crt
30+
chmod 0644 /etc/s3/certs/ca-bundle.crt
31+
fi
32+
2833
if [[ -z ${PBM_AGENT_TLS_ENABLED} ]] || [[ ${PBM_AGENT_TLS_ENABLED} == "true" ]]; then
2934
MONGO_SSL_DIR=/etc/mongodb-ssl
3035
if [[ -e "${MONGO_SSL_DIR}/tls.crt" ]] && [[ -e "${MONGO_SSL_DIR}/tls.key" ]]; then

0 commit comments

Comments
 (0)