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

EARTHLY_GIT_PROJECT_NAME value changes on remote ci #671

Closed
Esardes opened this issue Dec 22, 2020 · 1 comment · Fixed by #672
Closed

EARTHLY_GIT_PROJECT_NAME value changes on remote ci #671

Esardes opened this issue Dec 22, 2020 · 1 comment · Fixed by #672
Assignees
Labels
type:bug Something isn't working

Comments

@Esardes
Copy link

Esardes commented Dec 22, 2020

at least in 0.3.8 value would be repo/project, now prints something along the lines of [MASKED]@gitlab.com/repo/project, but somehow only gitlab.com
local behavior hasn't changed
we use Earth to make sure we have the same behavior locally and on the CI, any idea how this is possible?

@Esardes Esardes changed the title [Bug] EARTHLY_GIT_PROJECT_NAME value changed in latest releases EARTHLY_GIT_PROJECT_NAME value changes on remote ci Dec 22, 2020
@alexcb alexcb self-assigned this Dec 22, 2020
@vladaionescu vladaionescu added the type:bug Something isn't working label Dec 22, 2020
@alexcb
Copy link
Collaborator

alexcb commented Dec 22, 2020

Thanks for the bug report @Esardes ,

I was able to reproduce it with this Earthfile

FROM alpine:3.12.3

hello:
    ARG EARTHLY_GIT_PROJECT_NAME
    RUN env | grep EARTHLY

and this .earthly/config.yml:

git:
  gitlab.com:
    auth: https
    user: alexcb
    password: "my-password-here"

working under v0.3.8:

$ SSH_AUTH_SOCK="" earth-v0.3.8 --no-cache gitlab.com/alexcb/testearth1private+hello
buildkitd | Found buildkit daemon as docker container (earthly-buildkitd)
buildkitd | Newer image available. Restarting buildkit daemon...
buildkitd | ...Done
gitlab.com/alexcb/testearth1private:master+base | --> FROM alpine:3.12.3
gitlab.com/alexcb/testearth1private:master+base | resolve docker.io/library/alpine:3.12.3@sha256:3c7497bf0c7af93428242d6176e8f7905f2201d8fc5861f45be7a346b5f23436 100%
gitlab.com/alexcb/testearth1private:master+hello | --> RUN env | grep EARTHLY
gitlab.com/alexcb/testearth1private:master+hello | EARTHLY_GIT_PROJECT_NAME=alexcb/testearth1private

but under v0.4.1:

$ SSH_AUTH_SOCK="" earthly-v0.4.1 --no-cache gitlab.com/alexcb/testearth1private+hello
           buildkitd | Found buildkit daemon as docker container (earthly-buildkitd)
           buildkitd | Newer image available. Restarting buildkit daemon...
           buildkitd | ...Done
No ssh auth socket detected or zero keys loaded; falling back to https for auto auth values
       alpine:3.12.3 | --> Load metadata
g/a/testearth1private+base | --> FROM alpine:3.12.3
g/a/testearth1private+base | [██████████] resolve docker.io/library/alpine:3.12.3@sha256:3c7497bf0c7af93428242d6176e8f7905f2201d8fc5861f45be7a346b5f23436 ... 100%
g/a/testearth1private+hello | --> RUN env | grep EARTHLY
g/a/testearth1private+hello | EARTHLY_TARGET_PROJECT=gitlab.com/alexcb/testearth1private
g/a/testearth1private+hello | EARTHLY_GIT_PROJECT_NAME=my-password-here@gitlab.com/alexcb/testearth1private

it's now displaying the git password credentials in the project name. This is definitely a bug and i'll work on a fix.

alexcb added a commit that referenced this issue Dec 22, 2020
- getProjectName was not working for https-based authentication
- fixes #671

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
alexcb added a commit that referenced this issue Dec 22, 2020
- getProjectName was not working for https-based authentication
- fixes #671

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
alexcb added a commit that referenced this issue Dec 22, 2020
- getProjectName was not working for https-based authentication
- fixes #671

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants