Skip to content

Commit

Permalink
fix: test-python and deploy-with-kustomize job (#88)
Browse files Browse the repository at this point in the history
* fix: passing store-coverage-artifacts from job to command
* fix: adding cluster-name pass through to deploy-with-kustomize
* fix: added resource_class to test-python
  • Loading branch information
bnormington authored Jun 24, 2024
1 parent 2c6b851 commit f9dfcf1
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 12 deletions.
39 changes: 29 additions & 10 deletions src/jobs/deploy-with-kustomize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,38 @@ parameters:
notification-channel:
type: string
default:

cluster-name:
type: string
default:

executor:
name: python-default
tag: << parameters.executor-tag >>

steps:
- deploy-with-kustomize:
cluster-name: goodway-<< parameters.environment >>
image-name: $AWS_ECR_REGISTRY_URL/microservice/<< parameters.app-name >>
kustomize-path: << parameters.kube-path >>/overlays/<< parameters.environment >>
namespace: << parameters.app-name >>-<< parameters.environment >>
wait-for-rollout: << parameters.wait-for-rollout >>
post-deploy-steps: << parameters.post-deploy-steps >>
deployment-resource-name: << parameters.deployment-resource-name >>
notification-channel: << parameters.notification-channel >>

- unless:
condition: << parameters.cluster-name >>
steps:
- deploy-with-kustomize:
cluster-name: goodway-<< parameters.environment >>
image-name: $AWS_ECR_REGISTRY_URL/microservice/<< parameters.app-name >>
kustomize-path: << parameters.kube-path >>/overlays/<< parameters.environment >>
namespace: << parameters.app-name >>-<< parameters.environment >>
wait-for-rollout: << parameters.wait-for-rollout >>
post-deploy-steps: << parameters.post-deploy-steps >>
deployment-resource-name: << parameters.deployment-resource-name >>
notification-channel: << parameters.notification-channel >>
- when:
condition: << parameters.cluster-name >>
steps:
- deploy-with-kustomize:
cluster-name: << parameters.cluster-name >>
image-name: $AWS_ECR_REGISTRY_URL/microservice/<< parameters.app-name >>
kustomize-path: << parameters.kube-path >>/overlays/<< parameters.environment >>
namespace: << parameters.app-name >>-<< parameters.environment >>
wait-for-rollout: << parameters.wait-for-rollout >>
post-deploy-steps: << parameters.post-deploy-steps >>
deployment-resource-name: << parameters.deployment-resource-name >>
notification-channel: << parameters.notification-channel >>

4 changes: 3 additions & 1 deletion src/jobs/test-python-dsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ parameters:
executor:
name: python-default
tag: << parameters.executor-tag >>
resource_class: << parameters.executor-resource-class >>

steps:
- test-python:
Expand All @@ -79,4 +80,5 @@ steps:
test-steps: << parameters.test-steps >>
lint: << parameters.lint >>
lint-steps: << parameters.lint-steps >>
tar-coverage-artifacts-path: << parameters.tar-coverage-artifacts-path >>
tar-coverage-artifacts-path: << parameters.tar-coverage-artifacts-path >>
store-coverage-artifacts: << parameters.store-coverage-artifacts >>
16 changes: 15 additions & 1 deletion src/jobs/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ parameters:
executor-tag:
type: string
default: "3.7"
executor-resource-class:
default: large
description: Configure the executor resource class
enum:
- small
- medium
- medium+
- large
- xlarge
- 2xlarge
- 2xlarge+
type: enum
cache-key:
type: string
default: v0-dependencies
Expand Down Expand Up @@ -58,6 +70,7 @@ parameters:
executor:
name: python-default
tag: << parameters.executor-tag >>
resource_class: << parameters.executor-resource-class >>

steps:
- test-python:
Expand All @@ -67,4 +80,5 @@ steps:
test-steps: << parameters.test-steps >>
lint: << parameters.lint >>
lint-steps: << parameters.lint-steps >>
tar-coverage-artifacts-path: << parameters.tar-coverage-artifacts-path >>
tar-coverage-artifacts-path: << parameters.tar-coverage-artifacts-path >>
store-coverage-artifacts: << parameters.store-coverage-artifacts >>

0 comments on commit f9dfcf1

Please sign in to comment.