The first one (git clone > build docker > push > helm deploy) is triggered when I push changes on my node-js git repo
The second one (git clone ==> helm store ==> helm deploy) is triggered I when push changes to my helm project git repo
For the first pipeline I am using buildID as tag for the docker image
I want to use this buildID on the second pipeline, to avoid re build of the docker image because I made changes only on the helm git repo
Is there any way to store the last buildID of another pipeline or another suggestion to do this
I don’t really understand why the second pipeline will rebuild a docker image since it only deals with Helm charts. Maybe I am missing something here?
Are those pipelines completely separate right now or the first one calls the second (in a parent and child relationship)?
That being said, you can pass any variable from one pipeline to the next with the codefresh run command (see examples here Codefresh API · Codefresh | Docs)
The two pipelines are completly separated, the second one is used only if the helm chart changes.
I want to use the last image built in the first pipeline (myimage:buildID) for this I have to pass the buildID as a custom_values in the second pipeline
At the moment there is no way to communicate between two completely unrelated pipelines.
And I think that this is by design.
Let’s say for a moment that 3 commits were pushed to the nodejs repo at the same time. This will launch 3 pipelines. So if you also start the helm repo pipeline which buildID you think it should use ? The first one that was launched? The last one? This has several implications regarding race conditions.
However the recommended way is to simply connect the two pipelines. So just modify the nodejs pipeline and replace the last step. Instead of performing a Helm deployment it should call the second pipeline with the helm chart. This way you easily reference the build ID.