-
-
Notifications
You must be signed in to change notification settings - Fork 3
ci: add PR workflows, pre-commit, release updates, and build fixes #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| name: Build | ||
| permissions: {} | ||
|
|
||
| on: | ||
| pull_request: | ||
| merge_group: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - nifi-profile: nifi-1.28.1 | ||
| java-version: 11 | ||
| - nifi-profile: nifi-2.6.0 | ||
| java-version: 21 | ||
| - nifi-profile: nifi-2.7.2 | ||
| java-version: 21 | ||
| - nifi-profile: nifi-2.9.0 | ||
| java-version: 21 | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up JDK ${{ matrix.java-version }} | ||
| uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0 | ||
| with: | ||
| java-version: ${{ matrix.java-version }} | ||
| distribution: zulu | ||
| cache: maven | ||
|
|
||
| - name: Build with Maven | ||
| run: | | ||
| ./mvnw \ | ||
| --batch-mode \ | ||
| --no-transfer-progress \ | ||
| --file authorizer/pom.xml \ | ||
| -P${{ matrix.nifi-profile }} \ | ||
| clean verify | ||
|
|
||
| - name: Upload NAR Artifact | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any particular reason to keep the artifact? I assume debugging/testing? Downstream consumers must use a tagged version anyway.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just debugging, but I can remove if needed?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm personally happy to leave it in. CC'ing @lfrancke and @sbernauer.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I only looked at this part and nothing else: I'd say this can (or maybe even should?) go. Thanks for pinging me. |
||
| uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | ||
| with: | ||
| name: opa-authorizer-${{ matrix.nifi-profile }}.nar | ||
| path: authorizer/target/opa-authorizer.nar | ||
| retention-days: 5 | ||
| if-no-files-found: error | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| name: prek | ||
| permissions: {} | ||
|
|
||
| on: | ||
| pull_request: | ||
| merge_group: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| prek: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
| - uses: stackabletech/actions/run-prek@a14cbd08d9e034e2361ea9205b32aff0491885db # v0.15.0 |
|
Techassi marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| name: Build plugin release | ||
| permissions: {} | ||
| on: | ||
| push: | ||
| # Sequence of patterns matched against refs/tags | ||
| tags: | ||
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up JDK 22 | ||
| uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0 | ||
| with: | ||
| java-version: '22' | ||
| distribution: 'zulu' | ||
|
|
||
| - name: Build Plugin | ||
| run: | | ||
| ./mvnw install --file ./authorizer/pom.xml | ||
|
|
||
| - name: Create Release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| TAG_NAME: ${{ github.ref_name }} | ||
| run: | | ||
| gh release create "$TAG_NAME" \ | ||
| --title "Release $TAG_NAME" \ | ||
| --draft=false \ | ||
| --prerelease=false \ | ||
| ./authorizer/target/opa-authorizer.nar |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| # All defaults or options can be checked here: | ||
| # https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml | ||
|
|
||
| # Default state for all rules | ||
| default: true | ||
|
|
||
| # MD013/line-length - Line length | ||
| MD013: | ||
| # Number of characters | ||
| line_length: 9999 | ||
| # Number of characters for headings | ||
| heading_line_length: 9999 | ||
| # Number of characters for code blocks | ||
| code_block_line_length: 9999 | ||
|
|
||
| # MD033/no-inline-html | ||
| MD033: | ||
| allowed_elements: [h1, img, p] | ||
|
|
||
| # MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content | ||
| MD024: | ||
| # Only check sibling headings | ||
| siblings_only: true | ||
|
|
||
| # MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading | ||
| MD041: false # Github issues and PRs already have titles, and H1 is enormous in the description box. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| wrapperVersion=3.3.4 | ||
| distributionType=only-script | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # 6.0.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-merge-conflict | ||
| - id: check-case-conflict | ||
| - id: check-added-large-files | ||
| - id: check-json | ||
| - id: check-yaml | ||
| - id: check-xml | ||
| - id: detect-private-key | ||
| - id: detect-aws-credentials | ||
| args: ["--allow-missing-credentials"] | ||
|
|
||
| - repo: https://github.com/adrienverge/yamllint | ||
| rev: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # 1.37.1 | ||
| hooks: | ||
| - id: yamllint | ||
| args: ["--strict"] | ||
|
|
||
| - repo: https://github.com/igorshubovych/markdownlint-cli | ||
| rev: 192ad822316c3a22fb3d3cc8aa6eafa0b8488360 # 0.45.0 | ||
| hooks: | ||
| - id: markdownlint | ||
| types: [text] | ||
| files: \.md(\.j2)*$ | ||
|
|
||
| - repo: https://github.com/shellcheck-py/shellcheck-py | ||
| rev: v0.10.0.1 # latest version | ||
| hooks: | ||
| - id: shellcheck | ||
| args: ["--severity=info"] | ||
|
|
||
| - repo: https://github.com/rhysd/actionlint | ||
| rev: e7d448ef7507c20fc4c88a95d0c448b848cd6127 # 1.7.8 | ||
| hooks: | ||
| - id: actionlint |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| extends: default | ||
|
|
||
| rules: | ||
| line-length: disable | ||
| truthy: | ||
| check-keys: false | ||
| comments: | ||
| min-spaces-from-content: 1 # Needed due to https://github.com/adrienverge/yamllint/issues/443 | ||
| indentation: | ||
| indent-sequences: consistent | ||
| comments-indentation: disable # This is generally useless and interferes with commented example values | ||
| braces: | ||
| max-spaces-inside: 1 | ||
| max-spaces-inside-empty: 0 |
Uh oh!
There was an error while loading. Please reload this page.