Skip to content

Commit

Permalink
ci: use correct needs value to kick off docs auto update (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
mowies authored Jan 17, 2023
1 parent a84d4e4 commit 1acaf33
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 49 deletions.
96 changes: 49 additions & 47 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:

upload_images:
name: Upload images to ghcr registry
needs: [prepare_ci_run, test, component_tests, integration_tests, e2e_tests, performance_tests]
needs: [ prepare_ci_run, test, component_tests, integration_tests, e2e_tests, performance_tests ]
if: github.event_name == 'push' && needs.prepare_ci_run.outputs.NON_FORKED_AND_NON_ROBOT_RUN == 'true' # only run on push to main/maintenance branches
runs-on: ubuntu-22.04
env:
Expand All @@ -213,68 +213,70 @@ jobs:
permissions:
packages: write # Needed for pushing images to the registry
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Check out code
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker Image
uses: docker/build-push-action@v3
with:
context: ${{ matrix.config.folder }}
platforms: linux/amd64,linux/arm64
target: production
tags: |
ghcr.io/keptn/${{ matrix.config.name }}:dev-${{ env.DATETIME }}
build-args: |
GIT_HASH=${{ env.GIT_SHA }}
RELEASE_VERSION=dev-${{ env.DATETIME }}
BUILD_TIME=${{ env.BUILD_TIME }}
CONTROLLER_TOOLS_VERSION=${{ env.CONTROLLER_TOOLS_VERSION }}
SCHEDULER_COMPATIBLE_K8S_VERSION=${{ env.SCHEDULER_COMPATIBLE_K8S_VERSION }}
builder: ${{ steps.buildx.outputs.name }}
push: true
cache-from: type=gha,scope=${{ github.ref_name }}-${{ matrix.config.name }}
cache-to: type=gha,scope=${{ github.ref_name }}-${{ matrix.config.name }}
- name: Build Docker Image
uses: docker/build-push-action@v3
with:
context: ${{ matrix.config.folder }}
platforms: linux/amd64,linux/arm64
target: production
tags: |
ghcr.io/keptn/${{ matrix.config.name }}:dev-${{ env.DATETIME }}
build-args: |
GIT_HASH=${{ env.GIT_SHA }}
RELEASE_VERSION=dev-${{ env.DATETIME }}
BUILD_TIME=${{ env.BUILD_TIME }}
CONTROLLER_TOOLS_VERSION=${{ env.CONTROLLER_TOOLS_VERSION }}
SCHEDULER_COMPATIBLE_K8S_VERSION=${{ env.SCHEDULER_COMPATIBLE_K8S_VERSION }}
builder: ${{ steps.buildx.outputs.name }}
push: true
cache-from: type=gha,scope=${{ github.ref_name }}-${{ matrix.config.name }}
cache-to: type=gha,scope=${{ github.ref_name }}-${{ matrix.config.name }}

- name: Install controller-gen
if: matrix.config.name == 'keptn-lifecycle-operator' || matrix.config.name == 'keptn-cert-manager'
working-directory: ./${{ matrix.config.folder }}
run: make controller-gen
- name: Install controller-gen
if: matrix.config.name == 'keptn-lifecycle-operator' || matrix.config.name == 'keptn-cert-manager'
working-directory: ./${{ matrix.config.folder }}
run: make controller-gen

- name: Generate release.yaml
if: matrix.config.name != 'functions-runtime'
working-directory: ./${{ matrix.config.folder }}
env:
TAG: dev-${{ env.DATETIME }}
run: make release-manifests
- name: Generate release.yaml
if: matrix.config.name != 'functions-runtime'
working-directory: ./${{ matrix.config.folder }}
env:
TAG: dev-${{ env.DATETIME }}
run: make release-manifests

- name: Upload release.yaml
if: matrix.config.name != 'functions-runtime'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.name }}-manifest
path: ${{ matrix.config.folder }}/config/rendered/release.yaml
- name: Upload release.yaml
if: matrix.config.name != 'functions-runtime'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.name }}-manifest
path: ${{ matrix.config.folder }}/config/rendered/release.yaml

update-docs:
name: Update Documentation
needs:
- prepare_ci_run
if: github.event_name == 'push' && needs.prepare_ci_run.outputs.NON_FORKED_AND_NON_ROBOT_RUN == 'true'
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Update Documentation
uses: ./.github/actions/update-documentation
if: github.event_name == 'push' && needs.prepare_ci_run.outputs.NON_FORKED_AND_NON_ROBOT_RUN == 'true'
with:
version: "dev"
klt-repo: ${{ github.workspace }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
update-docs:
name: Update Documentation
needs:
- release-please
- release-please
if: needs.release-please.outputs.releases_created == 'true'
runs-on: ubuntu-22.04
steps:
Expand Down
2 changes: 1 addition & 1 deletion examples/support/argo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ kubectl port-forward svc/argocd-server -n argocd 8080:443
Then you can access the UI using http://localhost:8080.

## Installing the Demo Application
To install the demo application, you can use the following command (apply [this manifest](https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/examples/argo/config/app.yaml)):
To install the demo application, you can use the following command (apply [this manifest](https://raw.githubusercontent.com/keptn/lifecycle-toolkit/main/examples/support/argo/config/app.yaml)):
```shell
kubectl apply -f https://raw.githubusercontent.com/keptn-sandbox/lifecycle-toolkit-examples/main/support/argo/config/app.yaml
```
Expand Down

0 comments on commit 1acaf33

Please sign in to comment.