Repo Name built-in expression
complete
P
Psychological Firefly
I'd like to add <+codebase.repoName>, similar to <+codebase.repoUrl>, but only the repo name. This is usually the input for all other Harness resources, and we currently are using pipeline variables for this input to work around not having it as a built-in expression
Log In
N
Nofar Bluestein
complete
N
Nofar Bluestein
long-term
N
Nofar Bluestein
Hey,
No need for a separate canny request.
Having codebase variables available in other stages is not planned short-term.
In the meanwhile, you try creating a pipeline input, and assign it with the value of the Drone variable.
We can chat about it further on our next call.
P
Psychological Firefly
Hey Nofar,
Thanks for pointing out the DRONE variables, those would be useful in CI stages. My thinking was more towards being able to use expressions to get the repo name outside of CI stages as well. Ideally we could take the repo details in a single place, the CI Clone inputs, and be able to propagate those inputs across the rest of the pipeline via expressions. This may require a separate Canny, didn't find one on a cursory search that was related.
N
Nofar Bluestein
pending feedback
N
Nofar Bluestein
Hey Will
Harness support most of the DRONE_XXX environment variables.
As you can see in the image, i'm using a run step to echo some env variables , including echo $DRONE_REPO_NAME, which give me the repo name.
Will that work for you?
I'll keep it as an enhancement request for supporting through <+codebase.XXX>