Skip to content

Commit

Permalink
Refactor push-to-app-catalog job (#583)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubergesundheit authored Jan 7, 2025
1 parent 22dd177 commit bf18925
Show file tree
Hide file tree
Showing 9 changed files with 211 additions and 501 deletions.
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

0 comments on commit bf18925

Please sign in to comment.