-
Notifications
You must be signed in to change notification settings - Fork 0
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
Devops/fairspc 55 GitHub actions #122
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c9cfe7e
Added github actions workflow to package and push helm chart
tgreenwood c03ee02
Removed Travis's scripts and updated README.md
tgreenwood 61ca929
resolved helm linter complain
tgreenwood 793c746
Made the push to repository step conditional (only for dev and releas…
tgreenwood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Package and Push Helm Chart | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- release | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version of the Helm chart to push" | ||
required: false | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare version | ||
run: | | ||
VERSION=$(cat ./VERSION) | ||
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | ||
echo "Building images from the branch: $BRANCH" | ||
if [ $BRANCH != "release" ]; then | ||
VERSION=$VERSION-SNAPSHOT | ||
fi | ||
# override version of custom input is provided | ||
if [[ -n "${{ github.event.inputs.version }}" ]]; then | ||
VERSION=${{ github.event.inputs.version }} | ||
fi | ||
echo "Helm charts version to be deployed: $VERSION" | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
|
||
- name: Setup Helm | ||
uses: azure/setup-helm@v4.1.0 | ||
with: | ||
version: ${{ vars.HELM_VERSION }} | ||
|
||
- name: Login with Helm | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ vars.HELM_REGISTRY }} --username ${{ github.repository_owner }} --password-stdin | ||
|
||
- name: Add/update Helm dependencies | ||
run: | | ||
helm repo add codecentric https://codecentric.github.io/helm-charts | ||
helm dependency update "charts/fairspace-keycloak" | ||
|
||
- name: Lint Helm chart | ||
run: | | ||
helm lint "charts/fairspace-keycloak" | ||
|
||
- name: Package Helm chart | ||
run: | | ||
helm package "charts/fairspace-keycloak" --version ${{ env.VERSION }} | ||
|
||
- name: Push Helm chart to repository | ||
run: | | ||
helm push "fairspace-keycloak-${{ env.VERSION }}.tgz" "oci://${{ vars.HELM_REGISTRY }}" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ fairspaceKeycloak: | |
cpu: "500m" | ||
memory: "2048Mi" | ||
postgresql: | ||
password: "" | ||
|
||
keycloakx: | ||
dbchecker: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to add empty password? Rather have a failing deployment, than default password ""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only reason is to satisfy helm linter's complains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me see what else we can do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I've done it in a different way: it did not fail before my changes because of the default value in pipeline, but linter failed. I made it behaving the same adding brackets what allows to have nullable values. In this case, we will take the default value again if it is absent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, it does not improve, but at least it does not make it worse. I wouldn't spend time on that