Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid setting CI_PROJECT_ID #1168

Open
justinTM opened this issue Apr 1, 2024 · 2 comments
Open

avoid setting CI_PROJECT_ID #1168

justinTM opened this issue Apr 1, 2024 · 2 comments
Labels
feature Feature missing according to gitlab ci standard

Comments

@justinTM
Copy link

justinTM commented Apr 1, 2024

CI_PROJECT_ID: "1217",

I am using CI_PROJECT_ID in scripts to curl the GitLab API, and it's always failing because 1217 is not correct, nor a valid id for any project.

in my curl scripts i am looking up the id by searching project names. otherwise i am setting CI_PROJECT_ID myself in other projects' dotenv files within my job.

either way, it doesn't seem wise to define a variable which will never be correct

i can imagine a scenario where a blank CI_PROJECT_ID might cause problems for people, maybe we can discuss a solution for this case? but ideally we would set it to the correct id based on the full path results from git remote origin? and if we're offline we can use cached previous results from a file in .gitlab-ci-local/ or make it blank, or something else

@firecow
Copy link
Owner

firecow commented Apr 2, 2024

Yeah, it's probably best to just leave it undefined.

Options:
  --help                   Show help                                                                                                                                                                                                    
  --unset-variable         Unsets a variable (--unset-variable HELLO)             [array]

Use this one for now.

@justinTM
Copy link
Author

justinTM commented Apr 2, 2024

sweet! thank you

@firecow firecow added the feature Feature missing according to gitlab ci standard label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature missing according to gitlab ci standard
Projects
None yet
Development

No branches or pull requests

2 participants