Skip to content

Commit

Permalink
1745 eliminate charts (#2002)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeReaper authored and frontend-specialisten committed Sep 5, 2023
1 parent 3a43790 commit b157059
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 100 deletions.
55 changes: 10 additions & 45 deletions .github/workflows/eo-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,35 +151,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.EO_SONAR_TOKEN }}

bump_helm_chart_version:
bump_configuration_version:
runs-on: ubuntu-latest
name: Bump Helm chart version
name: Bump configuration version
if: ${{ github.event_name == 'pull_request' && needs.affected.outputs.is-affected == 'true' }}
needs: affected
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/yaml-increment-version
with:
yaml-file: build/infrastructure/eo/chart/Chart.yaml
yaml-file: build/infrastructure/eo/configuration.yaml
yaml-path: version
token: ${{ secrets.PAT_TOKEN }}

bump_app_version:
runs-on: ubuntu-latest
name: Bump App version
if: ${{ github.event_name == 'pull_request' && needs.affected.outputs.is-affected == 'true' }}
needs: affected
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/yaml-increment-version
with:
yaml-file: build/infrastructure/eo/chart/values.yaml
yaml-path: app.image.tag
token: ${{ secrets.PAT_TOKEN }}

build_container_and_release_chart:
build_container:
runs-on: ubuntu-latest
name: Build containers
needs:
Expand All @@ -202,37 +188,16 @@ jobs:
image-name: ${{ matrix.containers.image_name }}
image-tag: ${{ matrix.containers.image_tag }}

- name: Get info from Chart.yaml
id: chart-info
uses: Energinet-DataHub/energy-origin/.github/actions/chart-info@main
with:
chart-folder: build/infrastructure/eo/chart
chart-version: version

- name: Release helm chart
uses: Energinet-DataHub/energy-origin/.github/actions/helm-release-bundle-chart@main
with:
containers: ${{ needs.define_build.outputs.containers }}
deploy-key: ${{ secrets.DEPLOY_KEY_HELM_CHARTS }}
chart-folder: build/infrastructure/eo/chart
chart-repository: ${{ github.repository_owner }}/helm-charts
chart-version: ${{ needs.define_build.outputs.chart_version }}
version_yaml_path_prefix: "" # yamllint disable-line rule:quoted-strings

update-environment:
name: Update preview environment
needs:
- build_container_and_release_chart
name: Update environment
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref_name == 'main' || github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'preview/')
needs:
- build_container
concurrency: commits-base-environment
steps:
- uses: actions/checkout@v3

- name: Update environment
uses: Energinet-DataHub/energy-origin/.github/actions/update-base-environment@main
with:
env_branch: ${{ github.event_name == 'push' && github.ref_name == 'main' && 'main' || github.event.pull_request.head.ref }}
app_name: ${{ needs.build_container_and_release_chart.outputs.chart_name }}
chart_name: ${{ needs.build_container_and_release_chart.outputs.chart_name }}
chart_version: ${{ needs.build_container_and_release_chart.outputs.chart_version }}
configuration: build/infrastructure/eo/configuration.yaml
deploy_key: ${{ secrets.DEPLOY_KEY_BASE_ENVIRONMENT }}
dry_run: ${{ !(github.event_name == 'push' && github.ref_name == 'main' || github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'preview/')) }}
5 changes: 0 additions & 5 deletions build/infrastructure/eo/chart/Chart.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions build/infrastructure/eo/chart/templates/app-deployment.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions build/infrastructure/eo/chart/templates/app-service.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions build/infrastructure/eo/chart/values.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions build/infrastructure/eo/configuration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: eo-frontend
version: 0.3.339
repo: ghcr.io/energinet-datahub
references:
- file: k8s/energy-origin-apps/frontend/base/deployment.yaml
path: .spec.template.spec.containers[] | select(.name == "frontend-app") | .image

0 comments on commit b157059

Please sign in to comment.