Add buildpack language support

This commit is contained in:
Σrebe - Romain GERARD
2021-09-29 14:40:34 +02:00
committed by Erèbe - Romain Gerard
parent e3f99b19d6
commit d037abc793
4 changed files with 16 additions and 0 deletions

View File

@@ -195,6 +195,10 @@ impl LocalDocker {
buildpacks_args.push("-B");
buildpacks_args.push(builder_name);
if let Some(buildpack_language) = &build.git_repository.buildpack_language {
buildpacks_args.push("-b");
buildpacks_args.push(buildpack_language.as_str());
}
// Just a fallback for now to help our bot loving users deploy their apps
// Long term solution requires lots of changes in UI and Core as well

View File

@@ -51,6 +51,7 @@ pub struct GitRepository {
pub commit_id: String,
pub dockerfile_path: Option<String>,
pub root_path: String,
pub buildpack_language: Option<String>,
}
#[derive(Clone, Eq, PartialEq, Hash, Debug)]

View File

@@ -144,6 +144,7 @@ pub struct Application {
pub branch: String,
pub commit_id: String,
pub dockerfile_path: Option<String>,
pub buildpack_language: Option<String>,
#[serde(default = "default_root_path_value")]
pub root_path: String,
pub private_port: Option<u16>,
@@ -327,6 +328,7 @@ impl Application {
commit_id: self.commit_id.clone(),
dockerfile_path: self.dockerfile_path.clone(),
root_path: self.root_path.clone(),
buildpack_language: self.buildpack_language.clone(),
},
image: self.to_image(),
options: BuildOptions {

View File

@@ -77,6 +77,7 @@ pub fn environment_3_apps_3_routers_3_databases(
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "5990752647af11ef21c3d46a51abbde3da1ab351".to_string(),
dockerfile_path: Some("Dockerfile".to_string()),
buildpack_language: None,
root_path: "/".to_string(),
action: Action::Create,
git_credentials: Some(GitCredentials {
@@ -113,6 +114,7 @@ pub fn environment_3_apps_3_routers_3_databases(
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "5990752647af11ef21c3d46a51abbde3da1ab351".to_string(),
dockerfile_path: Some("Dockerfile".to_string()),
buildpack_language: None,
root_path: String::from("/"),
action: Action::Create,
git_credentials: Some(GitCredentials {
@@ -149,6 +151,7 @@ pub fn environment_3_apps_3_routers_3_databases(
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "158ea8ebc9897c50a7c56b910db33ce837ac1e61".to_string(),
dockerfile_path: Some(format!("Dockerfile-{}", version_mongo)),
buildpack_language: None,
action: Action::Create,
root_path: String::from("/"),
git_credentials: Some(GitCredentials {
@@ -293,6 +296,7 @@ pub fn working_minimal_environment(context: &Context, organization_id: &str, tes
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "fc575a2f3be0b9100492c8a463bf18134a8698a5".to_string(),
dockerfile_path: Some("Dockerfile".to_string()),
buildpack_language: None,
root_path: String::from("/"),
action: Action::Create,
git_credentials: Some(GitCredentials {
@@ -378,6 +382,7 @@ pub fn environnement_2_app_2_routers_1_psql(
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "680550d1937b3f90551849c0da8f77c39916913b".to_string(),
dockerfile_path: Some("Dockerfile".to_string()),
buildpack_language: None,
root_path: String::from("/"),
action: Action::Create,
git_credentials: Some(GitCredentials {
@@ -414,6 +419,7 @@ pub fn environnement_2_app_2_routers_1_psql(
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "680550d1937b3f90551849c0da8f77c39916913b".to_string(),
dockerfile_path: Some("Dockerfile".to_string()),
buildpack_language: None,
root_path: String::from("/"),
action: Action::Create,
git_credentials: Some(GitCredentials {
@@ -511,6 +517,7 @@ pub fn echo_app_environment(context: &Context, organization_id: &str, test_domai
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "2205adea1db295547b99f7b17229afd7e879b6ff".to_string(),
dockerfile_path: Some("Dockerfile".to_string()),
buildpack_language: None,
root_path: String::from("/"),
action: Action::Create,
git_credentials: Some(GitCredentials {
@@ -564,6 +571,7 @@ pub fn environment_only_http_server(context: &Context, organization_id: &str) ->
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "a873edd459c97beb51453db056c40bca85f36ef9".to_string(),
dockerfile_path: Some("Dockerfile".to_string()),
buildpack_language: None,
root_path: String::from("/"),
action: Action::Create,
git_credentials: Some(GitCredentials {
@@ -604,6 +612,7 @@ pub fn environment_only_http_server_router(context: &Context, organization_id: &
git_url: "https://github.com/Qovery/engine-testing.git".to_string(),
commit_id: "a873edd459c97beb51453db056c40bca85f36ef9".to_string(),
dockerfile_path: Some("Dockerfile".to_string()),
buildpack_language: None,
root_path: String::from("/"),
action: Action::Create,
git_credentials: Some(GitCredentials {