Làm thể nào để ta có thể chia sẽ value từ pipline A sang pipeline B
Ở step này thì nẽ build ra file .jar


Tiếp đến bạn tạo 1 Pipeline khác.
Để copy các artifacts và đẩy lên S3.


Mục tiêu của chúng ta là Pipeline Deploy sẽ copy các Artifact của Pipeline Build
Lúc này thì Pipeline Deploy sẽ depend vào Pipeline B =>
Bạn cần chọn như hình.

Tiếp theo để share artifact giữa hai pipeline thì bạn tiếp tục click vào artifact.



Bạn có thể thấy các gợi ý artifact có sẵn của pipeline A

Bạn thực hiện edit artifact rules để scope nó rộng hơn bằng cách thêm dấu * (sao)




Bạn thấy là pipeline Deploy đã copy được artifact của pipeline Build và đẩy lên S3
Ngoài ra Teamcity còn cho phép Pass Build Parameters
- TeamCity allows you to pass parameter values from one build configuration to another in a build chain. In Pipeline B, you can reference parameters from Pipeline A using the following syntax:
%dep.<PipelineA_ID>.<parameterName>%
- Replace
<PipelineA_ID>
with the build configuration ID of Pipeline A and<parameterName>
with the name of the parameter you want to access63.
- For example, if Pipeline A sets a parameter called
version
, Pipeline B can reference it as:
%dep.PipelineA.version%
This works for any parameter defined or set in Pipeline A, including environment variables or custom parameters
https://stackoverflow.com/questions/36774070/passing-the-configuration-variable-on-teamcity