Comments (4)
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.
it also apparently can't handle multiple VARIABLE
flags inside dotenv file :/
from gitlab-ci-local.
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.
#992 Yeah, we are tracking the issue here
from gitlab-ci-local.
Related Issues (20)
- golang package are not cp to the .gitlab-ci-local/cache directory HOT 7
- Implement --shell-executor-no-image HOT 1
- Gcl use my username as host in includes HOT 10
- Challenges with Local File Inclusion from Other Projects in Latest Version HOT 4
- 4.48.0 regression test failure HOT 9
- Implement include[].component syntax
- Checking the absence of a variable with `rules: -if: (! $VARIABLE)` works in `gitlab-ci-local` but is rejected as invalid YAML by GitLab! HOT 1
- missing schema.json for 4.48.1 release
- dotenv variables are not loaded for `service` definitions
- support `image:pull_policy` to allow forcing 'always' behavior HOT 4
- Get the variables from gitlab project variables HOT 2
- Custom build directories with GIT_CLONE_PATH HOT 3
- Unable to source global variables HOT 1
- Add support for predefined runner instance class HOT 1
- Job fails when using quay.io/condaforge/linux-anvil-cos7-x86_64 image HOT 8
- Improve the documentation HOT 1
- Rules problem with double quotes HOT 2
- Unable to run with --network host HOT 1
- $CI_NODE_INDEX defaults to the string "null" when not in a parallel job, expected the empty string
- The gitlab only condition is not work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlab-ci-local.