Skip to content

Commit

Permalink
refactor: use docker-template to reuse code
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzWeber0 committed Sep 5, 2022
1 parent 7643383 commit 3099981
Show file tree
Hide file tree
Showing 9 changed files with 161 additions and 237 deletions.
67 changes: 0 additions & 67 deletions .github/workflows/backend.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: CC0-1.0
name: docs

on:
push:
branches: ['**']
tags: ["v*.*.*"]
pull_request:
branches: [master, staging]
workflow_call:
inputs:
image:
required: true
type: string
context:
required: true
type: string

jobs:
deploy-docs-image:
build-and-push:
runs-on: ubuntu-latest
name: Build and push docs image
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand All @@ -30,15 +29,16 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/dsd-dbs/capella-collab-manager/docs
images: ${{ inputs.image }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v3
with:
context: ./docs/user
context: ${{ inputs.context }}
tags: ${{ steps.meta.outputs.tags }}
push: true
55 changes: 0 additions & 55 deletions .github/workflows/frontend.yml

This file was deleted.

31 changes: 5 additions & 26 deletions .github/workflows/helm.yaml → .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,15 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: CC0-1.0

name: helm
name: integration

on:
push:
branches: ['**']
tags: ["v*.*.*"]
pull_request:
branches: [master, staging]
workflow_run:
workflows: ["push"]
types:
- completed

jobs:
validate-chart:
runs-on: ubuntu-latest
name: Validate helm chart with linter and kubernetes yaml schemas
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install helm
uses: azure/setup-helm@v3
- name: Install go
uses: actions/setup-go@v3
- name: Install kubeconform
run: |
go install github.com/yannh/kubeconform/cmd/kubeconform@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Run helm lint
run: |
helm lint --strict ./helm
- name: Validate chart with kubernetes schema
run : |
helm template ./helm | kubeconform -strict
install-chart:
runs-on: ubuntu-latest
needs: [deploy-frontend-image, deploy-docs-image, deploy-backend-image, deploy-docker-images]
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: CC0-1.0
name: lint

on:
push:
branches: ['**']
tags: ["v*.*.*"]
pull_request:
branches: [master, staging]

jobs:
helm-chart:
runs-on: ubuntu-latest
name: Validate helm chart with linter and kubernetes yaml schemas
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install helm
uses: azure/setup-helm@v3
- name: Install go
uses: actions/setup-go@v3
- name: Install kubeconform
run: |
go install github.com/yannh/kubeconform/cmd/kubeconform@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Run helm lint
run: |
helm lint --strict ./helm
- name: Validate chart with kubernetes schema
run : |
helm template ./helm | kubeconform -strict
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install pre-commit
run: |-
python -m pip install pre-commit
- name: Run pre-commit
run: |-
pre-commit run --all-files
54 changes: 0 additions & 54 deletions .github/workflows/mocks.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/pre-commit.yml

This file was deleted.

Loading

0 comments on commit 3099981

Please sign in to comment.