Skip to content

Commit

Permalink
chore: Align cutom-pipeline for new kaniko approach (#47)
Browse files Browse the repository at this point in the history
Jira EPMDEDP-12618
Related #47

Change-Id: I56c06eeacd44d5f29502e243578fbc9102b277f4
  • Loading branch information
Mykola Serdiuk committed Oct 17, 2023
1 parent d23d296 commit b833506
Show file tree
Hide file tree
Showing 17 changed files with 112 additions and 153 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,6 @@ spec:
- name: source
workspace: shared-workspace

- name: create-ecr-repository
taskRef:
kind: Task
name: create-ecr-repository
runAfter:
- build
params:
- name: REPO_NAME
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME)"

- name: kaniko-build
taskRef:
kind: Task
Expand All @@ -156,10 +146,14 @@ spec:
- get-version
- build
params:
- name: IMAGE
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME):$(tasks.get-version.results.IS_TAG)"
- name: KANIKO_CACHE_REPO
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/kaniko-cache"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
- name: kaniko-cache-path
value: "kaniko-cache"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,21 @@ spec:
- name: source
workspace: shared-workspace

- name: create-ecr-repository
taskRef:
name: create-ecr-repository
runAfter:
- dockerfile-lint
params:
- name: REPO_NAME
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME)"

- name: kaniko-build
taskRef:
name: kaniko
runAfter:
- create-ecr-repository
- get-version
params:
- name: IMAGE
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME):$(tasks.get-version.results.IS_TAG)"
- name: KANIKO_CACHE_REPO
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/kaniko-cache"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
- name: kaniko-cache-path
value: "kaniko-cache"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,6 @@ spec:
- name: source
workspace: shared-workspace

- name: create-ecr-repository
taskRef:
kind: Task
name: create-ecr-repository
runAfter:
- build
params:
- name: REPO_NAME
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME)"

- name: kaniko-build
taskRef:
kind: Task
Expand All @@ -156,10 +146,14 @@ spec:
- get-version
- build
params:
- name: IMAGE
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME):$(tasks.get-version.results.IS_TAG)"
- name: KANIKO_CACHE_REPO
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/kaniko-cache"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
- name: kaniko-cache-path
value: "kaniko-cache"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,21 @@ spec:
- name: source
workspace: shared-workspace

- name: create-ecr-repository
taskRef:
kind: Task
name: create-ecr-repository
runAfter:
- sonar
params:
- name: REPO_NAME
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME)"

- name: kaniko-build
taskRef:
kind: Task
name: kaniko
runAfter:
- create-ecr-repository
params:
- name: IMAGE
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME):$(tasks.get-version.results.IS_TAG)"
- name: KANIKO_CACHE_REPO
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/kaniko-cache"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
- name: kaniko-cache-path
value: "kaniko-cache"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,25 +137,21 @@ spec:
- name: source
workspace: shared-workspace

- name: create-ecr-repository
taskRef:
kind: Task
name: create-ecr-repository
runAfter:
- build
params:
- name: REPO_NAME
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME)"

- name: kaniko-build
taskRef:
kind: Task
name: kaniko
runAfter:
- create-ecr-repository
params:
- name: IMAGE
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME):$(tasks.get-version.results.IS_TAG)"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
- name: kaniko-cache-path
value: "kaniko-cache"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,25 +137,21 @@ spec:
- name: source
workspace: shared-workspace

- name: create-ecr-repository
taskRef:
kind: Task
name: create-ecr-repository
runAfter:
- build
params:
- name: REPO_NAME
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME)"

- name: kaniko-build
taskRef:
kind: Task
name: kaniko
runAfter:
- create-ecr-repository
params:
- name: IMAGE
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME):$(tasks.get-version.results.IS_TAG)"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
- name: kaniko-cache-path
value: "kaniko-cache"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,25 +137,21 @@ spec:
- name: source
workspace: shared-workspace

- name: create-ecr-repository
taskRef:
kind: Task
name: create-ecr-repository
runAfter:
- build
params:
- name: REPO_NAME
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME)"

