Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/lemon-eels-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@mia-platform/console-types": patch
---

fix: infrastructure component CRD now includes archiveUrl instead of gitInfo, name with validation
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,12 @@
"properties": {
"name": {
"type": "string",
"description": "The name of the infrastructure component"
"pattern": "^[a-z]([-_a-z0-9]*[a-z0-9])?$",
"description": "Name of the component. Must start with a lowercase letter and can contain lowercase letters, numbers, dashes, and underscores. Must end with a lowercase letter or number."
},
"gitInfo": {
"type": "object",
"description": "Information about the infrastructure component git repository",
"properties": {
"repoUrl": {
"type": "string",
"description": "The HTTPS URL of the git repository containing the infrastructure component"
},
"sshUrl": {
"type": "string",
"description": "The SSH URL of the git repository containing the infrastructure component"
}
}
"archiveUrl": {
"type": "string",
"description": "The URL of the archive containing the component source code"
},
"pipelineInfo": {
"type": "object",
Expand Down Expand Up @@ -221,16 +212,13 @@
},
"required": [
"name",
"gitInfo",
"archiveUrl",
"pipelineInfo"
],
"examples": [
{
"name": "example-infrastructure-component",
"gitInfo": {
"repoUrl": "https://gitlab.com/example/infrastructure-component.git",
"sshUrl": "ssh://gitlab.com/example/infrastructure-component.git"
},
"archiveUrl": "https://github.com/mia-platform/infrastructure-component/archive/refs/tags/v1.0.0.tar.gz",
"pipelineInfo": {
"gitlab-ci": {
"branch": "main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,12 @@
"properties": {
"name": {
"type": "string",
"description": "The name of the infrastructure component"
"pattern": "^[a-z]([-_a-z0-9]*[a-z0-9])?$",
"description": "Name of the component. Must start with a lowercase letter and can contain lowercase letters, numbers, dashes, and underscores. Must end with a lowercase letter or number."
},
"gitInfo": {
"type": "object",
"description": "Information about the infrastructure component git repository",
"properties": {
"repoUrl": {
"type": "string",
"description": "The HTTPS URL of the git repository containing the infrastructure component"
},
"sshUrl": {
"type": "string",
"description": "The SSH URL of the git repository containing the infrastructure component"
}
}
"archiveUrl": {
"type": "string",
"description": "The URL of the archive containing the component source code"
},
"pipelineInfo": {
"type": "object",
Expand Down Expand Up @@ -193,16 +184,13 @@
},
"required": [
"name",
"gitInfo",
"archiveUrl",
"pipelineInfo"
],
"examples": [
{
"name": "example-infrastructure-component",
"gitInfo": {
"repoUrl": "https://gitlab.com/example/infrastructure-component.git",
"sshUrl": "ssh://gitlab.com/example/infrastructure-component.git"
},
"archiveUrl": "https://github.com/mia-platform/infrastructure-component/archive/refs/tags/v1.0.0.tar.gz",
"pipelineInfo": {
"gitlab-ci": {
"branch": "main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,12 @@
"properties": {
"name": {
"type": "string",
"description": "The name of the infrastructure component"
"pattern": "^[a-z]([-_a-z0-9]*[a-z0-9])?$",
"description": "Name of the component. Must start with a lowercase letter and can contain lowercase letters, numbers, dashes, and underscores. Must end with a lowercase letter or number."
},
"gitInfo": {
"type": "object",
"description": "Information about the infrastructure component git repository",
"properties": {
"repoUrl": {
"type": "string",
"description": "The HTTPS URL of the git repository containing the infrastructure component"
},
"sshUrl": {
"type": "string",
"description": "The SSH URL of the git repository containing the infrastructure component"
}
}
"archiveUrl": {
"type": "string",
"description": "The URL of the archive containing the component source code"
},
"pipelineInfo": {
"type": "object",
Expand Down Expand Up @@ -120,17 +111,14 @@
},
"required": [
"name",
"gitInfo",
"archiveUrl",
"pipelineInfo"
],
"title": "Catalog infrastructure-component item resources",
"examples": [
{
"name": "example-infrastructure-component",
"gitInfo": {
"repoUrl": "https://gitlab.com/example/infrastructure-component.git",
"sshUrl": "ssh://gitlab.com/example/infrastructure-component.git"
},
"archiveUrl": "https://github.com/mia-platform/infrastructure-component/archive/refs/tags/v1.0.0.tar.gz",
"pipelineInfo": {
"gitlab-ci": {
"branch": "main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,12 @@ const _resourcesSchema = {
properties: {
name: {
type: 'string',
description: 'The name of the infrastructure component',
pattern: '^[a-z]([-_a-z0-9]*[a-z0-9])?$',
description: 'Name of the component. Must start with a lowercase letter and can contain lowercase letters, numbers, dashes, and underscores. Must end with a lowercase letter or number.',
},
gitInfo: {
type: 'object',
description: 'Information about the infrastructure component git repository',
properties: {
repoUrl: {
type: 'string',
description: 'The HTTPS URL of the git repository containing the infrastructure component',
},
sshUrl: {
type: 'string',
description: 'The SSH URL of the git repository containing the infrastructure component',
},
},
archiveUrl: {
type: 'string',
description: 'The URL of the archive containing the component source code',
},
pipelineInfo: {
type: 'object',
Expand Down Expand Up @@ -95,7 +86,7 @@ const _resourcesSchema = {
},
},
},
required: ['name', 'gitInfo', 'pipelineInfo'],
required: ['name', 'archiveUrl', 'pipelineInfo'],
title: 'Catalog Infrastructure Component Resources',
} as const satisfies JSONSchema

Expand All @@ -104,10 +95,7 @@ export type Resources = FromSchema<typeof _resourcesSchema>
const resourcesExamples: Resources[] = [
{
name: 'example-infrastructure-component',
gitInfo: {
repoUrl: 'https://gitlab.com/example/infrastructure-component.git',
sshUrl: 'ssh://gitlab.com/example/infrastructure-component.git',
},
archiveUrl: 'https://github.com/mia-platform/infrastructure-component/archive/refs/tags/v1.0.0.tar.gz',
pipelineInfo: {
'gitlab-ci': {
branch: 'main',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const infrastructureComponent = {
properties: {
name: {
type: 'string',
description: 'component name',
pattern: '^[a-z]([-_a-z0-9]*[a-z0-9])?$',
description: 'Name of the component. Must start with a lowercase letter and can contain lowercase letters, numbers, dashes, and underscores. Must end with a lowercase letter or number.',
},
tags: {
type: 'array',
Expand Down
Loading