-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for a hosted mode deployment
The "pause" hack no longer works with the latest addon-framework library. The alternative, which is in this commit, is to return an error in the `Manifests` method when the pause annotation is set. It does spam the logs but since this isn't a setting that should be used in production, this seems okay until the following is addressed: open-cluster-management-io/addon-framework#80 Relates: stolostron/backlog#24362 Signed-off-by: mprahl <mprahl@users.noreply.github.com> (cherry picked from commit 12cfe6e3f51534f0d10edab037bbaf49d7f298e2)
- Loading branch information
1 parent
9e47608
commit 27adb05
Showing
39 changed files
with
1,080 additions
and
786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Linting and Unit tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: governance-policy-addon-controller | ||
|
||
jobs: | ||
linting-and-unit-tests: | ||
runs-on: ubuntu-latest | ||
name: Linting and Unit tests | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
path: governance-policy-addon-controller | ||
fetch-depth: 0 # Fetch all history for all tags and branches | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: governance-policy-addon-controller/go.mod | ||
|
||
- name: Verify modules | ||
run: | | ||
go mod verify | ||
- name: Verify format | ||
run: | | ||
make fmt | ||
git diff --exit-code | ||
make lint | ||
- name: Unit and Integration Tests | ||
run: | | ||
make test | ||
- name: Gosec | ||
if: | | ||
github.event_name == 'push' && | ||
github.repository_owner == 'stolostron' && | ||
matrix.kind == 'latest' | ||
run: | | ||
make gosec-scan | ||
- name: SonarCloud Analysis | ||
if: | | ||
github.event_name == 'push' && | ||
github.repository_owner == 'stolostron' && | ||
matrix.kind == 'latest' | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
projectBaseDir: governance-policy-addon-controller | ||
args: > | ||
--debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.