mirror of
https://github.com/jlengrand/engine.git
synced 2026-03-10 08:11:21 +00:00
chore: rename registry_name property to registry_secret
This commit is contained in:
@@ -41,9 +41,9 @@ spec:
|
||||
automountServiceAccountToken: false
|
||||
terminationGracePeriodSeconds: 60
|
||||
securityContext: {}
|
||||
{%- if is_registry_name %}
|
||||
{%- if is_registry_secret %}
|
||||
imagePullSecrets:
|
||||
- name: {{ registry_name }}
|
||||
- name: {{ registry_secret }}
|
||||
{%- endif %}
|
||||
containers:
|
||||
- name: {{ name }}
|
||||
|
||||
@@ -40,9 +40,9 @@ spec:
|
||||
automountServiceAccountToken: false
|
||||
terminationGracePeriodSeconds: 60
|
||||
securityContext: {}
|
||||
{%- if is_registry_name %}
|
||||
{%- if is_registry_secret %}
|
||||
imagePullSecrets:
|
||||
- name: {{ registry_name }}
|
||||
- name: {{ registry_secret }}
|
||||
{%- endif %}
|
||||
containers:
|
||||
- name: {{ name }}
|
||||
|
||||
@@ -41,9 +41,9 @@ spec:
|
||||
automountServiceAccountToken: false
|
||||
terminationGracePeriodSeconds: 60
|
||||
securityContext: {}
|
||||
{%- if is_registry_name %}
|
||||
{%- if is_registry_secret %}
|
||||
imagePullSecrets:
|
||||
- name: {{ registry_name }}
|
||||
- name: {{ registry_secret }}
|
||||
{%- endif %}
|
||||
containers:
|
||||
- name: {{ name }}
|
||||
|
||||
@@ -40,9 +40,9 @@ spec:
|
||||
automountServiceAccountToken: false
|
||||
terminationGracePeriodSeconds: 60
|
||||
securityContext: {}
|
||||
{%- if is_registry_name %}
|
||||
{%- if is_registry_secret %}
|
||||
imagePullSecrets:
|
||||
- name: {{ registry_name }}
|
||||
- name: {{ registry_secret }}
|
||||
{%- endif %}
|
||||
containers:
|
||||
- name: {{ name }}
|
||||
|
||||
@@ -61,9 +61,10 @@ pub struct Image {
|
||||
pub name: String,
|
||||
pub tag: String,
|
||||
pub commit_id: String,
|
||||
// registry name where the image has been pushed
|
||||
// (this is not mandatory; only used by DOCR implementation today)
|
||||
// registry name where the image has been pushed: Optional
|
||||
pub registry_name: Option<String>,
|
||||
// registry secret to pull image: Optional
|
||||
pub registry_secret: Option<String>,
|
||||
// complete registry URL where the image has been pushed
|
||||
pub registry_url: Option<String>,
|
||||
}
|
||||
|
||||
@@ -173,11 +173,11 @@ impl Service for Application {
|
||||
|
||||
match self.image.registry_name.as_ref() {
|
||||
Some(registry_name) => {
|
||||
context.insert("is_registry_name", &true);
|
||||
context.insert("registry_name", registry_name);
|
||||
context.insert("is_registry_secret", &true);
|
||||
context.insert("registry_secret", registry_name);
|
||||
}
|
||||
None => {
|
||||
context.insert("is_registry_name", &false);
|
||||
context.insert("is_registry_secret", &false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -178,11 +178,11 @@ impl Service for Application {
|
||||
|
||||
match self.image.registry_name.as_ref() {
|
||||
Some(registry_name) => {
|
||||
context.insert("is_registry_name", &true);
|
||||
context.insert("registry_name", registry_name);
|
||||
context.insert("is_registry_secret", &true);
|
||||
context.insert("registry_secret", registry_name);
|
||||
}
|
||||
None => {
|
||||
context.insert("is_registry_name", &false);
|
||||
context.insert("is_registry_secret", &false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -355,8 +355,9 @@ where
|
||||
Ok(lines) => lines,
|
||||
Err(err) => {
|
||||
error!(
|
||||
"error while retrieving debug logs from database {}; error: {:?}",
|
||||
service.name(),
|
||||
"error while retrieving debug logs from {} {}; error: {:?}",
|
||||
service.service_type().name(),
|
||||
service.name_with_id(),
|
||||
err
|
||||
);
|
||||
Vec::new()
|
||||
|
||||
@@ -163,7 +163,9 @@ impl DOCR {
|
||||
};
|
||||
|
||||
let mut image = image.clone();
|
||||
image.registry_name = Some(registry_name);
|
||||
image.registry_name = Some(registry_name.clone());
|
||||
// on DOCR registry secret is the same as registry name
|
||||
image.registry_secret = Some(registry_name);
|
||||
image.registry_url = Some(dest);
|
||||
|
||||
Ok(PushResult { image })
|
||||
|
||||
@@ -289,6 +289,7 @@ impl Application {
|
||||
tag: self.commit_id.clone(),
|
||||
commit_id: self.commit_id.clone(),
|
||||
registry_name: None,
|
||||
registry_secret: None,
|
||||
registry_url: None,
|
||||
}
|
||||
}
|
||||
@@ -700,6 +701,7 @@ impl ExternalService {
|
||||
tag: self.commit_id.clone(),
|
||||
commit_id: self.commit_id.clone(),
|
||||
registry_name: None,
|
||||
registry_secret: None,
|
||||
registry_url: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ impl Spaces {
|
||||
S: Into<String>,
|
||||
X: AsRef<Path>,
|
||||
{
|
||||
// Digital ocean doesn't implement any space download, it use the generic AWS SDK
|
||||
let region = Region::Custom {
|
||||
name: self.region.clone(),
|
||||
endpoint: format!("https://{}.digitaloceanspaces.com", self.region),
|
||||
@@ -136,7 +135,7 @@ impl ObjectStorage for Spaces {
|
||||
let workspace_directory = crate::fs::workspace_directory(
|
||||
self.context().workspace_root_dir(),
|
||||
self.context().execution_id(),
|
||||
format!("object-storage/s3/{}", self.name()),
|
||||
format!("object-storage/spaces/{}", self.name()),
|
||||
);
|
||||
|
||||
let file_path = format!("{}/{}/{}", workspace_directory, bucket_name, object_key);
|
||||
@@ -164,7 +163,10 @@ impl ObjectStorage for Spaces {
|
||||
Err(err) => {
|
||||
debug!("{:?}", err);
|
||||
|
||||
warn!("Can't download object '{}'. Let's retry...", object_key);
|
||||
warn!(
|
||||
"Can't download object '{}'/'{}'. Let's retry...",
|
||||
bucket_name, object_key
|
||||
);
|
||||
|
||||
OperationResult::Retry(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user