mdubourg001 / glci

🦊 Test your Gitlab CI Pipelines changes locally using Docker.
571 stars 16 forks source link

v0.4.0 TypeError: Cannot read property 'untracked' of undefined #32

Closed gilzow closed 3 years ago

gilzow commented 3 years ago

Just upgraded to v0.4.0 to test out the new --yml param you added (thank you, BTW), and I'm getting the following error when running my parent .gitlab-ci.yml file:

TypeError: Cannot read property 'untracked' of undefined
    at main$1 (/Users/gilzowp/.config/yarn/global/node_modules/glci/dist/cli.min.js:789:25)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)

The gitlab-ci.yml file is fairly straightforward

stages:
  - setup
  - buildconfig
  - runbackstop

EnsureDeploy:
  stage: setup
  image:
    name: boyerj/platform-ci:0.6.2
  script:
    # redeploy the env to synthesize an env coming up after an MR. All code removed for local pipeline testing
   # simply state that the MR environment was deployed
    - echo "We just deployed the environment"

Find Environment:
  stage: setup
  image:
    name: boyerj/platform-ci:0.6.2
  script:
    # normally we would poll the environment to see if it has completed build and deploy events 
    #- ./scripts/digitalservice/cicd/platform-wait-for-build.sh
    # For local test, pretend we did and echo out
    - echo "The environment is now ready"
    # retrieves the ephemeral MR domains so we can test against them
    - php ./scripts/digitalservice/cicd/gitpip-save-urls.php
    - mkdir artifacts
    - cp /home/urls.csv artifacts/urls.csv
    - cp /home/urls.json artifacts/urls.json
  artifacts:
    paths:
      - artifacts/urls.csv
      - artifacts/urls.json

CheckArtifact:
  image:
    name: boyerj/platform-ci:0.6.2
  stage: buildconfig
  script:
    # Builds a child pipeline gitlab-ci.yml file, one job per domain to run visual regression tests
    - php ./scripts/digitalservice/cicd/buildBackstopPipeline.php
  artifacts:
    paths:
      - artifacts/backstop.gitlab-ci.yml
  dependencies:
    - Find Environment

RunOurBackStop:
  stage: runbackstop
  trigger:
    include:
      - artifact: artifacts/backstop.gitlab-ci.yml
        job: CheckArtifact

glci is failing and producing the mentioned error message immediately after the echo in the EnsureDeploy job.

mdubourg001 commented 3 years ago

My bad, should be fixed in https://github.com/mdubourg001/glci/releases/tag/v0.4.1.

gilzow commented 3 years ago

Fantastic! Thanks!