Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to use environment variable as path in artifact

Zackky Muhammad October 15, 2018

I need to use env variable as path in artifacts, so path can be more configurable.

 

my pipelines is like this:

- step:
name: Install and build
caches:
- yarn #cache is defined below in the definitions section
script:
- cd $FRONTEND_PATH
- yarn install
- yarn build
artifacts:
- $FRONTEND_PATH/build/**

 

but this doesn't work.

2 answers

2 votes
Deleted user January 4, 2019

I'm running into this issue as well. Were you able to find a solution, @Zackky Muhammad?

 

Thanks!

0 votes
Luke Siedle February 13, 2020

I wasn't able to solve this with a var, but knowing that your path is probably unique helps, for example

- $FRONTEND_PATH/build/**

 

Can become:

- **/build/**

 If you can be even more specific with your path you could rule out creating unnecessary artifacts.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events