Commit graph

5 commits

Author SHA1 Message Date
Ogheneobukome Ejaife
7500adf963
Resolve #104 : Enhance Version Handling: Auto-Resolve kubectl Major.Minor to Latest Patch (#172)
Some checks failed
CodeQL Advanced / Analyze (javascript-typescript) (push) Failing after 2s
Integration test for setup-kubectl / Validate release and master branch (push) Failing after 0s
Run prettify / Prettier Check (push) Failing after 0s
Run unit tests. / build (push) Failing after 0s
* 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

* chore: fix Prettier formatting

* 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.

* 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.

* Bump github/codeql-action in /.github/workflows in the actions group (#173)

Bumps the actions group in /.github/workflows with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.29.0 to 3.29.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ce28f5bb42...39edc492db)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: fix code style issues with Prettier

* revised parsing logic

* Improved readability and maintainability

* regenerated package-lock.json

* Regenerated Package-lock.json

* removed unnecessary files

* regenerated package-lock.json

* Regenerate package-lock.json to match package.json version ranges

* Restore package-lock.json to previous version

* uninstall ncc and regenerate package-lock.json using npm ci

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-11 15:31:20 -06: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
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
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
Deepak Sattiraju
39fc719fd9 Port from k8s-actions 2019-09-10 15:40:21 +05:30