Skip to content

Commit 9e1e85e

Browse files
committed
feat(helm): add parse-chart-uri action
Signed-off-by: Emilien Escalle <[email protected]>
1 parent 57d529d commit 9e1e85e

38 files changed

Lines changed: 182 additions & 18 deletions

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
version: 2
23
updates:
34
- package-ecosystem: docker

.github/workflows/__need-fix-to-issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
66
branches:
77
- main
88
workflow_dispatch:
9-
#checkov:skip=CKV_GHA_7: required
9+
# checkov:skip=CKV_GHA_7: required
1010
inputs:
1111
manual-commit-ref:
1212
description: "The SHA of the commit to get the diff for"

.github/workflows/__pull-request-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Internal - Pull request - Continuous Integration
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
merge_group:
66
pull_request:
77
branches: [main]

.github/workflows/__shared-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
needs: linter
4141
uses: ./.github/workflows/__test-action-get-image-name.yml
4242

43+
test-action-helm-parse-chart-uri:
44+
needs: linter
45+
uses: ./.github/workflows/__test-action-helm-parse-chart-uri.yml
46+
4347
test-action-helm-release-chart:
4448
needs: linter
4549
uses: ./.github/workflows/__test-action-helm-release-chart.yml

.github/workflows/__test-action-docker-build-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Test for "docker/build-image" action
33
run-name: Test for "docker/build-image" action
44

5-
on:
5+
on: # yamllint disable-line rule:truthy
66
workflow_call:
77

88
permissions:

.github/workflows/__test-action-get-image-metadata.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Test for "docker/get-image-metadata" action
33
run-name: Test for "docker/get-image-metadata" action
44

5-
on:
5+
on: # yamllint disable-line rule:truthy
66
workflow_call:
77

88
permissions:
@@ -15,13 +15,14 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- id: get-image-metadata
18+
- name: Act
19+
id: get-image-metadata
1920
uses: ./actions/docker/get-image-metadata
2021
with:
2122
oci-registry: ghcr.io
2223
image: application-test
2324

24-
- name: Check get image metadata ouputs
25+
- name: Assert - Check get image metadata ouputs
2526
uses: actions/[email protected]
2627
with:
2728
script: |
@@ -67,14 +68,15 @@ jobs:
6768
steps:
6869
- uses: actions/checkout@v4
6970

70-
- id: get-image-metadata
71+
- name: Act
72+
id: get-image-metadata
7173
uses: ./actions/docker/get-image-metadata
7274
with:
7375
oci-registry: ghcr.io
7476
image: application-test
7577
tag: 1.0.0
7678

77-
- name: Check get image metadata ouputs
79+
- name: Assert - Check get image metadata ouputs
7880
uses: actions/[email protected]
7981
with:
8082
script: |

.github/workflows/__test-action-get-image-name.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Test for "docker/get-image-name" action
33
run-name: Test for "docker/get-image-name" action
44

5-
on:
5+
on: # yamllint disable-line rule:truthy
66
workflow_call:
77

88
permissions:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Test for "helm/parse-chart-uri" action
3+
run-name: Test for "actions/helm/parse-chart-uri" action
4+
5+
on: # yamllint disable-line rule:truthy
6+
workflow_call:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
name: Test for "helm/parse-chart-uri" action
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Act
19+
id: parse-chart-uri
20+
uses: ./actions/helm/parse-chart-uri
21+
with:
22+
uri: "ghcr.io/my-org/my-repo/charts/application/my-repo:0.1.0"
23+
24+
- name: Assert - Check parse chart URI ouputs
25+
uses: actions/[email protected]
26+
with:
27+
script: |
28+
const assert = require("assert");
29+
30+
const repositoryOutput = `${{ steps.parse-chart-uri.outputs.repository }}`;
31+
assert.equal(repositoryOutput,"ghcr.io/my-org/my-repo/charts/application", `"repository" output is not valid`);
32+
33+
const nameOutput = `${{ steps.parse-chart-uri.outputs.name }}`;
34+
assert.equal(nameOutput,"my-repo", `"name" output is not valid`);
35+
36+
const versionOutput = `${{ steps.parse-chart-uri.outputs.version }}`;
37+
assert.equal(versionOutput,"0.1.0", `"version" output is not valid`);

.github/workflows/__test-action-helm-release-chart.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@ jobs:
7878
helm pull --version "0.1.0" oci://ghcr.io/hoverkraft-tech/ci-github-container/charts/${{ matrix.chart.name }}-test/ci-github-container
7979
env:
8080
HELM_EXPERIMENTAL_OCI: "1"
81-
8281
# yamllint enable rule:line-length

.github/workflows/__test-action-helm-test-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Test for "helm/test-chart" action
33
run-name: Test for "helm/test-chart" action
44

5-
on:
5+
on: # yamllint disable-line rule:truthy
66
workflow_call:
77

88
permissions:

0 commit comments

Comments
 (0)