-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adjust workflow, and apply fix to argocd
- Loading branch information
Showing
12 changed files
with
6 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,61 +29,11 @@ jobs: | |
- name: Lint Helm Chart | ||
run: | | ||
helm lint --values ./chart/pixelaw-core-demo1/values.yaml ./chart/pixelaw-core-demo1 | ||
helm lint --values ./chart/pixelaw-core/values.yaml ./chart/pixelaw-core | ||
helmRelease: | ||
needs: [helmTest] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get latest release | ||
id: get-latest-release | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const release = await github.repos.getLatestRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo | ||
}); | ||
return release.data.tag_name; | ||
- name: Set ENV variable | ||
run: echo "VERSION=${{ steps.get-latest-release.outputs.result }}" >> $GITHUB_ENV | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.8.1 | ||
|
||
- name: custom packaging | ||
run: | | ||
rm -rf .cr-release-packages | ||
mkdir -p .cr-release-packages | ||
helm package chart/$PROJECTNAME-demo1 --app-version=${VERSION:1} --version=${VERSION:1} --destination=.cr-release-packages | ||
- name: Run chart-releaser | ||
# switch back to helm/chart-releaser-action if this contribution is ever mergedd | ||
uses: askcloudarchitech/chart-releaser-action@skip-packaging-option | ||
with: | ||
skip_packaging: true | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
deploy: | ||
needs: [helmRelease] | ||
needs: [helmTest] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
|
@@ -118,16 +68,15 @@ jobs: | |
ARGOCD_AUTH_TOKEN: ${{ secrets.ARGOCD_AUTH_TOKEN }} | ||
run: | | ||
argocd app create $PROJECTNAME-demo1 \ | ||
--repo https://pixelaw.github.io/core/ \ | ||
--repo https://github.com/pixelaw/core.git \ | ||
--path chart/ \ | ||
--revision ${VERSION:1} \ | ||
--helm-chart $PROJECTNAME \ | ||
--revision demo1 \ | ||
--dest-namespace $PROJECTNAME-demo1 \ | ||
--dest-server https://kubernetes.default.svc \ | ||
--helm-set-string dockerImage=$REGISTRY/$PROJECTNAME:${VERSION} \ | ||
--upsert \ | ||
--server $ARGOCD_SERVER \ | ||
--auth-token $ARGOCD_AUTH_TOKEN | ||
argocd app sync pixelaw-core | ||
argocd app wait pixelaw-core | ||
argocd app sync $PROJECTNAME-demo1 | ||
argocd app wait $PROJECTNAME-demo1 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.