Skip to content

Commit

Permalink
[semver:minor] Adding working_directory (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarfm authored Sep 22, 2023
1 parent 0006345 commit 116075d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/jobs/build_push_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ executor:
password: <<parameters.private_hub_password>>

parameters:
working_directory:
description: 'In which directory to run the steps. Will be interpreted as an absolute path.'
type: string
default: .
path:
description: 'Path to directory containing isopod.yml file'
type: string
Expand Down Expand Up @@ -74,8 +78,11 @@ parameters:
type: string
default: ""

working_directory: ~/project/<< parameters.working_directory >>

steps:
- checkout
- checkout:
path: ~/project
# only really needed for maven/java, but less painful to just do it than to configure it in each java build config
- maven_auth:
maven_credentials: << parameters.maven_credentials >>
Expand Down
9 changes: 8 additions & 1 deletion src/jobs/deploy_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ executor:
password: <<parameters.private_hub_password>>

parameters:
working_directory:
description: 'In which directory to run the steps. Will be interpreted as an absolute path.'
type: string
default: .
path:
description: 'Path to directory containing isopod.yml file'
type: string
Expand Down Expand Up @@ -68,8 +72,11 @@ parameters:
type: string
default: ""

working_directory: ~/project/<< parameters.working_directory >>

steps:
- checkout
- checkout:
path: ~/project
- steps: << parameters.predeploy_steps >>
- deploy:
config: << parameters.path >>/<< parameters.isopod_config >>
Expand Down
9 changes: 8 additions & 1 deletion src/jobs/maven_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ description: >
Supports app-module from monorepo as well as single app from single-app-repo.
parameters:
working_directory:
description: 'In which directory to run the steps. Will be interpreted as an absolute path.'
type: string
default: .
path:
description: 'Path of maven module for the app, or "." for single-app-repo'
type: string
Expand All @@ -18,8 +22,11 @@ parameters:

executor: << parameters.executor >>

working_directory: ~/project/<< parameters.working_directory >>

steps:
- checkout
- checkout:
path: ~/project
- maven_restore_artifacts:
prefix: << parameters.cache_key_prefix >>
path: << parameters.path >>
Expand Down

0 comments on commit 116075d

Please sign in to comment.