# Issue with parallel building

**URL:** <https://community.codefresh.io/t/issue-with-parallel-building/656>\
**Category:** Pipeline Workflows\
**Created:** [October 27, 2021, 1:35pm UTC](https://community.codefresh.io/t/issue-with-parallel-building/656 "2021-10-27T13:35:49Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![cusl](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/cusl/32/381_2.png) [@cusl](https://community.codefresh.io/u/cusl)\
**Post date:** [October 27, 2021, 1:35pm UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/1 "2021-10-27T13:35:49Z")

</div>

I have “clone, build & push” pipelines and when the steps are sequential all works good. But I want build step to be parallel for integration and production image. I was trying different ways like:

```auto
clone_repository:
build:
  type: parallel
    building_image_int:
    building_image_prod:
push:
  type: parallel
    pushing_image_int:
    pushing_image_prod:

```

AND

```auto
clone:
  type: parallel
    clone_repository_for_int:
    clone_repository_for_prod:
build:
  type: parallel
    building_image_int:
    building_image_prod:
push:
  type: parallel
    pushing_image_int:
    pushing_image_prod:

```

AND

```auto
clone_repository_for_int:
clone_repository_for_prod:
building_image_int:
building_image_prod:
pushing_image_int:
pushing_image_prod:
with "when steps name X on success"

```

but every time I get in my image repository ([gcr.io](http://gcr.io)) only one image with integration and production tags. Why it happens? How can I make parallel building of two images in one pipeline with pushing them to repository?

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [October 29, 2021, 9:05am UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/2 "2021-10-29T09:05:06Z")

</div>

Hello

The example in the documentation is actually how to push two images in parallel [Advanced Workflows with Parallel steps · Codefresh | Docs](https://codefresh.io/docs/docs/codefresh-yaml/advanced-workflows/#example-pushing-multiple-docker-images-in-parallel)

The same thing should also work for docker builds.

Can you post that actual YAML that you used from the first approach? Even better, you can provide the URL of the build that has the issue so that our support team can investigate.

---

<div class="post-metadata">

**Author:** ![cusl](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/cusl/32/381_2.png) [@cusl](https://community.codefresh.io/u/cusl)\
**Post date:** [November 1, 2021, 3:07pm UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/3 "2021-11-01T15:07:18Z")

</div>

Here’s pipeline  
[https://g.codefresh.io/pipelines/edit/workflow?id=608548457cb730ca9950c6c7&pipeline=build-spring-appl&projects=CommonIntegration&projectId=5f572ba3d319493a61915ec5&rightbar=triggers](https://g.codefresh.io/pipelines/edit/workflow?id=608548457cb730ca9950c6c7&pipeline=build-spring-appl&projects=CommonIntegration&projectId=5f572ba3d319493a61915ec5&rightbar=triggers)

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [November 1, 2021, 6:25pm UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/4 "2021-11-01T18:25:13Z")

</div>

Hello

This is the URL of the pipeline. I need the URL of a build instead. It should be something like `https://g.codefresh.io/build/61802b2497fc873039e `

Also you need to enable support access to your account [User Settings · Codefresh | Docs](https://codefresh.io/docs/docs/administration/user-settings/#enable-access-for-support-personnel)

---

<div class="post-metadata">

**Author:** ![cusl](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/cusl/32/381_2.png) [@cusl](https://community.codefresh.io/u/cusl)\
**Post date:** [November 3, 2021, 7:33am UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/5 "2021-11-03T07:33:07Z")

</div>

[https://g.codefresh.io/build/618000c3e78c23258cd590bf](https://g.codefresh.io/build/618000c3e78c23258cd590bf)

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [November 3, 2021, 8:36am UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/6 "2021-11-03T08:36:40Z")

</div>

Thank you.

You also need to enable this checkbox in your account for me to see the build `https://codefresh.io/docs/docs/administration/user-settings/#enable-access-for-support-personnel`

By default your pipelines are not accessible to anybody (not even Codefresh personnel).

---

<div class="post-metadata">

**Author:** ![cusl](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/cusl/32/381_2.png) [@cusl](https://community.codefresh.io/u/cusl)\
**Post date:** [November 3, 2021, 8:54am UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/7 "2021-11-03T08:54:40Z")

</div>

I granted access for you

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [November 3, 2021, 10:08am UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/8 "2021-11-03T10:08:36Z")

</div>

Hello again

The URL that you provided has sequential steps.

I looked at one that is using parallel steps like `https://g.codefresh.io/build/617913af95856313bf06ea52`

It has the following yaml

```yaml
title: Pushing images
type: parallel
stage: push
steps:
  pushing_image_int:
    title: Pushing integration image
    type: push
    candidate: '${{building_image_int}}'
    image_name: '${{CF_REPO_NAME}}'
    tags:
      - '${{BLITZTAG}}'
      - latest
      - '${{CF_BRANCH_TAG_NORMALIZED_LOWER_CASE}}'
    registry: gcr
  pushing_image_prod:
    title: Pushing production image
    type: push
    candidate: '${{building_image_prod}}'
    tags:
      - latest_prod
    image_name: '${{CF_REPO_NAME}}'
    registry: gcr

```

The syntax is correct. The pipeline also has finished successfully.  
Both steps use the same `image_name` property but only have different tags

So the end result should be a multiple tags in GCR but under the same image.

So I am not sure what is the issue here. What was the expected result?

> but every time I get in my image repository ([gcr.io](http://gcr.io)) only one image with integration and production tags. Why it happens? How can I make parallel building of two images in one pipeline with pushing them to repository?

If you want completely different images, you need to use a different image name on each build step. Or am I missing something here?

---

<div class="post-metadata">

**Author:** ![cusl](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/cusl/32/381_2.png) [@cusl](https://community.codefresh.io/u/cusl)\
**Post date:** [November 11, 2021, 8:53am UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/9 "2021-11-11T08:53:53Z")

</div>

Hello

> [@Kostis](#):
>
> So the end result should be a multiple tags in GCR but under the same image.
> 
> So I am not sure what is the issue here. What was the expected result?

I see the issue here because of when I make consistent pipeline like  
clone → build\_integration\_image → build\_production\_image → push\_integration\_image → push\_production\_image all works good and I get 2 images with one name and different tags in GCR. But when I make parallel build steps for integration and production, I get only one image with int and prod tags. But they should be different because they have different dockerfiles.  
So the expected result is to have 2 images after one pipeline executing.  
I don’t understand why it happens like this even if I do 2 clone steps with 2 working\_directory in 2 build steps and 2 push steps with 2 candidates which were built with 2 different dockerfiles.

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [November 11, 2021, 9:16am UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/10 "2021-11-11T09:16:05Z")

</div>

> 2 images with one name and different tags  
> only one image with int and prod tags

Isn’t this the same thing? An image with two tags is actually two different images

[docker.io/example/my-image:int](http://docker.io/example/my-image:int)  
[docker.io/example/my-image:prod](http://docker.io/example/my-image:prod)

are two different images.

And  
[docker.io/example/my-image-A:int](http://docker.io/example/my-image-A:int)  
[docker.io/example/my-image-B:prod](http://docker.io/example/my-image-B:prod)

are also two different images.

Can you post a screenshot from your GCR registry with what you get in the sequential build and what you get with the parallel build? So that I can understand what is the difference?

---

<div class="post-metadata">

**Author:** ![cusl](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/cusl/32/381_2.png) [@cusl](https://community.codefresh.io/u/cusl)\
**Post date:** [November 11, 2021, 1:28pm UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/11 "2021-11-11T13:28:06Z")

</div>

Right, I’m sorry, that’s my fault. When I said “name” I meant image id. Certainly all the images I talked about have the same name. So if I use sequential build, e.g. 618d0ef098f096c7b480bc26 I get in GCR:

 ![seq](https://us1.discourse-cdn.com/flex019/uploads/codefreshtest/original/1X/155545620f591de75ccd5a438972023e3d17fa87.jpeg)

---

<div class="post-metadata">

**Author:** ![cusl](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/cusl/32/381_2.png) [@cusl](https://community.codefresh.io/u/cusl)\
**Post date:** [November 11, 2021, 1:28pm UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/12 "2021-11-11T13:28:41Z")

</div>

And if I use parallel build, e.g. 618d10add253798755b53d2b, I get this:

 ![paral](https://us1.discourse-cdn.com/flex019/uploads/codefreshtest/original/1X/fa56dc477caa9cea71fece2f86606db0472b3175.jpeg)

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [November 12, 2021, 9:31am UTC](https://community.codefresh.io/t/issue-with-parallel-building/656/13 "2021-11-12T09:31:36Z")

</div>

I see.

Ok in that case please open a issue from the top right menu in the Codefresh GUI. Be sure to include the two screenshots and mention the respective build URLS so that our support team can investigate.

To my knowledge, behind the scenes we use the standard registry API to push images
