Skip to content

Commit 4e488dc

Browse files
nervghalexey-igrychev
authored andcommitted
test(actions): add more presets
Signed-off-by: Alexandr Zaytsev <alexandr.zaytsev@flant.com>
1 parent e18e4f9 commit 4e488dc

6 files changed

Lines changed: 88 additions & 30 deletions

File tree

.github/workflows/actions_test_e2e_setup-app_preset.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ jobs:
77
runs-on: ubuntu-22.04
88
timeout-minutes: 10
99

10+
strategy:
11+
matrix:
12+
app: [werf, nelm, kubedog]
13+
1014
steps:
1115
- name: Checkout code
1216
uses: actions/checkout@v4
1317

1418
- name: Setup application
1519
uses: ./actions/setup-app
1620
with:
17-
preset: werf
21+
preset: ${{ matrix.app }}
1822

19-
- name: Use werf binary
20-
run: |
21-
werf --help
23+
- name: Use ${{ matrix.app }} binary
24+
run: ${{ matrix.app }} version

actions/README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ This repository provides actions for seamless integration of trdl into your GitH
1111
* [Set up your application executable files with `trdl/actions/setup-app` action](#set-up-your-application-executable-files-with-trdlactionssetup-app-action)
1212
* [Easy set up via presets](#easy-set-up-via-presets)
1313
* [`werf`](#werf)
14+
* [`nelm`](#nelm)
15+
* [`kubedog`](#kubedog)
1416
* [Manual set up](#manual-set-up)
1517
* [Installation of `trdl` with `trdl/actions/install` action](#installation-of-trdl-with-trdlactionsinstall-action)
1618
* [License](#license)
@@ -31,10 +33,38 @@ This repository provides actions for seamless integration of trdl into your GitH
3133
group: 2
3234
channel: stable
3335

34-
- name: Use werf binaries
36+
- name: Use werf binary
3537
run: werf version
3638
```
3739
40+
##### nelm
41+
42+
```yaml
43+
- name: Setup nelm
44+
uses: trdl/actions/setup-app@v0
45+
inputs:
46+
preset: nelm
47+
group: 1
48+
channel: stable
49+
50+
- name: Use nelm binary
51+
run: nelm version
52+
```
53+
54+
##### kubedog
55+
56+
```yaml
57+
- name: Setup kubedog
58+
uses: trdl/actions/setup-app@v0
59+
inputs:
60+
preset: kubedog
61+
group: 0
62+
channel: stable
63+
64+
- name: Use kubedog binary
65+
run: kubedog version
66+
```
67+
3868
#### Manual set up
3969
4070
```yaml

actions/install/dist/index.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/setup-app/dist/index.mjs

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function requireUtils$1 () {
8585
};
8686
}
8787
utils$1.toCommandProperties = toCommandProperties;
88-
88+
8989
return utils$1;
9090
}
9191

@@ -188,7 +188,7 @@ function requireCommand () {
188188
.replace(/:/g, '%3A')
189189
.replace(/,/g, '%2C');
190190
}
191-
191+
192192
return command;
193193
}
194194

@@ -259,7 +259,7 @@ function requireFileCommand () {
259259
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
260260
}
261261
fileCommand.prepareKeyValueMessage = prepareKeyValueMessage;
262-
262+
263263
return fileCommand;
264264
}
265265

@@ -367,7 +367,7 @@ function requireProxy () {
367367
return this._decodedPassword;
368368
}
369369
}
370-
370+
371371
return proxy;
372372
}
373373

@@ -8216,7 +8216,7 @@ function requireUtils () {
82168216
return res;
82178217
}
82188218
utils.enumToMap = enumToMap;
8219-
8219+
82208220
return utils;
82218221
}
82228222

@@ -8496,7 +8496,7 @@ function requireConstants$2 () {
84968496
'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING,
84978497
'upgrade': HEADER_STATE.UPGRADE,
84988498
};
8499-
8499+
85008500
} (constants$2));
85018501
return constants$2;
85028502
}
@@ -25008,7 +25008,7 @@ function requireLib () {
2500825008
}
2500925009
lib.HttpClient = HttpClient;
2501025010
const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
25011-
25011+
2501225012
return lib;
2501325013
}
2501425014

@@ -25098,7 +25098,7 @@ function requireAuth () {
2509825098
}
2509925099
}
2510025100
auth.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
25101-
25101+
2510225102
return auth;
2510325103
}
2510425104

@@ -25182,7 +25182,7 @@ function requireOidcUtils () {
2518225182
}
2518325183
}
2518425184
oidcUtils.OidcClient = OidcClient;
25185-
25185+
2518625186
return oidcUtils;
2518725187
}
2518825188

@@ -25475,7 +25475,7 @@ function requireSummary () {
2547525475
*/
2547625476
exports.markdownSummary = _summary;
2547725477
exports.summary = _summary;
25478-
25478+
2547925479
} (summary));
2548025480
return summary;
2548125481
}
@@ -25547,7 +25547,7 @@ function requirePathUtils () {
2554725547
return pth.replace(/[/\\]/g, path.sep);
2554825548
}
2554925549
pathUtils.toPlatformPath = toPlatformPath;
25550-
25550+
2555125551
return pathUtils;
2555225552
}
2555325553

@@ -25748,7 +25748,7 @@ function requireIoUtil () {
2574825748
return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
2574925749
}
2575025750
exports.getCmdPath = getCmdPath;
25751-
25751+
2575225752
} (ioUtil));
2575325753
return ioUtil;
2575425754
}
@@ -26055,7 +26055,7 @@ function requireIo () {
2605526055
}
2605626056
});
2605726057
}
26058-
26058+
2605926059
return io;
2606026060
}
2606126061

