forked from codefresh-io/cli-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Remove unused manifests (codefresh-io#638)"
This reverts commit a9c1e99.
- Loading branch information
1 parent
1cf136a
commit f9dd29e
Showing
8 changed files
with
146 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
version: '1.0' | ||
mode: parallel | ||
|
||
stages: | ||
- Prepare | ||
- Test | ||
- Release | ||
|
||
steps: | ||
main_clone: | ||
stage: Prepare | ||
title: clone repository | ||
type: git-clone | ||
git: cf_github | ||
repo: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}} | ||
revision: ${{CF_BRANCH}} | ||
|
||
prepare_env_vars: | ||
stage: Prepare | ||
title: prepare-env | ||
image: codefresh/semver:latest | ||
working_directory: manifests/add-cluster | ||
commands: | ||
- cf_export CHART_VERSION=$(yq ".version" helm/Chart.yaml | tr -d '"') | ||
- cf_export IMAGE_VERSION=$(yq ".appVersion" helm/Chart.yaml | tr -d '"') | ||
when: | ||
steps: | ||
- name: main_clone | ||
on: | ||
- success | ||
|
||
compare_versions: | ||
stage: Test | ||
title: Compare versions | ||
image: codefresh/semver:latest | ||
commands: | ||
- hack/compare-versions.sh | ||
when: | ||
steps: | ||
- name: prepare_env_vars | ||
on: | ||
- success | ||
|
||
build_image: | ||
stage: Release | ||
type: build | ||
title: build and push add-cluster image | ||
working_directory: manifests/add-cluster | ||
image_name: codefresh/csdp-add-cluster | ||
tag: ${{IMAGE_VERSION}} | ||
tags: | ||
- latest | ||
- ${{IMAGE_VERSION}} | ||
registry: ${{REGISTRY_INTEGRATION_QUAY}} | ||
buildkit: true | ||
when: | ||
steps: | ||
- name: compare_versions | ||
on: | ||
- success | ||
branch: | ||
only: ["main"] | ||
|
||
build_dev_image: | ||
stage: Release | ||
type: build | ||
title: build and push add-cluster dev image | ||
working_directory: manifests/add-cluster | ||
image_name: codefresh/csdp-add-cluster | ||
tag: ${{CF_BRANCH}} | ||
registry: ${{REGISTRY_INTEGRATION_QUAY}} | ||
buildkit: true | ||
when: | ||
steps: | ||
- name: compare_versions | ||
on: | ||
- success | ||
branch: | ||
ignore: ["main"] | ||
|
||
publish_chart: | ||
stage: Release | ||
title: publish helm chart | ||
image: quay.io/codefresh/golang-ci-helper:latest # change it | ||
working_directory: manifests/add-cluster | ||
environment: | ||
- CHART_VERSION=${{CHART_VERSION}} | ||
commands: | ||
- echo "inside publish helm chart ${CHART_VERSION}" | ||
when: | ||
steps: | ||
- name: build_image | ||
on: | ||
- success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# used by the add-cluster-script.yaml | ||
# compares the helm chart version with the kustomization image version to make sure they are identical | ||
|
||
BASE_DIRECTORY="manifests/add-cluster" | ||
HELM_CHART="${BASE_DIRECTORY}/helm/Chart.yaml" | ||
KUSTOMIZATION_YAML="${BASE_DIRECTORY}/kustomize/kustomization.yaml" | ||
|
||
HELM_VERSION=$(yq ".appVersion" ${HELM_CHART} | tr -d '"') | ||
KUST_VERSION=$(yq '.images | select(.[].name == "quay.io/codefresh/csdp-add-cluster") | .[0].newTag' ${KUSTOMIZATION_YAML} | tr -d '"') | ||
if ! semver-cli equal ${HELM_VERSION} ${KUST_VERSION}; then | ||
echo "mismatched versions:" | ||
echo "helm/Chart.yaml appVersion = ${HELM_VERSION}" | ||
echo "kustomize/kustomization.yaml newTag = ${KUST_VERSION}" | ||
exit 1 | ||
fi | ||
|
||
echo "helm and kustomize versions match: ${HELM_VERSION}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- https://github.com/codefresh-io/csdp-official/add-cluster/kustomize | ||
# This file is here for users with runtime version > 0.0.417 but with clis < 0.0.417 | ||
# That will try to look for the add-cluster manifests in this location instead of | ||
# csdp-official repo. We should remove this when we think clis < 0.0.417 are no longer | ||
# in use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters