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

Add Windows 2025 support for built-in images #606

Merged
merged 1 commit into from
Dec 19, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -1737,6 +1737,7 @@
model.add(Constants.UBUNTU_2404_LTS);
model.add(Constants.UBUNTU_2204_LTS);
model.add(Constants.UBUNTU_2004_LTS);
model.add(Constants.WINDOWS_SERVER_2025);

Check warning on line 1740 in src/main/java/com/microsoft/azure/vmagent/AzureVMAgentTemplate.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 1740 is not covered by tests
model.add(Constants.WINDOWS_SERVER_2022);
model.add(Constants.WINDOWS_SERVER_2019);
model.add(Constants.WINDOWS_SERVER_2016);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1653,46 +1653,50 @@
imageProperties("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter", "2019-Datacenter-with-Containers", Constants.OS_TYPE_WINDOWS));
imageProperties.put(Constants.WINDOWS_SERVER_2022,
imageProperties("MicrosoftWindowsServer", "WindowsServer", "2022-datacenter-azure-edition-core", "2022-datacenter-azure-edition-core", Constants.OS_TYPE_WINDOWS));
imageProperties.put(Constants.WINDOWS_SERVER_2025,
imageProperties("MicrosoftWindowsServer", "WindowsServer", "2025-datacenter-azure-edition-core", "2025-datacenter-azure-edition-core", Constants.OS_TYPE_WINDOWS));
imageProperties.put(Constants.UBUNTU_2004_LTS,
imageProperties("canonical", "0001-com-ubuntu-server-focal", "20_04-lts-gen2", "20_04-lts-gen2", Constants.OS_TYPE_LINUX));
imageProperties.put(Constants.UBUNTU_2204_LTS,
imageProperties("canonical", "0001-com-ubuntu-server-jammy", "22_04-lts-gen2", "22_04-lts-gen2", Constants.OS_TYPE_LINUX));
imageProperties.put(Constants.UBUNTU_2404_LTS,
imageProperties("canonical", "ubuntu-24_04-lts", "server", "server", Constants.OS_TYPE_LINUX));

return imageProperties;
}

private static Map<String, String> imageProperties(
String defaultImagePublisher,
String offer,
String sku,
String dockerImageSku,
String osType
) {
Map<String, String> properties = new HashMap<>();
properties.put(Constants.DEFAULT_IMAGE_PUBLISHER, defaultImagePublisher);
properties.put(Constants.DEFAULT_IMAGE_OFFER, offer);
properties.put(Constants.DEFAULT_IMAGE_SKU, sku);
properties.put(Constants.DEFAULT_DOCKER_IMAGE_SKU, dockerImageSku);
properties.put(Constants.DEFAULT_IMAGE_VERSION, "latest");
properties.put(Constants.DEFAULT_OS_TYPE, osType);
properties.put(Constants.DEFAULT_LAUNCH_METHOD, Constants.LAUNCH_METHOD_SSH);
return properties;
}

private static Map<String, Map<String, String>> getPreInstalledToolsScript() {
final Map<String, Map<String, String>> tools = new HashMap<>();
tools.put(Constants.WINDOWS_SERVER_2016, new HashMap<>());
tools.put(Constants.WINDOWS_SERVER_2019, new HashMap<>());
tools.put(Constants.WINDOWS_SERVER_2022, new HashMap<>());
tools.put(Constants.WINDOWS_SERVER_2025, new HashMap<>());
tools.put(Constants.UBUNTU_2004_LTS, new HashMap<>());
tools.put(Constants.UBUNTU_2204_LTS, new HashMap<>());
tools.put(Constants.UBUNTU_2404_LTS, new HashMap<>());
try {
windows(Constants.WINDOWS_SERVER_2016, tools);
windows(Constants.WINDOWS_SERVER_2019, tools);
windows(Constants.WINDOWS_SERVER_2022, tools);
windows(Constants.WINDOWS_SERVER_2025, tools);

Check warning on line 1699 in src/main/java/com/microsoft/azure/vmagent/AzureVMManagementServiceDelegate.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 1656-1699 are not covered by tests
ubuntu(Constants.UBUNTU_2004_LTS, tools);
ubuntu(Constants.UBUNTU_2204_LTS, tools);
ubuntu(Constants.UBUNTU_2404_LTS, tools);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public final class Constants {
/**
* Built In Image.
*/
public static final String WINDOWS_SERVER_2025 = "Windows Server 2025";
public static final String WINDOWS_SERVER_2022 = "Windows Server 2022";
public static final String WINDOWS_SERVER_2019 = "Windows Server 2019";
public static final String WINDOWS_SERVER_2016 = "Windows Server 2016";
Expand Down
Loading