@@ -26680,7 +26680,7 @@ function requireToolrunner () {
2668026680
state._setResult();
2668126681
}
2668226682
}
26683-
26683+
2668426684
return toolrunner;
2668526685
}
2668626686

@@ -26790,7 +26790,7 @@ function requireExec () {
2679026790
});
2679126791
}
2679226792
exec.getExecOutput = getExecOutput;
26793-
26793+
2679426794
return exec;
2679526795
}
2679626796

@@ -26892,7 +26892,7 @@ function requirePlatform () {
2689226892
});
2689326893
}
2689426894
exports.getDetails = getDetails;
26895-
26895+
2689626896
} (platform));
2689726897
return platform;
2689826898
}
@@ -27245,7 +27245,7 @@ function requireCore () {
2724527245
* Platform utilities exports
2724627246
*/
2724727247
exports.platform = __importStar(requirePlatform());
27248-
27248+
2724927249
} (core));
2725027250
return core;
2725127251
}
@@ -27257,6 +27257,7 @@ var preset;
2725727257
preset["unknown"] = "unknown";
2725827258
preset["werf"] = "werf";
2725927259
preset["kubedog"] = "kubedog";
27260+
preset["nelm"] = "nelm";
2726027261
})(preset || (preset = {}));
2726127262
const cmdAddArgsMap = {
2726227263
[preset.unknown]: {
@@ -27276,6 +27277,12 @@ const cmdAddArgsMap = {
2727627277
url: 'https://tuf.kubedog.werf.io',
2727727278
rootVersion: '12',
2727827279
rootSha512: '6462a80292eb6d7712d8a18126366511f9c47a566f121a7745cfd68b624dc340b6591c2cadfe20690eb38296c399a3f4e6948aca90be60e446ed05c3c238294c'
27280+
},
27281+
[preset.nelm]: {
27282+
repo: preset.nelm,
27283+
url: 'https://storage.googleapis.com/nelm-tuf',
27284+
rootVersion: '1',
27285+
rootSha512: '2122fb476c48de4609fe6d3636759645996088ff6796857fc23ba4b8331a6e3a58fc40f1714c31bda64c709ef6f49bcc4691d091bad6cb1b9a631d8e06e1f308'
2727927286
}
2728027287
};
2728127288
const cmdUpdateArgsMap = {
@@ -27293,6 +27300,11 @@ const cmdUpdateArgsMap = {
2729327300
repo: preset.kubedog,
2729427301
group: '0',
2729527302
channel: 'stable'
27303+
},
27304+
[preset.nelm]: {
27305+
repo: preset.nelm,
27306+
group: '1',
27307+
channel: 'stable'
2729627308
}
2729727309
};
2729827310
function getAddArgs(presetVal) {
@@ -29083,7 +29095,7 @@ function requireSemver () {
2908329095
return parse(match[2] +
2908429096
'.' + (match[3] || '0') +
2908529097
'.' + (match[4] || '0'), options)
29086-
}
29098+
}
2908729099
} (semver, semver.exports));
2908829100
return semver.exports;
2908929101
}
@@ -29223,7 +29235,7 @@ function requireManifest () {
2922329235
return contents;
2922429236
}
2922529237
exports._readLinuxVersionFile = _readLinuxVersionFile;
29226-
29238+
2922729239
} (manifest$1, manifest$1.exports));
2922829240
return manifest$1.exports;
2922929241
}
@@ -29320,7 +29332,7 @@ function requireRetryHelper () {
2932029332
}
2932129333
}
2932229334
retryHelper.RetryHelper = RetryHelper;
29323-
29335+
2932429336
return retryHelper;
2932529337
}
2932629338

@@ -29993,7 +30005,7 @@ function requireToolCache () {
2999330005
function _unique(values) {
2999430006
return Array.from(new Set(values));
2999530007
}
29996-
30008+
2999730009
return toolCache;
2999830010
}
2999930011

@@ -30222,7 +30234,7 @@ function requireSlugify () {
3022230234
};
3022330235

3022430236
return replace
30225-
}));
30237+
}));
3022630238
} (slugify$2));
3022730239
return slugify$2.exports;
3022830240
}

actions/setup-app/dist/index.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/setup-app/src/preset.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { AddArgs, UpdateArgs } from '../../lib/trdl-cli'
44
export enum preset {
55
unknown = 'unknown',
66
werf = 'werf',
7-
kubedog = 'kubedog'
7+
kubedog = 'kubedog',
8+
nelm = 'nelm'
89
}
910

1011
const cmdAddArgsMap: Record<preset, AddArgs> = {
@@ -27,6 +28,13 @@ const cmdAddArgsMap: Record<preset, AddArgs> = {
2728
rootVersion: '12',
2829
rootSha512:
2930
'6462a80292eb6d7712d8a18126366511f9c47a566f121a7745cfd68b624dc340b6591c2cadfe20690eb38296c399a3f4e6948aca90be60e446ed05c3c238294c'
31+
},
32+
[preset.nelm]: {
33+
repo: preset.nelm,
34+
url: 'https://storage.googleapis.com/nelm-tuf',
35+
rootVersion: '1',
36+
rootSha512:
37+
'2122fb476c48de4609fe6d3636759645996088ff6796857fc23ba4b8331a6e3a58fc40f1714c31bda64c709ef6f49bcc4691d091bad6cb1b9a631d8e06e1f308'
3038
}
3139
}
3240

@@ -45,6 +53,11 @@ const cmdUpdateArgsMap: Record<preset, UpdateArgs> = {
4553
repo: preset.kubedog,
4654
group: '0',
4755
channel: 'stable'
56+
},
57+
[preset.nelm]: {
58+
repo: preset.nelm,
59+
group: '1',
60+
channel: 'stable'
4861
}
4962
}
5063

0 commit comments

Comments
 (0)