kubernetes – is it possible to use Gitlabci parallel matrix to build docker image with certain time delay for each image?

I am having an issue in building multiple docker images with a time delay of 15 min each so that the during the build stage each image connects to a server and do some processing and it should happen one after another.

`build-docker-images:   
 extends: .docker-build-job   
 stage: build   parallel:
    matrix:'
     '- DOCKER_BUILD_CONTEXT: "."
        DOCKER_BUILD_NAME: "$DOCKER_IMAGE1"
        DOCKER_BUILD_DOCKERFILE: "/Dockerfile1"
      - DOCKER_BUILD_CONTEXT: "."
        DOCKER_BUILD_NAME: "$DOCKER_IMAGE2"
        DOCKER_BUILD_DOCKERFILE: "/Dockerfile2"
      - DOCKER_BUILD_CONTEXT: "."`

and so on.

I tried to add sleep of 15 min in between each build like this

  `- DOCKER_BUILD_CONTEXT: "."
    DOCKER_BUILD_NAME: "$DOCKER_IMAGE2"
    DOCKER_BUILD_DOCKERFILE: "/Dockerfile2"
   - sleep: 900`

I also have some of the images which doesn’t require sleep and all are part of single parallel job. I tried to browse through the documentation and portal i am not able to achieve it..

Read more here: Source link