Skip to content
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
6 changes: 1 addition & 5 deletions e2e-version/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ By default, this actions resolves an image for the latest build of the main bran

The maximum number of versions to resolve. Default is 6, 0 means no limit.

### `plugin-directory`

The directory where `plugin.json` is located. It defaults to `src`, which works for monorepos where the plugin is in the root of the repository.

### `version-resolver-type`

The action supports two modes.

**plugin-grafana-dependency (default)**
The will return the most recent grafana-dev image and all the latest patch release of every minor version of Grafana Enterprise that satisfies the range specified in the [dependencies.grafanaDependency](https://grafana.com/developers/plugin-tools/reference/plugin-json#properties-1) property in plugin.json. To avoid starting too many jobs, to output will be capped 6 versions.
The will return the most recent grafana-dev image and all the latest patch release of every minor version of Grafana Enterprise that satisfies the range specified in the [dependencies.grafanaDependency](https://grafana.com/developers/plugin-tools/reference/plugin-json#properties-1) property in plugin.json. This requires the plugin.json file to be placed in the `<root>/src` directory. To avoid starting too many jobs, to output will be capped 6 versions.

### Example

Expand Down
4 changes: 0 additions & 4 deletions e2e-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ inputs:
required: false
description: 'The maximum number of versions to resolve. Default is 6, 0 means no limit.'
default: "6"
plugin-directory:
required: false
description: 'The directory where the plugin.json file is located. Default is `src`.'
default: src

output:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion e2e-version/dist/index.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions e2e-version/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const SkipGrafanaDevImageInput = 'skip-grafana-dev-image';
const VersionResolverTypeInput = 'version-resolver-type';
const GrafanaDependencyInput = 'grafana-dependency';
const LimitInput = 'limit';
const PluginDirectoryInput = 'plugin-directory';
const MatrixOutput = 'matrix';

const VersionResolverTypes = {
Expand Down Expand Up @@ -138,7 +137,7 @@ async function getGrafanaStableMinorVersions() {
}

async function getPluginGrafanaDependencyFromPluginJson() {
const file = await fs.readFile(path.resolve(path.join(core.getInput(PluginDirectoryInput)), 'plugin.json'), 'utf8');
const file = await fs.readFile(path.resolve(path.join(process.cwd(), 'src'), 'plugin.json'), 'utf8');
const json = JSON.parse(file);
if (!json.dependencies.grafanaDependency) {
throw new Error('Could not find plugin grafanaDependency');
Expand Down
Loading