From 92d6730433bc81f1e448140bd4c752ab74e760d5 Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 08:34:30 +0200 Subject: [PATCH 01/15] refactor!: Removed `vrang.project.id` from all the pom files Signed-off-by: Stefan Genov --- maven/base-package/cs-package/pom.xml | 1 - maven/base-package/pom.xml | 1 - maven/base-package/serverless/pom.xml | 1 - maven/base-package/vra-ng-package/pom.xml | 1 - maven/polyglot/pom.xml | 1 - 5 files changed, 5 deletions(-) diff --git a/maven/base-package/cs-package/pom.xml b/maven/base-package/cs-package/pom.xml index b9db586b3..9efd66b1d 100644 --- a/maven/base-package/cs-package/pom.xml +++ b/maven/base-package/cs-package/pom.xml @@ -38,7 +38,6 @@ ${vrang.password} ${vrang.serverId} ${vrang.project.name} - ${vrang.project.id} ${vrang.org.id} ${vrang.org.name} ${vrang.refresh.token} diff --git a/maven/base-package/pom.xml b/maven/base-package/pom.xml index 353711e94..8fe2761c3 100644 --- a/maven/base-package/pom.xml +++ b/maven/base-package/pom.xml @@ -263,7 +263,6 @@ ${vrang.username} ${vrang.password} ${vrang.serverId} - ${vrang.project.id} ${vrang.project.name} ${vrang.org.id} ${vrang.org.name} diff --git a/maven/base-package/serverless/pom.xml b/maven/base-package/serverless/pom.xml index 5087c3c75..0aa6bca9e 100644 --- a/maven/base-package/serverless/pom.xml +++ b/maven/base-package/serverless/pom.xml @@ -227,7 +227,6 @@ ${vrang.password} ${vrang.serverId} ${vrang.project.name} - ${vrang.project.id} ${vrang.org.id} ${vrang.org.name} ${vrang.refresh.token} diff --git a/maven/base-package/vra-ng-package/pom.xml b/maven/base-package/vra-ng-package/pom.xml index cd7a79e5a..044c798a0 100644 --- a/maven/base-package/vra-ng-package/pom.xml +++ b/maven/base-package/vra-ng-package/pom.xml @@ -38,7 +38,6 @@ ${vrang.password} ${vrang.serverId} ${vrang.project.name} - ${vrang.project.id} ${vrang.org.id} ${vrang.org.name} ${vrang.refresh.token} diff --git a/maven/polyglot/pom.xml b/maven/polyglot/pom.xml index 34b15c15f..3092105f2 100644 --- a/maven/polyglot/pom.xml +++ b/maven/polyglot/pom.xml @@ -265,7 +265,6 @@ ${vrang.username} ${vrang.password} ${vrang.serverId} - ${vrang.project.id} ${vrang.project.name} ${vrang.org.id} ${vrang.org.name} From 5dea69258ae7afba0de334cceb0148e87ad17cdb Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 08:34:51 +0200 Subject: [PATCH 02/15] docs: Removed `vrang.project.id` from the documentation Signed-off-by: Stefan Genov --- .../Components/Archetypes/vRA 8.x/General/Getting Started.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/versions/latest/Components/Archetypes/vRA 8.x/General/Getting Started.md b/docs/versions/latest/Components/Archetypes/vRA 8.x/General/Getting Started.md index 6855be001..81434db4e 100644 --- a/docs/versions/latest/Components/Archetypes/vRA 8.x/General/Getting Started.md +++ b/docs/versions/latest/Components/Archetypes/vRA 8.x/General/Getting Started.md @@ -108,7 +108,6 @@ The following need to be added to the profile that you intend to use: administrator someSecurePassword {tenant} - {project+id} {project+name} {organization+id} {org+name} From 66abf2a20d41ffed9be3f441e93dad5f5301fa7d Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 08:36:29 +0200 Subject: [PATCH 03/15] refactor(Installer)!: No longer works with `vrang.project.id` Signed-off-by: Stefan Genov --- .../java/com/vmware/pscoe/iac/installer/Installer.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/package-installer/src/main/java/com/vmware/pscoe/iac/installer/Installer.java b/package-installer/src/main/java/com/vmware/pscoe/iac/installer/Installer.java index 7e9162e96..afc5d1f37 100644 --- a/package-installer/src/main/java/com/vmware/pscoe/iac/installer/Installer.java +++ b/package-installer/src/main/java/com/vmware/pscoe/iac/installer/Installer.java @@ -119,12 +119,6 @@ enum Option { VRANG_PORT( "vrang_port", Configuration.PORT), - /** - * VRANG project Id. - */ - VRANG_PROJECT_ID( - "vrang_project.id", - ConfigurationVraNg.PROJECT_ID), /** * VRANG data collection delay in seconds. */ @@ -1274,8 +1268,6 @@ private static void readVrangProperties(final Input input) { userInput(input, Option.VRANG_PROJECT_NAME, " Project name"); Validate.ProjectAndOrg validated = Validate.project(input, input.get(Option.VRANG_PROJECT_NAME), input.getText()); - userInput(input, Option.VRANG_PROJECT_ID, " Project ID (Optional if you supplied project name)", - validated.projectId); userInput(input, Option.VRANG_ORGANIZATION_NAME, " Organization Name (Optional if you supplied organization ID)", validated.org); userInput(input, Option.VRANG_ORGANIZATION_ID, " Organization ID (Optional if you supplied organization Name)", From cf27581617d952147f2e63198794dbaf08a59d9f Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 08:38:00 +0200 Subject: [PATCH 04/15] refactor(restClients)!: No longer work with project.id - RestClientCs will no longer add the projectId to the filter by default if name is missing - RestClientVraNgPrimitive no longer will get the projectId from the config if the value is present, but will always work with the projectName Signed-off-by: Stefan Genov --- .../configuration/ConfigurationVraNg.java | 15 ++------------- .../pscoe/iac/artifact/rest/RestClientCs.java | 4 +--- .../artifact/rest/RestClientVraNgPrimitive.java | 10 ---------- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/configuration/ConfigurationVraNg.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/configuration/ConfigurationVraNg.java index 8cb8d0269..9829212d8 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/configuration/ConfigurationVraNg.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/configuration/ConfigurationVraNg.java @@ -33,10 +33,6 @@ public class ConfigurationVraNg extends Configuration { * param CSP_HOST. */ public static final String CSP_HOST = "csp.host"; - /** - * param PROJECT_ID. - */ - public static final String PROJECT_ID = "project.id"; /** * param DATA_COLLECTION_DELAY_SECONDS. */ @@ -131,13 +127,6 @@ public String getAuthHost() { } } - /** - * @return String - */ - public String getProjectId() { - return this.properties.getProperty(PROJECT_ID); - } - /** * @return String */ @@ -251,8 +240,8 @@ public void validate(boolean domainOptional) throws ConfigurationException { message.append("Port "); } - if (StringUtils.isEmpty(getProjectId()) && StringUtils.isEmpty(getProjectName())) { - message.append("Project name/Project id "); + if (StringUtils.isEmpty(getProjectName())) { + message.append("Project name "); } if (StringUtils.isEmpty(getOrgId()) && StringUtils.isEmpty(getOrgName())) { diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java index 3361fd935..95f9c2364 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java @@ -86,9 +86,7 @@ protected RestClientCs(ConfigurationCs configuration, RestTemplate restTemplate) } private void initProjectNameAndId() { - String constraint = StringUtils.isNotEmpty(configuration.getProjectName()) - ? String.format("name eq '%s'", configuration.getProjectName()) - : String.format("id eq '%s'", configuration.getProjectId()); + String constraint = String.format("name eq '%s'", configuration.getProjectName()); URI url = getURI(getURIBuilder() .setPath(GET_PROJECT_INFO) diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgPrimitive.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgPrimitive.java index 117defc0d..616eb7270 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgPrimitive.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientVraNgPrimitive.java @@ -434,16 +434,6 @@ public String getProjectId() { return this.projectId; } - if (StringUtils.isNotEmpty(configuration.getProjectId())) { - LOGGER.debug("Using project id defined in configuration: {}", configuration.getProjectId()); - this.projectId = this.getProjectIdPrimitive(configuration.getProjectId()); - if (this.projectId == null) { - throw new RuntimeException(String.format("Project id '%s' could not be found on target system", - configuration.getProjectId())); - } - - return this.projectId; - } String projectName = configuration.getProjectName(); if (StringUtils.isEmpty(projectName)) { throw new RuntimeException( From 9e83419b9869e338990eed5a8bd44fd0296242f8 Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 12:12:21 +0200 Subject: [PATCH 05/15] docs: added method documentations Signed-off-by: Stefan Genov --- .../pscoe/iac/artifact/rest/RestClientCs.java | 270 ++++++++++++++++++ 1 file changed, 270 insertions(+) diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java index 95f9c2364..619734f2b 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java @@ -45,6 +45,9 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate; +/** + * Rest client for Code Stream. + */ public class RestClientCs extends RestClient { private final Logger logger = LoggerFactory.getLogger(RestClientCs.class); @@ -103,27 +106,57 @@ private void initProjectNameAndId() { } + /** + * Get the project name. + * + * @return the project name + */ public String getProjectName() { return this.projectName; } + /** + * Get the project id. + * + * @return the project id + */ public String getProjectId() { return projectId; } + /** + * Get the cloud proxy id. + * + * @return the cloud proxy id + */ public String getCloudProxyId() { return cloudProxyId; } + /** + * Get the rest template. + * + * @return the rest template + */ public RestTemplate getRestTemplate() { return restTemplate; } + /** + * Get the configuration. + * + * @return the configuration + */ @Override protected Configuration getConfiguration() { return configuration; } + /** + * Get the API version. + * + * @return the API version + */ @Override public String getVersion() { if (this.apiVersion != null && !this.apiVersion.isEmpty()) { @@ -137,6 +170,13 @@ public String getVersion() { return this.apiVersion; } + /** + * Get the project variables. + * + * @param variableName the variable name + * + * @return the project variables + */ public Variable getProjectVariableByName(String variableName) { Gson gson = new Gson(); logger.info("Get variable " + variableName); @@ -148,6 +188,11 @@ public Variable getProjectVariableByName(String variableName) { return gson.fromJson(response.getBody(), Variable.class); } + /** + * Get the project variables. + * + * @return the project variables + */ public List getProjectVariables() { logger.info("Get Variables"); Map params = new LinkedHashMap(); @@ -159,6 +204,13 @@ public List getProjectVariables() { .collect(Collectors.toList()); } + /** + * Update the project variable. + * + * @param var the variable to update + * + * @return the response + */ public String updateVariable(Variable var) { logger.info("Importing pipeline " + var.getName()); URI url = getURI(getURIBuilder() @@ -169,6 +221,13 @@ public String updateVariable(Variable var) { return response.getBody(); } + /** + * Create the project variable. + * + * @param var the variable to create + * + * @return the response + */ public String createVariable(Variable var) { logger.info("Importing variable " + var.getName()); URI url = getURI(getURIBuilder().setPath(VARIABLES_PATH)); @@ -178,6 +237,11 @@ public String createVariable(Variable var) { return response.getBody(); } + /** + * Get the project endpoints. + * + * @return the project endpoints + */ public List getProjectEndpoints() { logger.info("Get Endpoints"); Map params = new LinkedHashMap(); @@ -189,6 +253,13 @@ public List getProjectEndpoints() { .collect(Collectors.toList()); } + /** + * Update the project endpoint. + * + * @param var the endpoint to update + * + * @return the response + */ public String updateEndpoint(Endpoint var) { logger.info("Update endpoint: {} ", var.getName()); URI url = getURI( @@ -199,6 +270,13 @@ public String updateEndpoint(Endpoint var) { return response.getBody(); } + /** + * Create the project endpoint. + * + * @param var the endpoint to create + * + * @return the response + */ public String createEndpoint(Endpoint var) { logger.info("Create endpoint " + var.getName()); URI url = getURI(getURIBuilder().setPath(ENDPOINTS_PATH)); @@ -208,6 +286,13 @@ public String createEndpoint(Endpoint var) { return response.getBody(); } + /** + * Get the project custom integrations. + * + * @param ciName the custom integration name + * + * @return the project custom integrations + */ public Optional getCustomIntegrationByName(String ciName) { logger.info("Get Custom Integration: " + ciName); Map params = new LinkedHashMap(); @@ -219,6 +304,11 @@ public Optional getCustomIntegrationByName(String ciNa .findFirst(); } + /** + * Get the project custom integrations. + * + * @return the project custom integrations + */ public List getCustomIntegrations() { logger.info("Get Custom Integrations"); List result = getPagedResult(CUSTOM_INTEGRATION_PATH); @@ -228,6 +318,13 @@ public List getCustomIntegrations() { .collect(Collectors.toList()); } + /** + * Get the project custom integrations. + * + * @param id the custom integration id + * + * @return the project custom integrations + */ public List getCustomIntegrationVersions(String id) { logger.info("Get Custom Integration Versions for: " + id); List result = getPagedResult(MessageFormat.format(CUSTOM_INTEGRATION_VERSION_PATH, id)); @@ -237,6 +334,11 @@ public List getCustomIntegrationVersions(String id) { .collect(Collectors.toList()); } + /** + * Delete the project custom integration. + * + * @param id the custom integration id + */ public void deleteCustomIntegration(String id) { logger.info("Delete custom integration" + id); URI url = getURI(getURIBuilder().setPath(CUSTOM_INTEGRATION_PATH + "/" + id)); @@ -245,6 +347,13 @@ public void deleteCustomIntegration(String id) { logger.debug("Body: " + response.getBody()); } + /** + * Create the project custom integration. + * + * @param ci the custom integration to create + * + * @return the response + */ public CustomIntegrationVersion createCustomIntegration(CustomIntegrationVersion ci) { logger.info("Create Custom Integration: " + ci.getName()); URI url = getURI(getURIBuilder().setPath(CUSTOM_INTEGRATION_PATH)); @@ -255,6 +364,13 @@ public CustomIntegrationVersion createCustomIntegration(CustomIntegrationVersion return gson.fromJson(response.getBody(), CustomIntegrationVersion.class); } + /** + * Update the project custom integration. + * + * @param ci the custom integration to update + * + * @return the response + */ public CustomIntegrationVersion updateCustomIntegration(CustomIntegrationVersion ci) { logger.info("Update Custom Integration: " + ci.getName()); URI url = getURI(getURIBuilder().setPath(CUSTOM_INTEGRATION_PATH + "/" + ci.getId())); @@ -266,6 +382,14 @@ public CustomIntegrationVersion updateCustomIntegration(CustomIntegrationVersion return gson.fromJson(response.getBody(), CustomIntegrationVersion.class); } + /** + * Create the project custom integration version. + * + * @param id the custom integration id + * @param version the custom integration version to create + * + * @return the response + */ public Object createCustomIntegrationVersion(String id, CustomIntegrationVersion version) { logger.info( String.format("Create Custom Integration Version: %s : %s ", version.getName(), version.getVersion())); @@ -278,110 +402,246 @@ public Object createCustomIntegrationVersion(String id, CustomIntegrationVersion return gson.fromJson(response.getBody(), CustomIntegrationVersion.class); } + /** + * Update the project custom integration version. + * + * @param id the custom integration id + * @param version the custom integration version to update + * + * @return the response + */ public List getProjectPipelines() { logger.info("Get Pipelines"); return getPagedResult(PIPELINE_PATH, getProjectFilterParam()); } + /** + * Get the project pipelines. + * + * @return the project pipelines + */ public JsonObject getProjectPipelineByName(String name) { logger.info("Get pipeline: " + name); return requestForPath(getProjectNameUrl(PIPELINE_UPDATE_PATH, name), HttpMethod.GET, null); } + /** + * Update the project pipeline. + * + * @param name the pipeline name + * @param var the pipeline to update + * + * @return the response + */ public JsonObject updatePipeline(String name, JsonObject var) { logger.info("Update pipeline: {}", name); return requestForPath(getProjectNameUrl(PIPELINE_UPDATE_PATH, name), HttpMethod.PUT, var); } + /** + * Patch the project pipeline. + * + * @param name the pipeline name + * @param var the pipeline to patch + * + * @return the response + */ public JsonObject patchPipeline(String name, JsonObject var) { logger.info("PATCH pipeline: {}", name); return requestForPath(getProjectNameUrl(PIPELINE_UPDATE_PATH, name), HttpMethod.PATCH, var); } + /** + * Create the project pipeline. + * + * @param var the pipeline to create + * + * @return the response + */ public JsonObject createPipeline(JsonObject var) { String name = var.get("name").getAsString(); logger.info("Create pipeline: {}", name); return requestForPath(getURI(getURIBuilder().setPath(PIPELINE_PATH)), HttpMethod.POST, var); } + /** + * Delete the project pipeline. + * + * @param name the pipeline name + */ public List getProjectGitWebhooks() { logger.info("Get git Webhooks for project"); return getPagedResult(GIT_PATH, getProjectFilterParam()); } + /** + * Get the project git webhooks. + * + * @return the project git webhooks + */ public JsonObject getProjectGitWebhook(String name) { logger.info("Get Git webhook: " + name); return requestForPath(getProjectNameUrl(GIT_PROJECT_NAME_PATH, name), HttpMethod.GET, null); } + /** + * Update the project git webhook. + * + * @param name the git webhook name + * @param var the git webhook to update + * + * @return the response + */ public JsonObject updateGitWebhook(String name, JsonObject var) { logger.info("Update git Webhook: {}", name); return requestForPath(getProjectNameUrl(GIT_PROJECT_NAME_PATH, name), HttpMethod.PUT, var); } + /** + * Create the project git webhook. + * + * @param var the git webhook to create + * + * @return the response + */ public JsonObject createGitWebhook(JsonObject var) { String name = var.get("name").getAsString(); logger.info("Create Git Webhook: {}", name); return requestForPath(getURI(getURIBuilder().setPath(GIT_PATH)), HttpMethod.POST, var); } + /** + * Get the project docker webhooks. + * + * @return the project docker webhooks + */ public List getProjectDockerWebhooks() { logger.info("Get git Webhooks for project"); return getPagedResult(DOCKER_PATH, getProjectFilterParam()); } + /** + * Get the project docker webhooks. + * + * @return the project docker webhooks + */ public JsonObject getProjectDockerWebhook(String name) { logger.info("Get Docker webhook: " + name); return requestForPath(getProjectNameUrl(DOCKER_PROJECT_NAME_PATH, name), HttpMethod.GET, null); } + /** + * Update the project docker webhook. + * + * @param name the docker webhook name + * @param var the docker webhook to update + * + * @return the response + */ public JsonObject updateDockerWebhook(String name, JsonObject var) { logger.info("Update Docker Webhook: {}", name); return requestForPath(getProjectNameUrl(DOCKER_PROJECT_NAME_PATH, name), HttpMethod.PUT, var); } + /** + * Create the project docker webhook. + * + * @param var the docker webhook to create + * + * @return the response + */ public JsonObject createDockerWebhook(JsonObject var) { String name = var.get("name").getAsString(); logger.info("Create Docker Webhook: {}", name); return requestForPath(getURI(getURIBuilder().setPath(DOCKER_PATH)), HttpMethod.POST, var); } + /** + * Get the project gerrit listeners. + * + * @return the project gerrit listeners + */ public List getProjectGerritListeners() { logger.info("Get Gerrit Listener for project"); return getPagedResult(GERRIT_LISTENER_PATH, getProjectFilterParam()); } + /** + * Get the project gerrit listeners. + * + * @return the project gerrit listeners + */ public JsonObject getProjectGerritListener(String name) { logger.info("Get Gerrit Listener: " + name); return requestForPath(getProjectNameUrl(GERRIT_LISTENER_PROJECT_NAME_PATH, name), HttpMethod.GET, null); } + /** + * Update the project gerrit listener. + * + * @param name the gerrit listener name + * @param var the gerrit listener to update + * + * @return the response + */ public JsonObject updateGerritListener(String name, JsonObject var) { logger.info("Update Gerrit Listener: {}", name); return requestForPath(getProjectNameUrl(GERRIT_LISTENER_PROJECT_NAME_PATH, name), HttpMethod.PUT, var); } + /** + * Create the project gerrit listener. + * + * @param var the gerrit listener to create + * + * @return the response + */ public JsonObject createGerritListener(JsonObject var) { String name = var.get("name").getAsString(); logger.info("Create Gerrit Trigger: {}", name); return requestForPath(getURI(getURIBuilder().setPath(GERRIT_LISTENER_PATH)), HttpMethod.POST, var); } + /** + * Get the project gerrit triggers. + * + * @return the project gerrit triggers + */ public List getProjectGerritTriggers() { logger.info("Get Gerrit Triggers for project"); return getPagedResult(GERRIT_TRIGGER_PATH, getProjectFilterParam()); } + /** + * Get the project gerrit triggers. + * + * @return the project gerrit triggers + */ public JsonObject getProjectGerritTrigger(String name) { logger.info("Get Gerrit Trigger: " + name); return requestForPath(getProjectNameUrl(GERRIT_TRIGGER_PROJECT_NAME_PATH, name), HttpMethod.GET, null); } + /** + * Update the project gerrit trigger. + * + * @param name the gerrit trigger name + * @param var the gerrit trigger to update + * + * @return the response + */ public JsonObject updateGerritTrigger(String name, JsonObject var) { logger.info("Update Gerrit Trigger: {}", name); return requestForPath(getProjectNameUrl(GERRIT_TRIGGER_PROJECT_NAME_PATH, name), HttpMethod.PUT, var); } + /** + * Create the project gerrit trigger. + * + * @param var the gerrit trigger to create + * + * @return the response + */ public JsonObject createGerritTrigger(JsonObject var) { String name = var.get("name").getAsString(); logger.info("Create Gerrit Trigger: {}", name); @@ -416,6 +676,11 @@ private void initCloudProxyId() { } + /** + * Get the project cloud proxy id. + * + * @return the project cloud proxy id + */ public List getPagedResult(String variablePath) { return getPagedResult(variablePath, new LinkedHashMap()); } @@ -462,6 +727,11 @@ private URI getProjectNameUrl(String path, String name) { return getURI(getURIBuilder().setPath(MessageFormat.format(path, getProjectName(), name))); } + /** + * Get the project filter param. + * + * @return the project filter param + */ Map getProjectFilterParam() { Map params = new LinkedHashMap(); params.put("$filter", String.format("project eq '%s'", getProjectName())); From cc5be9521051d7507674ad6ff3fc4e5a9762f2ee Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 12:19:03 +0200 Subject: [PATCH 06/15] docs: fixed docs Signed-off-by: Stefan Genov --- .../pscoe/iac/artifact/rest/RestClientCs.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java index 619734f2b..dde19a965 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/rest/RestClientCs.java @@ -403,12 +403,7 @@ public Object createCustomIntegrationVersion(String id, CustomIntegrationVersion } /** - * Update the project custom integration version. - * - * @param id the custom integration id - * @param version the custom integration version to update - * - * @return the response + * Get the project pipelines. */ public List getProjectPipelines() { logger.info("Get Pipelines"); @@ -465,9 +460,9 @@ public JsonObject createPipeline(JsonObject var) { } /** - * Delete the project pipeline. + * Get project git webhooks. * - * @param name the pipeline name + * @return the project git webhooks */ public List getProjectGitWebhooks() { logger.info("Get git Webhooks for project"); @@ -475,9 +470,11 @@ public List getProjectGitWebhooks() { } /** - * Get the project git webhooks. + * Get the project git webhook * - * @return the project git webhooks + * @param name the git webhook name + * + * @return the project git webhook */ public JsonObject getProjectGitWebhook(String name) { logger.info("Get Git webhook: " + name); From bdf8f97c41fb86a2ad86a367b3221131a7837c32 Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 12:22:48 +0200 Subject: [PATCH 07/15] feat: `vrang.project.id` added to deprecation warnings Signed-off-by: Stefan Genov --- .../pscoe/iac/artifact/configuration/ConfigurationVraNg.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/configuration/ConfigurationVraNg.java b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/configuration/ConfigurationVraNg.java index 9829212d8..2ff96abd1 100644 --- a/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/configuration/ConfigurationVraNg.java +++ b/common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact/configuration/ConfigurationVraNg.java @@ -263,7 +263,8 @@ public void validate(boolean domainOptional) throws ConfigurationException { public void deprecationWarnings() { String[] deprecatedFlags = new String[] { "bp.ignore.versions", - "bp.release" + "bp.release", + "project.id" }; for (String flag : deprecatedFlags) { From a546183cbd81abafa149b9711a961c5fb54093e1 Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 12:24:58 +0200 Subject: [PATCH 08/15] docs: Release Signed-off-by: Stefan Genov --- docs/versions/latest/Release.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/versions/latest/Release.md b/docs/versions/latest/Release.md index 768d5d37d..b4ae6826f 100644 --- a/docs/versions/latest/Release.md +++ b/docs/versions/latest/Release.md @@ -10,6 +10,12 @@ [//]: # (Describe the breaking change AND explain how to resolve it) [//]: # (You can utilize internal links /e.g. link to the upgrade procedure, link to the improvement|deprecation that introduced this/) +### *`vrang.project.id` has been removed in favor of `vrang.project.name`* + +Moving forward, `vrang.project.id` will not be accepted as part of the configuration. Instead, use `vrang.project.name`. + +`project.name` is more flexible as it will automatically find out the `project.id`. + ### *Polyglot projects will not try to fix mistakes due to issues with the manifest* Before, the `polyglot.json` could be defined like this: @@ -120,3 +126,9 @@ You don't need to migrate projects if they are `abx` based. `nodejs` is the corr ### *Migrate PolicyTemplates* Search your projects that use `@PolicyTemplate` decorator. The `templateVersion` property is now required. Check on top for possible values + +### *Migrate away from `vrang.project.id`* + +1. Open your `settings.xml`. +2. Search for `vrang.project.id`. +3. If found, replace it with the name of the project as seen in Aria From 3d2840fae4728e6a522dd6c3e6b4b294ace17d90 Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 12:28:33 +0200 Subject: [PATCH 09/15] lint: Removed trailing space Signed-off-by: Stefan Genov --- docs/versions/latest/Release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/latest/Release.md b/docs/versions/latest/Release.md index b4ae6826f..f024d5eee 100644 --- a/docs/versions/latest/Release.md +++ b/docs/versions/latest/Release.md @@ -12,7 +12,7 @@ ### *`vrang.project.id` has been removed in favor of `vrang.project.name`* -Moving forward, `vrang.project.id` will not be accepted as part of the configuration. Instead, use `vrang.project.name`. +Moving forward, `vrang.project.id` will not be accepted as part of the configuration. Instead, use `vrang.project.name`. `project.name` is more flexible as it will automatically find out the `project.id`. From 29bb6717d3ece3baf42ae4507addbccd795d3f48 Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 12:33:43 +0200 Subject: [PATCH 10/15] lint: Trailing space removed Signed-off-by: Stefan Genov --- docs/versions/latest/Release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/latest/Release.md b/docs/versions/latest/Release.md index f024d5eee..ba3408533 100644 --- a/docs/versions/latest/Release.md +++ b/docs/versions/latest/Release.md @@ -129,6 +129,6 @@ Search your projects that use `@PolicyTemplate` decorator. The `templateVersion` ### *Migrate away from `vrang.project.id`* -1. Open your `settings.xml`. +1. Open your `settings.xml`. 2. Search for `vrang.project.id`. 3. If found, replace it with the name of the project as seen in Aria From 6019f62e9c4a23348d580a5f7d3caf1f9f6c3b6f Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 13:28:01 +0200 Subject: [PATCH 11/15] feat: Added a `.node-version` file for `fnm` Signed-off-by: Stefan Genov --- .node-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .node-version diff --git a/.node-version b/.node-version new file mode 100644 index 000000000..cb406c60c --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +16.20.2 From b4b34f1513295041a942beee58b851c6472deb9c Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 14:15:10 +0200 Subject: [PATCH 12/15] chore: ignore flakes Signed-off-by: Stefan Genov --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 7c7a8f799..7de790d6f 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,8 @@ typescript/vrotsc-annotations/package-lock.json .flattened-pom.xml infrastructure/.m2/repository + +# Nix + +flake.nix +flake.lock From 8413911ea4e105c473ef7bf12306afe61369e69c Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 23:28:42 +0200 Subject: [PATCH 13/15] Revert "chore: ignore flakes" This reverts commit b4b34f1513295041a942beee58b851c6472deb9c. Signed-off-by: Stefan Genov --- .gitignore | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitignore b/.gitignore index 7de790d6f..7c7a8f799 100644 --- a/.gitignore +++ b/.gitignore @@ -49,8 +49,3 @@ typescript/vrotsc-annotations/package-lock.json .flattened-pom.xml infrastructure/.m2/repository - -# Nix - -flake.nix -flake.lock From 357f21d20dfea99664f1f7931f703ee01e240603 Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Mon, 11 Nov 2024 23:56:21 +0200 Subject: [PATCH 14/15] fix(logging): Reverting latest log4j bump -it broke logging Signed-off-by: Stefan Genov --- common/artifact-manager/pom.xml | 2 +- common/o11n/project/pom.xml | 7 ++++--- maven/plugins/pom.xml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/artifact-manager/pom.xml b/common/artifact-manager/pom.xml index 28b527ad6..8c98903b0 100644 --- a/common/artifact-manager/pom.xml +++ b/common/artifact-manager/pom.xml @@ -143,7 +143,7 @@ org.slf4j slf4j-api - 2.0.16 + 1.7.29 net.minidev diff --git a/common/o11n/project/pom.xml b/common/o11n/project/pom.xml index 7606847de..e2e423ece 100644 --- a/common/o11n/project/pom.xml +++ b/common/o11n/project/pom.xml @@ -1,6 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> iac com.vmware.pscoe @@ -59,12 +60,12 @@ org.apache.logging.log4j log4j-api - 2.24.1 + 2.17.1 org.apache.logging.log4j log4j-core - 2.24.1 + 2.17.1 junit diff --git a/maven/plugins/pom.xml b/maven/plugins/pom.xml index 42f6bd2a7..0dd851658 100644 --- a/maven/plugins/pom.xml +++ b/maven/plugins/pom.xml @@ -60,7 +60,7 @@ org.apache.logging.log4j log4j-core - 2.24.1 + 2.17.1 From 82c07f32a06ad6230bd1210bfe551421c6d15c36 Mon Sep 17 00:00:00 2001 From: Stefan Genov Date: Tue, 12 Nov 2024 12:04:38 +0200 Subject: [PATCH 15/15] docs: Added `environment.properties` details Signed-off-by: Stefan Genov --- docs/versions/latest/Release.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/versions/latest/Release.md b/docs/versions/latest/Release.md index ba3408533..3fa1e198c 100644 --- a/docs/versions/latest/Release.md +++ b/docs/versions/latest/Release.md @@ -132,3 +132,7 @@ Search your projects that use `@PolicyTemplate` decorator. The `templateVersion` 1. Open your `settings.xml`. 2. Search for `vrang.project.id`. 3. If found, replace it with the name of the project as seen in Aria + +### *Modify your `environment.properties` files if in use (installer)* + +1. If you have `environment.properties` that rely on `vrang_project_id`, they should be modified to use the `vrang_project_name`