Skip to content

Commit c3b3b1d

Browse files
committed
Merge remote-tracking branch 'origin/main' into fork-github-plugin
* origin/main: (1516 commits) secrets-aws: add external_id support for assumed_role (openbao#39) consul plugin: drop deprecated features (openbao#38) secrets-consul: ignore missing tokens (openbao#37) fix github markdown problems in docs fork consul plugin: add CHANGELOG fork consul plugin: add README fork consul plugin: cleanup docs fork consul plugin: replace Vault with OpenBao in docs fork consul plugin: vendor new dependencies fork consul plugin: use openbao go packages update openbao depenencies to 2.4.0 (openbao#34) auth-aws: fix nil pointer access on empty client config (openbao#33) report plugin version when registered in OpenBao (openbao#32) build(deps): bump github.com/go-viper/mapstructure/v2 (openbao#30) build(deps): bump github.com/openbao/openbao/api/v2 from 2.3.0 to 2.3.1 (openbao#27) build(deps): bump github.com/openbao/openbao/sdk/v2 from 2.2.0 to 2.3.0 (openbao#24) add option to republish existing release OCI images (openbao#26) Fix plugin OCI image uploads (openbao#25) Various minor README improvements (openbao#22) build(deps): bump github.com/go-viper/mapstructure/v2 (openbao#21) ...
2 parents b465ff3 + d0dbd6a commit c3b3b1d

File tree

25,826 files changed

+5965636
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

25,826 files changed

+5965636
-0
lines changed

.github/workflows/build.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
matrix:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
plugins: ${{ steps.matrix.outputs.plugins }}
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- id: matrix
18+
run: |
19+
make ci-matrix >> "$GITHUB_OUTPUT"
20+
build:
21+
runs-on: ubuntu-latest
22+
needs: matrix
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
plugin: ${{ fromJSON(needs.matrix.outputs.plugins) }}
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
- name: Set up Go
33+
uses: actions/setup-go@v5
34+
with:
35+
go-version-file: go.mod
36+
- name: Build plugin
37+
run: make ${{ matrix.plugin }}

.github/workflows/push-image.yaml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: push-image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
plugin:
7+
description: Plugin to build
8+
required: true
9+
type: string
10+
version:
11+
description: Version to publish
12+
required: true
13+
type: string
14+
republish:
15+
description: Republish existing release (download assets instead of building)
16+
required: false
17+
type: boolean
18+
default: false
19+
20+
permissions:
21+
contents: write
22+
id-token: write
23+
packages: write
24+
25+
jobs:
26+
matrix:
27+
runs-on: ubuntu-latest
28+
outputs:
29+
targets: ${{ steps.matrix.outputs.targets }}
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
- id: matrix
34+
run: |
35+
make ci-targets >> "$GITHUB_OUTPUT"
36+
build:
37+
runs-on: ubuntu-latest
38+
needs: matrix
39+
if: ${{ !inputs.republish }}
40+
strategy:
41+
matrix:
42+
target: ${{ fromJSON(needs.matrix.outputs.targets) }}
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
- name: Set up Go
47+
uses: actions/setup-go@v5
48+
with:
49+
go-version-file: go.mod
50+
- name: Build plugin
51+
run: |
52+
make build PLUGIN=${{ inputs.plugin }} TARGET=${{ matrix.target }} VERSION=${{ inputs.version }}
53+
- name: Upload Artifact
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: plugin-${{ matrix.target }}
57+
path: bin/*
58+
download-release:
59+
runs-on: ubuntu-latest
60+
needs: matrix
61+
if: ${{ inputs.republish }}
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v4
65+
- name: Download release assets
66+
run: |
67+
mkdir -p bin tmp
68+
# Download the compressed binary archives
69+
gh release download ${{ inputs.plugin }}-${{ inputs.version }} --pattern "*.tar.gz" --dir tmp
70+
gh release download ${{ inputs.plugin }}-${{ inputs.version }} --pattern "*.zip" --dir tmp
71+
72+
# Extract binaries from archives
73+
find tmp -name '*.tar.gz' -exec tar xfz \{\} -C bin --wildcards "openbao-plugin-*" \;
74+
find tmp -name '*.zip' -exec unzip -j \{\} "openbao-plugin-*" -d bin \;
75+
76+
# Rename ARM binaries from older releases
77+
for file in bin/*_v8.0; do mv "$file" "${file%_v8.0}_v8"; done
78+
79+
ls -la bin/
80+
env:
81+
GH_TOKEN: ${{ github.token }}
82+
- name: Upload Artifact
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: plugin-republish
86+
path: bin/*
87+
push-image:
88+
runs-on: ubuntu-latest
89+
needs: [build, download-release]
90+
if: always() && (needs.build.result == 'success' || needs.download-release.result == 'success')
91+
steps:
92+
- name: Checkout
93+
uses: actions/checkout@v4
94+
- name: Log in to the Container registry
95+
uses: docker/login-action@v3
96+
with:
97+
registry: ghcr.io
98+
username: ${{ github.actor }}
99+
password: ${{ secrets.GITHUB_TOKEN }}
100+
- name: install buildah
101+
run: |
102+
sudo apt-get -y update
103+
sudo apt-get -y install buildah
104+
- name: Download All Artifacts
105+
uses: actions/download-artifact@v4
106+
with:
107+
path: bin
108+
pattern: plugin-*
109+
merge-multiple: true
110+
- name: Push image
111+
run: |
112+
make -j $(nproc) push PLUGIN=${{ inputs.plugin }} VERSION=${{ inputs.version }}
113+
env:
114+
GH_TOKEN: ${{ github.token }}

.github/workflows/release.yaml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types:
6+
- prereleased
7+
- released
8+
9+
permissions:
10+
contents: write
11+
id-token: write
12+
packages: write
13+
14+
jobs:
15+
matrix:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
targets: ${{ steps.matrix.outputs.targets }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- id: matrix
23+
run: |
24+
make ci-targets >> "$GITHUB_OUTPUT"
25+
build:
26+
runs-on: ubuntu-latest
27+
needs: matrix
28+
strategy:
29+
matrix:
30+
target: ${{ fromJSON(needs.matrix.outputs.targets) }}
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Set up Go
35+
uses: actions/setup-go@v5
36+
with:
37+
go-version-file: go.mod
38+
- name: Build plugin
39+
run: |
40+
make build PLUGIN=$(echo ${{github.ref_name}} | cut -d- -f 1-2) TARGET=${{ matrix.target }} VERSION=$(echo ${{github.ref_name}} | cut -d- -f 3)
41+
- name: Upload Artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: plugin-${{ matrix.target }}
45+
path: bin/*
46+
release:
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
- name: Install Syft
53+
uses: anchore/sbom-action/download-syft@v0
54+
- name: GPG Import
55+
id: gpg-import
56+
uses: crazy-max/ghaction-import-gpg@v6
57+
with:
58+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
59+
passphrase: ${{ secrets.GPG_PASSWORD }}
60+
- name: Download All Artifacts
61+
uses: actions/download-artifact@v4
62+
with:
63+
path: bin
64+
pattern: plugin-*
65+
merge-multiple: true
66+
- name: Release plugin
67+
run: |
68+
make -j $(nproc) release PLUGIN=$(echo ${{github.ref_name}} | cut -d- -f 1-2) VERSION=$(echo ${{github.ref_name}} | cut -d- -f 3)
69+
env:
70+
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
71+
- name: upload assets
72+
run: |
73+
gh release upload ${{github.ref_name}} dist/*
74+
env:
75+
GH_TOKEN: ${{ github.token }}
76+
push-image:
77+
runs-on: ubuntu-latest
78+
needs: build
79+
steps:
80+
- name: Checkout
81+
uses: actions/checkout@v4
82+
- name: Log in to the Container registry
83+
uses: docker/login-action@v3
84+
with:
85+
registry: ghcr.io
86+
username: ${{ github.actor }}
87+
password: ${{ secrets.GITHUB_TOKEN }}
88+
- name: install buildah
89+
run: |
90+
sudo apt-get -y update
91+
sudo apt-get -y install buildah
92+
- name: Download All Artifacts
93+
uses: actions/download-artifact@v4
94+
with:
95+
path: bin
96+
pattern: plugin-*
97+
merge-multiple: true
98+
- name: Push image
99+
run: |
100+
make -j $(nproc) push PLUGIN=$(echo ${{github.ref_name}} | cut -d- -f 1-2) VERSION=$(echo ${{github.ref_name}} | cut -d- -f 3)
101+
env:
102+
GH_TOKEN: ${{ github.token }}

.github/workflows/test.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
matrix:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
plugins: ${{ steps.matrix.outputs.plugins }}
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- id: matrix
18+
run: |
19+
make ci-matrix >> "$GITHUB_OUTPUT"
20+
test:
21+
runs-on: ubuntu-latest
22+
needs: matrix
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
plugin: ${{ fromJSON(needs.matrix.outputs.plugins) }}
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
- name: Set up Go
33+
uses: actions/setup-go@v5
34+
with:
35+
go-version-file: go.mod
36+
- name: Run tests
37+
run: make ${{ matrix.plugin }}-test
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Ensure Verified Commits
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
verify_commits:
9+
permissions:
10+
contents: read
11+
id-token: write
12+
pull-requests: read
13+
uses: openbao/openbao/.github/workflows/verify-commits.yml@main

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Added by goreleaser init:
2+
dist/
3+
**/bin/
4+
5+
# test output
6+
*.test

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @openbao/openbao-org-maintainers

Containerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This is a template which is intended to be used with the Makefile in this
2+
# repo.
3+
4+
FROM scratch
5+
ARG TARGETOS
6+
ARG TARGETARCH
7+
LABEL org.opencontainers.image.source=https://github.com/openbao/openbao-plugins
8+
9+
COPY bin/openbao-plugin-${PLUGIN}_${TARGETOS}_${TARGETARCH}* openbao-plugin-${PLUGIN}
10+
11+
ENTRYPOINT ["/openbao-plugin-${PLUGIN}"]

0 commit comments

Comments
 (0)