Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor push-to-app-catalog job #583

Merged
merged 7 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Reorder commands in `push-to-app-catalog` job to prevent duplicated code and duplicated executions of architect and app-build-suite.

## [5.11.2] - 2024-12-04

### Added
Expand Down
29 changes: 29 additions & 0 deletions src/commands/determine-catalog-name.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
parameters:
app_catalog:
type: "string"
app_catalog_test:
type: "string"
on_tag:
type: boolean
default: true
description: |
When this is `false`, commits to `master` will be pushed to `app_catalog` instead of `app_catalog_test`.
Set this to `false` for deployments that follow a a master branch for production releases rather than
using tags (the default).
steps:
- when:
condition: << parameters.on_tag >>
steps:
- run:
name: "architect/determine-catalog-name: Determine target app catalog based on presence of tag"
command: |
[ -z ${CIRCLE_TAG} ] && echo -n '<< parameters.app_catalog_test >>' | tee .app_catalog_name || echo -n '<< parameters.app_catalog >>' | tee .app_catalog_name
echo -n ${CIRCLE_TAG} | tee .reference
- unless:
condition: << parameters.on_tag >>
steps:
- run:
name: "architect/determine-catalog-name: Determine target app catalog based on branch name"
command: |
[[ ${CIRCLE_BRANCH} == master ]] && echo -n '<< parameters.app_catalog >>' | tee .app_catalog_name || echo -n '<< parameters.app_catalog_test >>' | tee .app_catalog_name
echo -n ${CIRCLE_SHA1} | tee .reference
2 changes: 1 addition & 1 deletion src/commands/helm-conftest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
description: Test conftest policies
steps:
- run:
name: Test conftest policies
name: "architect/helm-conftest: Test conftest policies"
command: |
sha=4885005d95418aa13a578fe9de232808d1b3adcd
policies=$(echo https://raw.githubusercontent.com/swade1987/deprek8ion/${sha}/policies/kubernetes-{1.16,1.17,1.18,1.19,1.20,1.22}.rego | tr ' ' ',')
Expand Down
121 changes: 0 additions & 121 deletions src/commands/package-and-push-git-with-abs.yaml

This file was deleted.

110 changes: 0 additions & 110 deletions src/commands/package-and-push-git.yaml

This file was deleted.

110 changes: 0 additions & 110 deletions src/commands/package-and-push-oci-with-abs.yaml

This file was deleted.

Loading
Loading