gitlab-ci-local icon indicating copy to clipboard operation
gitlab-ci-local copied to clipboard

when:manual with parallel:matrix

Open Winand opened this issue 6 months ago • 1 comments

When I run gitlab-ci-local with --manual deploy_dev it doesn't start if parallel:matrix is present. And also parallel jobs run as expected if there's no when: manual.

PS > .\gitlab-ci-local.ps1 --manual deploy_dev                              
Using fallback git user.name
Using fallback git user.email
parsing and downloads finished in 130 ms.
json schema validated in 208 ms

pipeline finished in 6.93 s

Minimal .gitlab-ci.yml illustrating the issue

---
stages:
  - release
  - deploy

deploy_dev:
  stage: deploy
  when: manual
  parallel:
    matrix:
      - host:
        - host1.com
        - host2.com
  script:
    - echo HELLO $host

Host information Windows 10 Docker Desktop 4.36.0 gitlab-ci-local 4.60.1

I run gitlab-ci-local in Docker:

FROM almalinux:10
RUN dnf install -y gzip rsync git-core 'dnf-command(config-manager)' && \
    dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \
    dnf install -y docker-ce-cli && \
    dnf clean all
RUN curl -L https://github.com/firecow/gitlab-ci-local/releases/latest/download/linux.gz | \
        gunzip -c > /usr/local/bin/gitlab-ci-local && \
    chmod +x /usr/local/bin/gitlab-ci-local
WORKDIR /ci
ENTRYPOINT ["gitlab-ci-local", "--shell-executor-no-image=false", \
            "--default-image={a_custom_image:latest}"]

gitlab-ci-local run script:

docker run --rm -it `
    -v /var/run/docker.sock:/var/run/docker.sock -v "$(pwd):/ci" `
    -v "${env:USERPROFILE}/.gitlab-ci-local:/root/.gitlab-ci-local" `
    gitlab-ci-local:latest @args

Winand avatar Jun 05 '25 11:06 Winand

this should work

gitlab-ci-local --manual 'deploy_dev: [host1.com]' --manual 'deploy_dev: [host2.com]'

ANGkeith avatar Jun 07 '25 13:06 ANGkeith

Please feel free to reopen, if proposed solution doesn't work.

firecow avatar Jul 29 '25 06:07 firecow

@firecow ok, at first I didn't realize that GitLab behaves the same way

Winand avatar Jul 29 '25 06:07 Winand