Commit graph

18 commits

Author SHA1 Message Date
Ogheneobukome Ejaife
d6a2fb1310
Improved readability and maintainability 2025-07-10 00:08:56 -04:00
Ogheneobukome Ejaife
425b200956
revised parsing logic 2025-07-10 00:08:01 -04:00
Ogheneobukome Ejaife
7990a9d4e3
chore: fix code style issues with Prettier 2025-07-10 00:07:54 -04:00
Ogheneobukome Ejaife
e2483b9d19
feat: validate semantic version and refactor patch logic
- Added validation to `resolveKubectlVersion` to ensure input follows "major.minor" or "major.minor.patch" format.
- Moved `getLatestPatchVersion` from `run.ts` to `helpers.ts` to improve code organization and ensure a more robust testing process.
2025-07-10 00:06:42 -04:00
Ogheneobukome Ejaife
77e32d91cd
refactor(resolveKubectlVersion): switch to k8s CDN for security patch retrieval
Replaced GitHub API Octo client with k8s CDN to fetch the latest security patch for improved reliability. Separated the API call logic from resolveKubectlVersion to enhance testability and readability.
2025-07-10 00:06:35 -04:00
Ogheneobukome Ejaife
28c93170c9
chore: fix Prettier formatting 2025-07-10 00:06:26 -04:00
Ogheneobukome Ejaife
0c053a1e47
feat: Implement resolveKubectlVersion function with comprehensive test coverage
Introduce resolveKubectlVersion function that enables automatic selection of the latest patch version when provided with major.minor version input (e.g., '1.27' resolves to 'v1.27.15')

Test Coverage:
- Major.minor version expansion to latest available patch
- Full version passthrough behavior (returns unchanged)
- Single matching version selection logic
- Comprehensive unit tests for kubectl version resolution scenarios
2025-07-10 00:06:06 -04:00
Tatsinnit
8ee333116b
Fix the major update packages including Jest. (#166)
Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
2025-06-17 15:10:19 -04:00
Jaiveer Katariya
304c023ca5
Actions Bump (#130)
* Bump the actions group across 1 directory with 3 updates

Bumps the actions group with 3 updates in the / directory: [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@actions/tool-cache` from 2.0.1 to 2.0.2
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Updates `@types/node` from 22.10.2 to 22.10.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `typescript` from 5.7.2 to 5.7.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)

---
updated-dependencies:
- dependency-name: "@actions/tool-cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* new method

* initial

* moved execution to index to free up tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 10:43:21 -05:00
Oliver King
bd5ca45a62
change uri (#77) 2023-01-09 13:55:56 -05:00
Vidya Reddy
2eb2a370ff
Vidya reddy prettier (#58)
* upgraded to Node16

* Enforce Prettier

* code fix

* jest version change and prettify code

Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com>
2022-06-27 15:31:07 -07:00
Oliver King
d449d75495
lower permissions for chmod (#51) 2022-05-27 17:36:08 -04:00
Tommy Barnes
a10d84bc2e
Refactoring Action for use with AKS Atlanta (#37)
* Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src.

* Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src.

* Grabbed the upstream integration tests and brought them here.  Removed bash script. Added validateKubectl.py to /test folder for integration tests.

* Ran npm run build

* Ran npm run build

* Updated on section for integration-tests.yml

* Removing ruby commands from integration tests yaml.

* Fixing discrepancies in integration test yaml.

* Fixing discrepancies in integration test yaml.

* Default to ubuntu-latest

* renamed python script according to workflow.

* renamed python script according to workflow.

* Fixing path parameters.

* Updated tsconfig.json

* Testing for int test failure.

* Validated that int tests work.

* Added new workflows.

* Testing release (#10)

* Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src.

* Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src.

* Grabbed the upstream integration tests and brought them here.  Removed bash script. Added validateKubectl.py to /test folder for integration tests.

* Ran npm run build

* Ran npm run build

* Updated on section for integration-tests.yml

* Removing ruby commands from integration tests yaml.

* Fixing discrepancies in integration test yaml.

* Fixing discrepancies in integration test yaml.

* Default to ubuntu-latest

* renamed python script according to workflow.

* renamed python script according to workflow.

* Fixing path parameters.

* Updated tsconfig.json

* Testing for int test failure.

* Validated that int tests work.

* Added new workflows.

Co-authored-by: Tommy Barnes <thbarnes@microsoft.com>

* made changes reflected in comments

Co-authored-by: Tommy Barnes <thbarnes@microsoft.com>
2022-01-05 11:19:30 -05:00
Gennady Trubach
847097ce58
Added multiarch support (#21) 2021-04-06 22:12:35 +05:30
Sundar
2fd2ffa506
Added L0 tests. (#15)
* Added L0 tests.

* Added tests for run function.
2021-03-25 18:56:24 +05:30
rgsubh
24a3a128bc
Setup for L0 Testcases (#6)
* SetUp for L0 TestCases

* Issue Fix

* Issue Fix

* Issue Fix

* Issue Fix

* Issue Fix

* Issue Fix

* Review comments fix: run npm install only with our build, npm install only dev for releases

* Running code covrage only on PR of master and releases
2020-07-01 09:07:14 +05:30
shigupt202
b7b3104215
Adding tool binaries to PATH (#4)
* Adding tool binaries to PATH

* Resolving PR comments
2020-06-08 14:04:23 +05:30
Deepak Sattiraju
39fc719fd9 Port from k8s-actions 2019-09-10 15:40:21 +05:30