Commit Graph

73 Commits

Author SHA1 Message Date
Nikola Jokic
ae31f04223 removed equal sign from env buffer, added defensive guard against the key (#62)
* removed equal sign from env buffer, added defensive guard against the key

* Update packages/k8s/src/k8s/utils.ts

Co-authored-by: John Sudol <24583161+johnsudol@users.noreply.github.com>

* Update packages/k8s/src/k8s/utils.ts

Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>

* fix format

---------

Co-authored-by: John Sudol <24583161+johnsudol@users.noreply.github.com>
Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
2023-02-09 17:11:16 +01:00
dependabot[bot]
7754cb80eb Bump http-cache-semantics from 4.1.0 to 4.1.1 in /packages/k8s (#63)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 14:54:32 +01:00
Nikola Jokic
ae432db512 docker and k8s: read from stdin inside try catch block (#49)
There might be situation where reading from standard input fails. In
that case, we should encapsulate that exception within the try catch
block to avoid unhandeled Promise rejection exception and provide more
information about the error
2023-01-23 12:46:47 +01:00
Nikola Jokic
4448b61e00 Fix service port mappings when input is undefined, null, or empty (#60)
* fix: service without ports defined

* fix port mappings when ports are undefined,null or empty

* fix

Co-authored-by: Ronald Claveau <ronald.claveau@pennylane.com>
2023-01-06 11:54:52 +01:00
dependabot[bot]
bf39b9bf16 Bump json5 from 1.0.1 to 1.0.2 in /packages/hooklib (#56)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-06 11:05:26 +01:00
dependabot[bot]
5b597b0fe2 Bump json5 from 2.2.1 to 2.2.3 in /packages/k8s (#57)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-06 11:05:05 +01:00
dependabot[bot]
0e1ba7bdc8 Bump json5 from 1.0.1 to 1.0.2 in /packages/docker (#58)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-06 11:04:42 +01:00
Niels ten Boom
73914b840c fix: naming for services & service entrypoint (#53)
* rename to container

* fix container image name bug

* fix entrypoint bug

* bump patch version

* formatting

* fix versions in package-lock

* add test

* revert version bump

* added check + test for args as well

* formatting

* remove cscode launch.json

* expand example json

* wrong version, revert to correct one

* correct lock

* throw error on invalid image definition

* change falsy check

* Update packages/k8s/src/k8s/utils.ts

Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>

Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
2023-01-06 10:22:41 +01:00
dependabot[bot]
ea011028f5 Bump @actions/core from 1.6.0 to 1.9.1 in /packages/hooklib (#29)
* Bump @actions/core from 1.6.0 to 1.9.1 in /packages/hooklib

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

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

* Trigger Build

* Update package lock for docker and k8s

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
2022-12-15 14:58:13 +01:00
Nikola Jokic
eaae191ebb k8s: don't overwriting service entrypoint (#45) 2022-12-15 14:13:57 +01:00
dependabot[bot]
418d484160 Bump jose from 2.0.5 to 2.0.6 in /packages/k8s (#31)
Bumps [jose](https://github.com/panva/jose) from 2.0.5 to 2.0.6.
- [Release notes](https://github.com/panva/jose/releases)
- [Changelog](https://github.com/panva/jose/blob/v2.0.6/CHANGELOG.md)
- [Commits](https://github.com/panva/jose/compare/v2.0.5...v2.0.6)

---
updated-dependencies:
- dependency-name: jose
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-15 14:04:57 +01:00
Nikola Jokic
ce3c55d086 exposing env variables from runner with DOCKER_ envs to respect docker options set on host (#40)
* exposing env variables from runner with DOCKER_ prefix to respect rootless docker

* Prioritize DOCKER cli over workflow envs

* formatted
2022-12-08 08:09:51 +01:00
Nikola Jokic
d988d965c5 fixing issue related to setting hostPort and containerPort when format is port/proto (#38)
* fixing issue related to setting hostPort and containerPort when format is port/proto

* added one more test case and refactored containerPorts to be without regexp

* added throw on ports outside of (0,65536) range with test

* repaired error message and added tests to multi splits. refactored port checking
2022-11-15 14:23:09 +01:00
Nikola Jokic
23cc6dda6f fixed substring issue with /github/workspace and /github/file_commands (#35)
* fixed substring issue with /github/workspace and /github/file_commands

* npm run format

* last 3 parts of the path are mounted to /github/workspace and /github/file_commands

* file commands now point to _temp/_runner_file_commands
2022-11-03 14:55:07 +01:00
dependabot[bot]
8986035ca8 Bump @actions/core from 1.8.2 to 1.9.1 in /packages/k8s (#28)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.2 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 17:12:49 +02:00
dependabot[bot]
e975289683 Bump @actions/core from 1.6.0 to 1.9.1 in /packages/docker (#27)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 17:12:17 +02:00
Nikola Jokic
8e06496e34 fixing defaulting to docker hub on private registry, and b64 encoding (#25) 2022-08-16 09:30:58 -04:00
Thomas Boop
e2033b29c7 0.1.2 release (#22)
* 0.1.2 release

* trace the error and show a user readable message
2022-06-23 08:57:14 -04:00
Nikola Jokic
eb47baaf5e Adding more tests and minor changes in code (#21)
* added cleanup job checks, started testing constants file

* added getVolumeClaimName test

* added write entrypoint tests

* added tests around k8s utils

* fixed new regexp

* added tests around runner instance label

* 100% test coverage of constants
2022-06-22 14:15:42 -04:00
Nikola Jokic
20c19dae27 refactor around job claim name and runner instance labels (#20)
* refactor around job claim name, and runner instance labels

* repaired failing test
2022-06-22 09:32:50 -04:00
Thomas Boop
4307828719 Don't use JSON.stringify for errors (#19)
* better error handling

* remove unneeded catch

* Update index.ts
2022-06-22 15:20:48 +02:00
Thomas Boop
bb1a033ed7 Make K8s claim name optional (#18)
* make claim name optional

* update version and notes

* fix ci

* correctly invoke function
2022-06-20 15:09:04 -04:00
Nikola Jokic
898063bddd repaired docker PATH export and added tests both for docker and k8s (#17)
* repaired docker PATH export and added tests both for docker and k8s

* added todo comments about next major version and typeof prepend path
2022-06-16 09:44:40 -04:00
Thomas Boop
266b8edb99 Fix error handling for invalid pods (#16)
* update readme and fix error handling for bad pods

* update limitations
2022-06-16 09:02:55 -04:00
Thomas Boop
47cbf5a0d7 Misc Tracing cleanup (#15)
* cleanup final bits

* fix import
2022-06-15 09:28:43 -04:00
Nikola Jokic
de4553f25a added permission check for secrets (#14)
* added permission check for secrets

* typo in subresource

* moved auth check to the command receiver
2022-06-15 08:54:50 -04:00
Nikola Jokic
8ea57170d8 Fix working directory and write state for appPod to be used in run-script-step (#8)
* added initial entrypoint script

* change workingg directory working with addition to fix prepare-job state output

* added prepend path

* added run-script-step file generation, removed prepend path from container-step and prepare job

* latest changes with testing run script step

* fix the mounts real fast

* cleanup

* fix tests

* add kind test

* add kind yaml to ignore and run it during ci

* fix kind option

* remove gitignore

* lowercase pwd

* checkout first!

* ignore test file in build.yaml

* fixed wrong working directory and added test to run script step testing for the env

* handle env's/escaping better

* added single quote escape to env escapes

* surounded env value with single quote

* added spacing around run-container-step, changed examples to actually echo hello world

* refactored tests

* make sure to escape properly

* set addition mounts for container steps

* fixup container action mounts

Co-authored-by: Thomas Boop <thboop@github.com>
Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com>
2022-06-14 21:41:49 -04:00
Nikola Jokic
643bf36fd8 docker apply env on commands where we are using '-e' (#11)
* added wrapper for docker -e to apply env

* added envs around services as well

* added wrapping environment around execute command

* fixed setting the env variable for containerRun

* added env to exec and not to handle envs by ourself

* returned back the comment to run-container-step
2022-06-13 11:13:47 -04:00
Nikola Jokic
d3ec1c0040 prepare job in k8s does not allow for no job container 2022-06-10 16:38:07 +02:00
Nikola Jokic
3e04b45585 removed leftover todo comments 2022-06-10 12:45:59 +02:00
Nikola Jokic
2b386f7cbd returned logging below the try k8s prepare job 2022-06-10 12:00:49 +02:00
Nikola Jokic
bf362ba0dd fixed prepare-job for docker to allow for no job container 2022-06-10 11:56:10 +02:00
Nikola Jokic
7ae8942b3d Repaired prepare-job hook without job container 2022-06-10 11:07:50 +02:00
Thomas Boop
7c4e0f8d51 update limitations 2022-06-08 15:32:30 -04:00
Thomas Boop
cd310988c9 slight refactor, bring pod phase to k8s lib, better types 2022-06-08 15:32:30 -04:00
Thomas Boop
1bfc52f466 Merge pull request #2 from actions/nikola-jokic/computed-build-directory
Computed action build directory. Refactored tests and added docker build test
2022-06-08 13:38:57 -04:00
Nikola Jokic
2aa6f9d9c8 added quotes back to the path 2022-06-08 17:39:37 +02:00
Nikola Jokic
3d0ca83d2d removed quotes around -e env variables 2022-06-08 17:37:43 +02:00
Thomas Boop
5daaae120b Merge pull request #9 from actions/nikola-jokic/user-volume-mounts-path
User volume mount restriction to the work directory mounts if path is absolute
2022-06-08 11:15:31 -04:00
Nikola Jokic
df448fbbb0 cleared registry for testing 2022-06-08 17:13:43 +02:00
Nikola Jokic
ee2554e2c0 filter out empty ports 2022-06-08 16:49:44 +02:00
Thomas Boop
f764d18c4c Update packages/k8s/src/k8s/utils.ts 2022-06-08 09:41:38 -04:00
Nikola Jokic
51bd8b62a4 Merge branch 'nikola-jokic/docker-env' into nikola-jokic/computed-build-directory 2022-06-08 15:07:59 +02:00
Nikola Jokic
150bc0503a substituited all -e key=value to -e key 2022-06-08 15:02:40 +02:00
Nikola Jokic
9ce39e5a60 Merge branch 'main' into nikola-jokic/computed-build-directory 2022-06-08 14:37:13 +02:00
Nikola Jokic
8351f842bd added isAlpine test to prepare job 2022-06-08 14:29:10 +02:00
Nikola Jokic
bf3707d7e0 added guard around prependPath 2022-06-08 13:28:46 +02:00
Nikola Jokic
88b7b19db7 fixed interface for hooklib and example repos 2022-06-08 13:25:45 +02:00
Nikola Jokic
dd5dfb3e48 refactored tests to be easier to follow 2022-06-08 13:20:54 +02:00
Nikola Jokic
84a57de2e3 added tests around user volume mounts for prepare job 2022-06-08 11:23:05 +02:00