Giter Site home page Giter Site logo

Comments (4)

justinTM avatar justinTM commented on June 8, 2024

ah i see... it is not compatible with setting any variables via CLI. when i remove all --variable flags in the command, it succeeds. so definitely a bug. i guess no one uses this feature lol!

from gitlab-ci-local.

justinTM avatar justinTM commented on June 8, 2024

it also apparently can't handle multiple VARIABLE flags inside dotenv file :/

from gitlab-ci-local.

justinTM avatar justinTM commented on June 8, 2024

also, when you specify multiple variables inside a single VARIABLE, it only applies the second one (skipping the first):

# ~/.gitlab-ci-local/.env
VARIABLE="CI_JOB_TOKEN=$GITLAB_ACCESS_TOKEN;DOCKER_HOST='xxxxx'"
gitlab-ci-local 'my-job'
Using fallback branch data
parsing and downloads finished in 21 ms
my-job starting shell (test)
my-job $ if [ -n "$CI_JOB_TOKEN" ]; then echo "can't find CI_JOB_TOKEN!" && exit 1; fi
my-job > can't find CI_JOB_TOKEN!
my-job finished in 11 ms  FAIL 1 

 FAIL  my-job
  > can't find CI_JOB_TOKEN!

putting a space instead of ; makes it work for the first variable but not for the second:

# ~/.gitlab-ci-local/.env
VARIABLE="CI_JOB_TOKEN=$GITLAB_ACCESS_TOKEN DOCKER_HOST='xxxxx'"
gitlab-ci-local 'my-job'
Using fallback branch data
parsing and downloads finished in 22 ms
my-job starting shell (test)
my-job $ if [ -n "$CI_JOB_TOKEN" ]; then echo "can't find CI_JOB_TOKEN!" && exit 1; fi
my-job $ if [ -n "$DOCKER_HOST" ]; then echo "can't find DOCKER_HOST!" && exit 1; fi
my-job > can't find DOCKER_HOST!
my-job finished in 12 ms  FAIL 1 

 FAIL  my-job
  > can't find DOCKER_HOST!

from gitlab-ci-local.

firecow avatar firecow commented on June 8, 2024

#992 Yeah, we are tracking the issue here

from gitlab-ci-local.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.