- name: kaniko-build
taskRef:
kind: Task
name: kaniko
runAfter:
- create-ecr-repository
params:
- name: IMAGE
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/$(params.CODEBASE_NAME):$(tasks.get-version.results.IS_TAG)"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
- name: kaniko-cache-path
value: "kaniko-cache"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
kind: Task
name: commit-validate
runAfter:
- fetch-repository
- init-values
params:
- name: COMMIT_MESSAGE_PATTERN
value: $(params.COMMIT_MESSAGE_PATTERN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ spec:
runAfter:
- fetch-repository
params:
- name: IMAGE
value: "$(params.dockerhub-account)/$(params.codebase-name):$(params.version)"
- name: IMAGE_TAR
value: "$(params.codebase-name)_$(params.version)"
- name: KANIKO_CACHE_REPO
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/kaniko-cache"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ spec:
runAfter:
- build
params:
- name: IMAGE
value: "$(params.dockerhub-account)/$(params.codebase-name):$(params.version)"
- name: IMAGE_TAR
value: "$(params.codebase-name)_$(params.version)"
- name: KANIKO_CACHE_REPO
value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/kaniko-cache"
- name: codebase-name
value: "$(params.CODEBASE_NAME)"
- name: image-tag
value: "$(tasks.get-version.results.IS_TAG)"
- name: image-tar
value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)"
workspaces:
- name: source
workspace: shared-workspace
Expand Down
15 changes: 7 additions & 8 deletions charts/custom-pipelines/tests/test_edp_admin_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ def test_operator():
assert "test" in b[6]["name"]
assert "sonar" in b[7]["name"]
assert "build" in b[8]["name"]
assert "create-ecr-repository" in b[9]["name"]
assert "kaniko-build" in b[10]["name"]
assert "ecr-to-docker" in b[11]["name"]
assert "set-version" in b[12]["name"]
assert "wait-for" in b[13]["name"]
assert "helm-push-gh-pages" in b[14]["name"]
assert "git-tag" in b[15]["name"]
assert "update-cbis" in b[16]["name"]
assert "kaniko-build" in b[9]["name"]
assert "ecr-to-docker" in b[10]["name"]
assert "set-version" in b[11]["name"]
assert "wait-for" in b[12]["name"]
assert "helm-push-gh-pages" in b[13]["name"]
assert "git-tag" in b[14]["name"]
assert "update-cbis" in b[15]["name"]
assert "update-cbb" in ht["pipeline"][build]["spec"]["finally"][0]["name"]
assert "push-to-jira" in ht["pipeline"][build]["spec"]["finally"][1]["name"]
assert "send-to-microsoft-teams-failed" in ht["pipeline"][build]["spec"]["finally"][2]["name"]
2 changes: 1 addition & 1 deletion charts/custom-pipelines/tests/test_edp_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_operator():
assert "init-values" in b[2]["name"]
assert "get-version" in b[3]["name"]
assert "dockerfile-lint" in b[4]["name"]
assert "create-ecr-repository" in b[5]["name"]
assert "kaniko-build" in b[5]["name"]
assert "update-cbb" in ht["pipeline"][build]["spec"]["finally"][0]["name"]
assert "push-to-jira" in ht["pipeline"][build]["spec"]["finally"][1]["name"]
assert "send-to-microsoft-teams-failed" in ht["pipeline"][build]["spec"]["finally"][2]["name"]
Expand Down
15 changes: 7 additions & 8 deletions charts/custom-pipelines/tests/test_edp_tekton.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ def test_operator():
assert "test" in b[6]["name"]
assert "sonar" in b[7]["name"]
assert "build" in b[8]["name"]
assert "create-ecr-repository" in b[9]["name"]
assert "kaniko-build" in b[10]["name"]
assert "ecr-to-docker" in b[11]["name"]
assert "set-version" in b[12]["name"]
assert "wait-for" in b[13]["name"]
assert "helm-push-gh-pages" in b[14]["name"]
assert "git-tag" in b[15]["name"]
assert "update-cbis" in b[16]["name"]
assert "kaniko-build" in b[9]["name"]
assert "ecr-to-docker" in b[10]["name"]
assert "set-version" in b[11]["name"]
assert "wait-for" in b[12]["name"]
assert "helm-push-gh-pages" in b[13]["name"]
assert "git-tag" in b[14]["name"]
assert "update-cbis" in b[15]["name"]
assert "update-cbb" in ht["pipeline"][build]["spec"]["finally"][0]["name"]
assert "push-to-jira" in ht["pipeline"][build]["spec"]["finally"][1]["name"]
assert "send-to-microsoft-teams-failed" in ht["pipeline"][build]["spec"]["finally"][2]["name"]
Expand Down
15 changes: 7 additions & 8 deletions charts/custom-pipelines/tests/test_headlamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ def test_operator():
assert "build" in b[7]["name"]
assert "test" in b[8]["name"]
assert "sonar" in b[9]["name"]
assert "create-ecr-repository" in b[10]["name"]
assert "kaniko-build" in b[11]["name"]
assert "ecr-to-docker" in b[12]["name"]
assert "set-version" in b[13]["name"]
assert "wait-for" in b[14]["name"]
assert "helm-push-gh-pages" in b[15]["name"]
assert "git-tag" in b[16]["name"]
assert "update-cbis" in b[17]["name"]
assert "kaniko-build" in b[10]["name"]
assert "ecr-to-docker" in b[11]["name"]
assert "set-version" in b[12]["name"]
assert "wait-for" in b[13]["name"]
assert "helm-push-gh-pages" in b[14]["name"]
assert "git-tag" in b[15]["name"]
assert "update-cbis" in b[16]["name"]
assert "update-cbb" in ht["pipeline"][build]["spec"]["finally"][0]["name"]
assert "push-to-jira" in ht["pipeline"][build]["spec"]["finally"][1]["name"]
assert "send-to-microsoft-teams-failed" in ht["pipeline"][build]["spec"]["finally"][2]["name"]
15 changes: 7 additions & 8 deletions charts/custom-pipelines/tests/test_keycloak_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ def test_keycloak_operator():
assert "test" in b[6]["name"]
assert "sonar" in b[7]["name"]
assert "build" in b[8]["name"]
assert "create-ecr-repository" in b[9]["name"]
assert "kaniko-build" in b[10]["name"]
assert "ecr-to-docker" in b[11]["name"]
assert "set-version" in b[12]["name"]
assert "wait-for" in b[13]["name"]
assert "helm-push-gh-pages" in b[14]["name"]
assert "git-tag" in b[15]["name"]
assert "update-cbis" in b[16]["name"]
assert "kaniko-build" in b[9]["name"]
assert "ecr-to-docker" in b[10]["name"]
assert "set-version" in b[11]["name"]
assert "wait-for" in b[12]["name"]
assert "helm-push-gh-pages" in b[13]["name"]
assert "git-tag" in b[14]["name"]
assert "update-cbis" in b[15]["name"]
assert "update-cbb" in ht["pipeline"][build]["spec"]["finally"][0]["name"]
assert "push-to-jira" in ht["pipeline"][build]["spec"]["finally"][1]["name"]
assert "send-to-microsoft-teams-failed" in ht["pipeline"][build]["spec"]["finally"][2]["name"]
Loading

0 comments on commit b833506

Please sign in to comment.