Skip to content

Commit 16202ec

Browse files
Merge pull request openshift#274 from Elbehery/rebase-etcd-3.5.14-openshift-4.16
OCPBUGS-34690: Rebase etcd 3.5.14 openshift 4.16
2 parents bc2fec2 + c1e7088 commit 16202ec

76 files changed

Lines changed: 2325 additions & 737 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Approve GitHub Workflows
3+
4+
on:
5+
pull_request_target:
6+
types:
7+
- labeled
8+
- synchronize
9+
10+
jobs:
11+
approve:
12+
name: Approve ok-to-test
13+
if: contains(github.event.pull_request.labels.*.name, 'ok-to-test')
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: write
17+
steps:
18+
- name: Update PR
19+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
20+
continue-on-error: true
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
debug: ${{ secrets.ACTIONS_RUNNER_DEBUG == 'true' }}
24+
script: |
25+
const result = await github.rest.actions.listWorkflowRunsForRepo({
26+
owner: context.repo.owner,
27+
repo: context.repo.repo,
28+
event: "pull_request",
29+
status: "action_required",
30+
head_sha: context.payload.pull_request.head.sha,
31+
per_page: 100
32+
});
33+
34+
for (var run of result.data.workflow_runs) {
35+
await github.rest.actions.approveWorkflowRun({
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
run_id: run.id
39+
});
40+
}

.github/workflows/release.yaml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ jobs:
44
main:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
7+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
88
- id: goversion
99
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
10-
- uses: actions/setup-go@v2
10+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
1111
with:
1212
go-version: ${{ steps.goversion.outputs.goversion }}
1313
- name: release
@@ -30,3 +30,41 @@ jobs:
3030
- name: test-image
3131
run: |
3232
VERSION=3.5.99 ./scripts/test_images.sh
33+
- name: save-image
34+
run: |
35+
docker image save -o /tmp/etcd-img.tar gcr.io/etcd-development/etcd
36+
- name: upload-image
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: etcd-img
40+
path: /tmp/etcd-img.tar
41+
retention-days: 1
42+
trivy-scan:
43+
needs: main
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
platforms: [amd64, arm64, ppc64le, s390x]
48+
permissions:
49+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: get-image
53+
uses: actions/download-artifact@v3
54+
with:
55+
name: etcd-img
56+
path: /tmp
57+
- name: load-image
58+
run: |
59+
docker load < /tmp/etcd-img.tar
60+
- name: trivy-scan
61+
uses: aquasecurity/trivy-action@d710430a6722f083d3b36b8339ff66b32f22ee55 # v0.19.0
62+
with:
63+
image-ref: 'gcr.io/etcd-development/etcd:v3.5.99-${{ matrix.platforms }}'
64+
severity: 'CRITICAL,HIGH'
65+
format: 'sarif'
66+
output: 'trivy-results-${{ matrix.platforms }}.sarif'
67+
- name: upload scan results
68+
uses: github/codeql-action/upload-sarif@956f09c2ef1926b580554b9014cfb8a51abf89dd # v2.16.6
69+
with:
70+
sarif_file: 'trivy-results-${{ matrix.platforms }}.sarif'
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Static Analysis
3+
on: [push, pull_request]
4+
permissions: read-all
5+
jobs:
6+
run:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
10+
- id: goversion
11+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
12+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
13+
with:
14+
go-version: ${{ steps.goversion.outputs.goversion }}
15+
- run: |
16+
set -euo pipefail
17+
18+
make verify
19+
- run: |
20+
set -euo pipefail
21+
22+
make fix
23+
24+
DIFF=$(git status --porcelain)
25+
26+
if [ -n "$DIFF" ]; then
27+
echo "These files were modified:"
28+
echo
29+
echo "$DIFF"
30+
echo
31+
exit 1
32+
fi

.github/workflows/tests-template.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ jobs:
4141
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' make test-smoke
4242
;;
4343
linux-integration-1-cpu)
44-
GOARCH=${{ inputs.arch }} CPU=1 RACE='false' make test-integration
44+
make install-gofail
45+
GOARCH=${{ inputs.arch }} CPU=1 RACE='false' FAILPOINTS='true' make test-integration
4546
;;
4647
linux-integration-2-cpu)
47-
GOARCH=${{ inputs.arch }} CPU=2 RACE='false' make test-integration
48+
make install-gofail
49+
GOARCH=${{ inputs.arch }} CPU=2 RACE='false' FAILPOINTS='true' make test-integration
4850
;;
4951
linux-integration-4-cpu)
50-
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' make test-integration
52+
make install-gofail
53+
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' FAILPOINTS='true' make test-integration
5154
;;
5255
linux-unit-4-cpu-race)
5356
GOARCH=${{ inputs.arch }} RACE='true' CPU='4' GO_TEST_FLAGS='-p=2' make test-unit

.github/workflows/trivy-nightly-scan.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.21.8
1+
1.21.10

Dockerfile-release.amd64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 gcr.io/distroless/static-debian11@sha256:7e5c6a2a4ae854242874d36171b31d26e0539c98fc6080f942f16b03e82851ab
1+
FROM --platform=linux/amd64 gcr.io/distroless/static-debian11@sha256:6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c
22

33
ADD etcd /usr/local/bin/
44
ADD etcdctl /usr/local/bin/

Dockerfile-release.arm64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/arm64 gcr.io/distroless/static-debian11@sha256:7e5c6a2a4ae854242874d36171b31d26e0539c98fc6080f942f16b03e82851ab
1+
FROM --platform=linux/arm64 gcr.io/distroless/static-debian11@sha256:6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c
22

33
ADD etcd /usr/local/bin/
44
ADD etcdctl /usr/local/bin/

Dockerfile-release.ppc64le

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/ppc64le gcr.io/distroless/static-debian11@sha256:7e5c6a2a4ae854242874d36171b31d26e0539c98fc6080f942f16b03e82851ab
1+
FROM --platform=linux/ppc64le gcr.io/distroless/static-debian11@sha256:6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c
22

33
ADD etcd /usr/local/bin/
44
ADD etcdctl /usr/local/bin/

Dockerfile-release.s390x

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/s390x gcr.io/distroless/static-debian11@sha256:7e5c6a2a4ae854242874d36171b31d26e0539c98fc6080f942f16b03e82851ab
1+
FROM --platform=linux/s390x gcr.io/distroless/static-debian11@sha256:6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c
22

33
ADD etcd /usr/local/bin/
44
ADD etcdctl /usr/local/bin/

0 commit comments

Comments
 (0)