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

Add build date (oss) #13357

Merged
merged 14 commits into from
Jun 13, 2022
Merged

Add build date (oss) #13357

merged 14 commits into from
Jun 13, 2022

Conversation

markan
Copy link
Contributor

@markan markan commented Jun 3, 2022

Description

Capture build date (actually last github commit date) in consul.

This adds support for build date in the makefile, circleci, and github workflows, and extends the self endpoint to return the date.

@github-actions github-actions bot added theme/cli Flags and documentation for the CLI interface theme/config Relating to Consul Agent configuration, including reloading theme/contributing Additions and enhancements to community contributing materials type/ci Relating to continuous integration (CI) tooling for testing or releases labels Jun 3, 2022
@markan markan force-pushed the ma/add-build-date-oss branch from 41cf5ce to 8ef805b Compare June 3, 2022 21:45
@markan markan requested review from eculver and rboyer and removed request for eculver June 6, 2022 04:17
markan added 13 commits June 9, 2022 17:04
Signed-off-by: Mark Anderson <[email protected]>
Signed-off-by: Mark Anderson <[email protected]>
Signed-off-by: Mark Anderson <[email protected]>
Signed-off-by: Mark Anderson <[email protected]>
Signed-off-by: Mark Anderson <[email protected]>
Signed-off-by: Mark Anderson <[email protected]>
Signed-off-by: Mark Anderson <[email protected]>
Signed-off-by: Mark Anderson <[email protected]>
Signed-off-by: Mark Anderson <[email protected]>
@markan markan force-pushed the ma/add-build-date-oss branch from 8ef805b to 175728b Compare June 10, 2022 00:10
@markan markan requested a review from a team June 10, 2022 00:10
@markan markan requested a review from a team as a code owner June 10, 2022 00:10
@markan markan requested review from shore and mdeggies and removed request for a team June 10, 2022 00:10
Copy link
Member

@rboyer rboyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming tests pass

@markan markan requested a review from rboyer June 13, 2022 02:31
export GIT_DATE=$("${CIRCLE_WORKING_DIRECTORY}/build-support/scripts/build-date.sh") # we're using this for build date because it's stable across platform builds
export GOLDFLAGS="-X ${GIT_IMPORT}.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -X $(GIT_IMPORT).BuildDate=$(GIT_DATE)"
# we're using this for build date because it's stable across platform builds
# the env -i and -noprofile are used to ensure we don't try to recursively call this profile when starting bash
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this was only failing in our arm64 go-test env because it's different from the rest.

@markan markan merged commit edbf19f into main Jun 13, 2022
@markan markan deleted the ma/add-build-date-oss branch June 13, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/cli Flags and documentation for the CLI interface theme/config Relating to Consul Agent configuration, including reloading theme/contributing Additions and enhancements to community contributing materials type/ci Relating to continuous integration (CI) tooling for testing or releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants