Skip to content

Commit

Permalink
Merge pull request #391 from ditrit/improvement/integrate_plugin-core…
Browse files Browse the repository at this point in the history
…_0.20.0

Improvement: integrate plugin core 0.20.0
  • Loading branch information
Zorin95670 authored Sep 4, 2023
2 parents bf29a9d + dc76c8e commit 7276fca
Show file tree
Hide file tree
Showing 13 changed files with 884 additions and 942 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ jobs:
run: |
npm install -g npm@8.19.3 && \
npm ci && \
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.2.3" && \
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.5.0" && \
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.2.4" && \
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.6.0" && \
npm run plugin:init && \
docker build -t leto-modelizer -f DockerfileE2E .
- name: Run application
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ To run all the e2e tests, you need to run the application with ALL official plug

```bash
npm ci
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.5.0"
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.2.3"
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.6.0"
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.2.4"
npm run plugin:init
TEMPLATE_LIBRARY_BASE_URL="https://raw.githubusercontent.com/ditrit/leto-modelizer-templates-library/leto-modelizer/e2e_test" npm run dev
```
Expand All @@ -66,7 +66,7 @@ TEMPLATE_LIBRARY_BASE_URL="https://raw.githubusercontent.com/ditrit/leto-modeliz

```bash
npm ci
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.5.0"
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.6.0"
npm run plugin:init
```

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ For now, we don't have many plugins to offer you, but follow us and in the next

Plugin to manage terraform files, by default it comes with aws provider definition.

