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

Kubernetes change rpm and deb repo #273

Merged
1 commit merged into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hack/json-format/run-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ function check_content() {
echo "$kubernetes_rpm_version"
kubernetes_semver=$(jq .kubernetes_semver "$ROOT"/"$check_output")
kubernetes_series=$(jq .kubernetes_series "$ROOT"/"$check_output")
if [[ $kubernetes_deb_version == '"1.22.1-00"' ]]; then
if [[ $kubernetes_deb_version == '"1.22.1-1.1"' ]]; then
echo "Find kubernetes_deb_version"
else
echo "Can not find kubernetes_deb_version"
exit 1
fi
if [[ $kubernetes_rpm_version == '"1.22.1-0"' ]]; then
if [[ $kubernetes_rpm_version == '"1.22.1"' ]]; then
echo "Find kubernetes_rpm_version"
else
echo "Can not find kubernetes_rpm_version"
Expand Down
10 changes: 5 additions & 5 deletions hack/json-format/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ impl DataTrait for KubernetesImage {
.as_deref()
.unwrap_or("v1.22.1"),
);
let kubernetes_deb_version = String::from(&kubernetes_version.replace("v", "")) + "-00";
let kubernetes_deb_version = String::from(&kubernetes_version.replace("v", "")) + "-1.1";
self.kubernetes_deb_version = Some(kubernetes_deb_version);
let kubernetes_rpm_version = String::from(&kubernetes_version.replace("v", "")) + "-0";
let kubernetes_rpm_version = String::from(&kubernetes_version.replace("v", ""));
self.kubernetes_rpm_version = Some(kubernetes_rpm_version);
println!(
"kubernetes json build timestamp: {}",
Expand Down Expand Up @@ -67,14 +67,14 @@ impl DataTrait for KubernetesImage {
self.kubernetes_rpm_version
.to_owned()
.as_deref()
.unwrap_or("1.22.1-00")
.unwrap_or("1.22.1-1.1")
);
println!(
"kubernetes deb version: {:?}",
self.kubernetes_deb_version
.to_owned()
.as_deref()
.unwrap_or("1.22.1-0")
.unwrap_or("1.22.1")
);
Ok(())
}
Expand Down Expand Up @@ -153,7 +153,7 @@ mod datas_test {
println!("value: {:#?}", kubernetes);
assert_eq!(
kubernetes.kubernetes_rpm_version,
Some("1.22.1-0".to_string())
Some("1.22.1".to_string())
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion hack/json-format/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ fn success() {
let kubernetes_version = create_kubernetes_json();
let mut kubernetes_image = kubernetes_version.kubernetes_output;
let _ = kubernetes_image.drain(1..32);
assert_eq!(kubernetes_image, "{\"kubernetes_deb_version\":\"1.22.1-00\",\"kubernetes_rpm_version\":\"1.22.1-0\",\"kubernetes_semver\":\"v1.22.1\",\"kubernetes_series\":\"v1.22\"}");
assert_eq!(kubernetes_image, "{\"kubernetes_deb_version\":\"1.22.1-1.1\",\"kubernetes_rpm_version\":\"1.22.1\",\"kubernetes_semver\":\"v1.22.1\",\"kubernetes_series\":\"v1.22\"}");
}
Loading