-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
260a07c
commit 41ba59d
Showing
15 changed files
with
169 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
#!/bin/sh | ||
|
||
DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml -f docker-compose.local.yml build | ||
if [ -z "$(git status --porcelain)" ]; then | ||
GIT_COMMIT_HASH="$(git rev-parse HEAD)" | ||
else | ||
GIT_COMMIT_HASH="$(git rev-parse HEAD)-dirty" | ||
fi | ||
|
||
env DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml -f docker-compose.local.yml build --build-arg GIT_COMMIT_HASH=$GIT_COMMIT_HASH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use std::sync::Arc; | ||
|
||
use fctrl::schema::mgmt_server_rest::BuildInfoObject; | ||
use log::error; | ||
use rocket::{get, serde::json::Json, State}; | ||
|
||
use crate::clients::AgentApiClient; | ||
|
||
#[get("/buildinfo")] | ||
pub async fn buildinfo( | ||
agent_client: &State<Arc<AgentApiClient>>, | ||
) -> Json<BuildInfoObject> { | ||
let agent_ver = match agent_client.build_version().await { | ||
Ok(ver) => Some(Box::new(fctrl::schema::mgmt_server_rest::BuildVersion { | ||
commit_hash: ver.commit_hash, | ||
timestamp: ver.timestamp, | ||
})), | ||
Err(e) => { | ||
error!("Error retrieving agent build version: {:?}", e); | ||
None | ||
}, | ||
}; | ||
Json(BuildInfoObject { | ||
agent: agent_ver, | ||
mgmt_server: Some(Box::new(fctrl::schema::mgmt_server_rest::BuildVersion { | ||
commit_hash: fctrl::util::version::GIT_SHA.unwrap_or("-").to_owned(), | ||
timestamp: fctrl::util::version::BUILD_TIMESTAMP.to_owned(), | ||
})) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters