Clients: log git commit info at start time - try to fix for CI (#968)
(cherry picked from commit 21491065c9
)
This commit is contained in:
parent
2968ed34bd
commit
9be3949a10
|
@ -64,3 +64,5 @@ jobs:
|
|||
${{ env.REGISTRY }}/blockworks-foundation/${{ env.IMAGE }}:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: |
|
||||
"GITHUB_SHA=${{ github.sha }}"
|
||||
|
|
|
@ -9,6 +9,8 @@ COPY . .
|
|||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM base as build
|
||||
ARG GITHUB_SHA
|
||||
ENV GITHUB_SHA ${GITHUB_SHA}
|
||||
COPY --from=plan /app/recipe.json .
|
||||
RUN cargo chef cook --release --recipe-path recipe.json
|
||||
COPY . .
|
||||
|
|
|
@ -61,16 +61,23 @@ pub fn tracing_subscriber_init() {
|
|||
}
|
||||
|
||||
pub fn print_git_version() {
|
||||
info!(
|
||||
"version is {}[{}{}]",
|
||||
env!("VERGEN_GIT_SHA"),
|
||||
env!("VERGEN_GIT_COMMIT_DATE"),
|
||||
if env!("VERGEN_GIT_DIRTY") == "true" {
|
||||
"-dirty"
|
||||
} else {
|
||||
""
|
||||
match option_env!("GITHUB_SHA") {
|
||||
Some(sha) => {
|
||||
info!("version is {}[github]", sha,);
|
||||
}
|
||||
);
|
||||
None => {
|
||||
info!(
|
||||
"version is {}[{}{}]",
|
||||
env!("VERGEN_GIT_SHA"),
|
||||
env!("VERGEN_GIT_COMMIT_DATE"),
|
||||
if env!("VERGEN_GIT_DIRTY") == "true" {
|
||||
"-dirty"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn http_error_handling<T: serde::de::DeserializeOwned>(
|
||||
|
|
Loading…
Reference in New Issue