Reputation: 5725
I am developing two separated projects: frontend and backend. I just want to do some steps:
webpack
, build artifacts to build archive directory (/build folder)Here is my IBM DevOps Toolchains
And here is my Delivery Pipeline
Q1: In the DEPLOY FRONTEND stage, how can I copy the build artifacts to the BUILD BACKEND or DEPLOY BACKEND stage? Please note that I already set the input for DEPLOY FRONTEND stage to be the build artifacts from the BUILD FRONTEND stage.
Q2: How can I get the input build artifacts path in the shell script?
Upvotes: 1
Views: 402
Reputation: 61
If you want to use the build artifacts from the "BUILD FRONTEND" in the "BUILD BACKEND" job, you have two options.
1.) As Philippe said, if you aren't using a git input in the "BUILD BACKEND" stage, then simply set the "BUILD BACKEND" input to the stage type and select the "BUILD FRONTEND" stage.
2.) If the "BUILD BACKEND" stage has a git input, then you still need to follow the steps in the first option. After doing this you must configure the build script in the "BUILD BACKEND" to manually pull the git repository you were previously using as input. This usually involves generating oauth2 tokens or personal access tokens depending on the git provider used, for Github see this link. You can store your git credentials or your access tokens as secure properties on your pipeline stage and access them in your script as necessary.
Upvotes: 2
Reputation: 43
Does the BUILD BACKEND need Git repo content ? Or only wants to post process results from BUILD FRONTEND ? If only post processing, then you can point the BUILD BACKEND stage input to use previous stage build result.
Upvotes: 1