[GitHub url](https://github.com/ditrit/terrator-plugin#0.5.0)
[GitHub url](https://github.com/ditrit/terrator-plugin#0.6.0)

### Github plugin

Plugin to manage github action files.

[GitHub url](https://github.com/ditrit/githubator-plugin#0.2.3)
[GitHub url](https://github.com/ditrit/githubator-plugin#0.2.4)

## Compatibility versions table

Expand Down Expand Up @@ -93,9 +93,9 @@ Plugin to manage github action files.
</tr>
<tr>
<td>Next</td>
<td>= 0.19.0</td>
<td>= 0.5.0</td>
<td>= 0.2.3</td>
<td>= 0.20.0</td>
<td>= 0.6.0</td>
<td>= 0.2.4</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -128,21 +128,21 @@ Choose __Custom plugin__ to install a specific plugin not referenced as an offic
Examples with official plugins:
- terrator-plugin:
- plugin name: `terrator-plugin`
- git repository url: `https://github.com/ditrit/terrator-plugin.git#0.5.0`
- git repository url: `https://github.com/ditrit/terrator-plugin.git#0.6.0`
- githubator-plugin:
- plugin name: `githubator-plugin`
- git repository url: `https://github.com/ditrit/githubator-plugin.git#0.2.3`
- git repository url: `https://github.com/ditrit/githubator-plugin.git#0.2.4`

### Install custom plugin in command line

Options `repository-name` and `repository-url` can be added with the `npm run plugin:install` command to bypass cli prompts.

```bash
# Example with terraform plugin
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.5.0"
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.6.0"

# Example with github action plugin
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.2.3"
npm run plugin:install -- repository-name="githubator-plugin" repository-url="https://github.com/ditrit/githubator-plugin.git#0.2.4"
```

Now that your plugin is installed, you can continue to install other plugins with the same command if you want.
Expand Down
6 changes: 3 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Re-design attribute fields.
* Re-design information icon on attribute fields.
* Plugin management:
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.5.0) version 0.5.0.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.19.0) version 0.19.0.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.2.3) version 0.2.3.
* Work with [terrator-plugin](https://github.com/ditrit/terrator-plugin/tree/0.6.0) version 0.6.0.
* Work with [plugin-core](https://github.com/ditrit/leto-modelizer-plugin-core/tree/0.20.0) version 0.20.0.
* Work with [githubator-plugin](https://github.com/ditrit/githubator-plugin/tree/0.2.4) version 0.2.4.
* Improve performance of the automatic functionnal tests.
* User settings:
* Save records by page in ModelsPage.
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ModelizerPage/SwitchView/AddComponent.feature
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Feature: Test switch model to text view: add component/link
And I expect active file content to contain 'resource.*"aws_internet_gateway".*"aws_internet_gateway_1".*{}'
But I expect active file content to not contain 'gateway_id.*=.*\["aws_internet_gateway_1"\]'

When I set active file content to 'resource "aws_subnet" "aws_subnet_1" { gateway_id = \["aws_internet_gateway_1"\] } resource "aws_internet_gateway" "aws_internet_gateway_1" {}'
When I set active file content to 'resource "aws_subnet" "aws_subnet_1" { gateway_id = [aws_internet_gateway.aws_internet_gateway_1.id] } resource "aws_internet_gateway" "aws_internet_gateway_1" {}'
And I wait 2 seconds
And I click on '[data-cy="navigation-bar"] [data-cy="modelizer-switch-button"] [aria-pressed="false"]'
Then I expect '[data-cy="navigation-bar"] [data-cy="modelizer-switch-button"] [aria-pressed="true"] [class="block"]' is 'Draw'
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/ModelsPage/CreateTemplate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,11 @@ Feature: Test models page: model creation from template
When I click on '[data-cy="modelizer-switch-button"] [aria-pressed="false"]'
Then I expect current url is '{{ projectName }}/modelizer/text\?plugin=terrator-plugin&path={{ modelFolder }}'
And I expect '[data-cy="file-explorer"] [data-cy="folder_{{ projectName }}"]' is '{{ projectName }}'
And I expect '[data-cy="file-explorer"] [data-cy="file_leto-modelizer.config.json"]' exists
And I expect '[data-cy="file-explorer"] [data-cy="folder_{{ modelFolder }}"]' exists
And I expect '[data-cy="file-explorer"] [data-cy="file_{{ modelFile }}"]' exists
And I expect '[data-cy="active-tab"] [data-cy="file_{{ modelFile }}"]' exists
And I expect active file content to be equal to "cypress/resources/main.tf"

When I double click on '[data-cy="file-explorer"] [data-cy="file_leto-modelizer.config.json"]'
Then I expect '[data-cy="active-tab"] [data-cy="file_leto-modelizer.config.json"]' exists
And I expect active file content to contain 'model.*terrator-plugin.*aws_1.*nginx'
And I expect active file content to be equal to "cypress/resources/leto-modelizer.config.txt"

Scenario: Create two template models with same parameters should not be possible
# Model creation
When I click on '[data-cy="create-model-button"]'
Expand Down
2 changes: 1 addition & 1 deletion cypress/resources/infra/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "aws_instance" "tomcat" {

resource "aws_db_instance" "postgres" {
instance_class = "postgres"
vpc_security_group_ids = ["securityGroup"]
vpc_security_group_ids = [aws_security_group.securityGroup.id,]
}

resource "aws_security_group" "securityGroup" {
Expand Down
2 changes: 1 addition & 1 deletion cypress/resources/infra/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource "aws_security_group" "aws_security_group_1" {
}

resource "aws_instance" "aws_instance_1" {
security_groups = ["aws_security_group_1"]
security_groups = [aws_security_group.aws_security_group_1.name]
}

resource "aws_ebs_volume" "aws_ebs_volume_1" {
Expand Down
2 changes: 1 addition & 1 deletion cypress/resources/infra1/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "aws_instance" "tomcat" {

resource "aws_db_instance" "postgres" {
instance_class = "postgres"
vpc_security_group_ids = ["securityGroup"]
vpc_security_group_ids = [aws_security_group.securityGroup.id]
}

resource "aws_security_group" "securityGroup" {
Expand Down
2 changes: 1 addition & 1 deletion cypress/resources/infra2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resource "aws_security_group" "aws_security_group_1" {
}

resource "aws_instance" "aws_instance_1" {
security_groups = ["aws_security_group_1"]
security_groups = [aws_security_group.aws_security_group_1.id]
}

resource "aws_ebs_volume" "aws_ebs_volume_1" {
Expand Down
8 changes: 4 additions & 4 deletions leto-modelizer-plugin-cli.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
{
"name": "terrator-plugin",
"url": "https://github.com/ditrit/terrator-plugin.git#0.5.0",
"version": "0.5.0"
"url": "https://github.com/ditrit/terrator-plugin.git#0.6.0",
"version": "0.6.0"
},
{
"name": "githubator-plugin",
"url": "https://github.com/ditrit/githubator-plugin.git#0.2.3",
"version": "0.2.3"
"url": "https://github.com/ditrit/githubator-plugin.git#0.2.4",
"version": "0.2.4"
}
]
Loading

0 comments on commit 7276fca

Please sign in to comment.