forked from getporter/porter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check for plugins file schema version and type (getporter#2532)
* check for plugins file schema version and type Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
- Loading branch information
Showing
12 changed files
with
252 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
--- | ||
title: "Quickly set up a Porter environment with required plugins" | ||
description: "How to install multiple plugins with Porter" | ||
date: "2023-01-24" | ||
authorname: "Yingrong Zhao" | ||
author: "@vinozzz" | ||
authorlink: "https://github.com/vinozzz" | ||
authorimage: "https://github.com/vinozzz.png" | ||
tags: ["best-practice", "plugins"] | ||
summary: | | ||
Setting up your Porter environment with your required plugins using the new `--file` flag with `porter plugins install` command. | ||
--- | ||
|
||
### Breaking change | ||
The recent porter v1.0.5 release introduced a new flag `--file` on `porter plugins install` command. Its intention is to allow users to install multiple plugins through a plugins definition file with a single porter command. However, it did not work as expected due to bad file format. | ||
|
||
The fix that contains the correct schema has been published with a new v1.0.6 release. If you have an existing plugins file, please update it to work with v1.0.6+. | ||
|
||
### Install multiple plugins with a single command | ||
Now, you can install multiple plugins using a plugin definition yaml file like below: | ||
```yaml | ||
schemaType: Plugins | ||
schemaVersion: 1.0.0 | ||
plugins: | ||
azure: | ||
version: v1.0.1 | ||
kubernetes: | ||
version: v1.0.1 | ||
``` | ||
After creating the file, you can run the command: | ||
```bash | ||
porter plugins install -f <path-to-the-file> | ||
``` | ||
|
||
The output from the command should look like this: | ||
``` | ||
installed azure plugin v1.0.1 (e361abc) | ||
installed kubernetes plugin v1.0.1 (f01c944) | ||
``` | ||
|
||
Make sure to update your current plugins schema file to the [latest format](/reference/file-formats/#plugins) | ||
Please [let us know][contact] how the change went (good or bad), and we are happy to help if you have questions, or you would like help with your migration. | ||
|
||
[announced]: https://github.com/docker/roadmap/issues/209 | ||
[Install Porter]: /install/ | ||
[contact]: /community/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"schemaType": "Plugins", | ||
"schemaVersion": "1.0.0", | ||
"invalid-field": "123", | ||
"plugins": { | ||
"plugin1": { | ||
"random-field": 1 | ||
}, | ||
"plugin2": { | ||
"version": "v1.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
{ | ||
"plugin1": { | ||
"version": "v1.0" | ||
}, | ||
"plugin2": { | ||
"version": "v1.0" | ||
"schemaType": "Plugins", | ||
"schemaVersion": "1.0.0", | ||
"plugins": { | ||
"plugin1": { | ||
"version": "v1.0" | ||
}, | ||
"plugin2": { | ||
"version": "v1.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
plugin1: | ||
version: v1.0 | ||
plugin2: | ||
version: v1.0 | ||
schemaType: Plugins | ||
schemaVersion: 1.0.0 | ||
plugins: | ||
plugin1: | ||
version: v1.0 | ||
plugin2: | ||
version: v1.0 |
Oops, something went wrong.