Please sign in to comment.
Add container goal
Add container goal definition and working schedulers for Kubernetes jobs and Docker CLI. Use first container as goal container, which means it is the only one waited on and its status sets the goal status. Will throw error if no containers defined. It will do its best to make the goal and fulfillment names unique. Co-opt KubernetesGoalScheduler for k8s container goal implementation, extracting some of its functionality into functions that can be used to define the init container. Collect logs from k8s into goal progress log, adding a delay because log delivery from the k8s API can occur after the container terminates. Add tests for some scheduler and environment variable functionality. Add CacheEntry interface and do some minor clean up to caching interface. Correct goal caching restore interface to only require options it uses. Clean up cache tests. Properly handle project directory and cache use by copying its contents to a location usable by container, mounting that location in the container, setting the working directory in the first container to that location, and copying the contents back after the containers exit. Closes #162
- Loading branch information...
Showing with 3,151 additions and 168 deletions.
- +20 −0 index.ts
- +6 −8 lib/goal/cache/CompressingGoalCache.ts
- +32 −13 lib/goal/cache/goalCaching.ts
- +249 −0 lib/goal/container/container.ts
- +319 −0 lib/goal/container/docker.ts
- +437 −0 lib/goal/container/k8s.ts
- +120 −0 lib/goal/container/util.ts
- +64 −38 lib/pack/k8s/KubernetesGoalScheduler.ts
- +20 −20 lib/pack/k8s/KubernetesJobDeletingGoalCompletionListener.ts
- +45 −54 package-lock.json
- +5 −3 package.json
- +2 −2 test/goal/cache/CompressingGoalCache.test.ts
- +62 −27 test/goal/cache/goalCaching.test.ts
- +592 −0 test/goal/container/docker.test.ts
- +849 −0 test/goal/container/k8s.test.ts
- +160 −0 test/goal/container/util.test.ts
- +17 −0 test/goal/container/util.ts
- +2 −2 test/mapping/pushtest/toPublicRepo.test.ts
- +150 −1 test/pack/k8s/KubernetesGoalScheduler.test.ts
Oops, something went wrong.