-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update Docker Client User Agent in CI #15268
Conversation
|
1609828
to
b37bd7e
Compare
Before my change the docker config looks like: {
"auths": {
"https://index.docker.io/v1/": {
"auth": "****"
}
}
} After the change it looks like: {
"auths": {
"https://index.docker.io/v1/": {
"auth": "****"
}
},
"HttpHeaders": {
"User-Agent": "Quarkus-CI-Docker-Client"
}
} |
b37bd7e
to
f147f0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good idea!
Thanks :) |
- name: Update Docker Client User Agent | ||
shell: bash | ||
run: | | ||
cat <<< $(jq '.HttpHeaders += {"User-Agent": "Quarkus-CI-Docker-Client"}' ~/.docker/config.json) > ~/.docker/config.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add the github org/repo name into the agent (based on github actons vars) - then we can distinguish between quarkus core builds and contributors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought of that but decided against it because it would potentially make filtering harder (I don't know how filtering is done, so I wanted to be on the safe side)
We do this so we can get better analytics for the downloaded version of the build images (by being able to easily filter out image downloads originating from CI).
Docker CLI mentioning this capability can be found here.