Skip to content

Commit

Permalink
feat: evaluate environment variables in the args of gradle (#4457)
Browse files Browse the repository at this point in the history
  • Loading branch information
vLia authored Oct 11, 2023
1 parent 183ca39 commit 48d625e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ docker-build-cli:
#make docker-build-executor EXECUTOR=zap GITHUB_TOKEN=*** DOCKER_BUILDX_CACHE_FROM=type=registry,ref=docker.io/kubeshop/testkube-zap-executor:latest
#add ALPINE_IMAGE=alpine:3.18.0 env var for building of curl and scraper executor
docker-build-executor:
goreleaser release -f goreleaser_files/.goreleaser-docker-build-executor.yml --rm-dist --snapshot
goreleaser release -f goreleaser_files/.goreleaser-docker-build-executor.yml --clean --snapshot

dev-install-local-executors:
kubectl apply --namespace testkube -f https://raw.githubusercontent.com/kubeshop/testkube-operator/main/config/samples/executor_v1_executor.yaml
Expand Down
12 changes: 7 additions & 5 deletions contrib/executor/gradle/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
![Testkube Logo](https://raw.githubusercontent.com/kubeshop/testkube/main/assets/testkube-color-gray.png)

# Welcome to TestKube Gradle Executor
# Welcome to Testkube Gradle Executor

TestKube Gradle Executor is a test executor to run Gradle tasks with [TestKube](https://testkube.io).
Testkube Gradle Executor is a test executor to run Gradle tasks with [Testkube](https://testkube.io).

## Usage

You need to register and deploy the executor in your cluster.

```bash
kubectl apply -f examples/gradle-executor.yaml
```

Issue the following commands to create and start a Gradle test for a given Git repository:

```bash
kubectl testkube create test --git-uri https://github.com/lreimer/hands-on-testkube.git --git-branch main --type "gradle/test" --name gradle-test
kubectl testkube run test --watch gradle-test
```

# Issues and enchancements
# Issues and enchancements

Please follow the main [TestKube repository](https://github.com/kubeshop/testkube) for reporting any [issues](https://github.com/kubeshop/testkube/issues) or [discussions](https://github.com/kubeshop/testkube/discussions)
Please follow the main [Testkube repository](https://github.com/kubeshop/testkube) for reporting any [issues](https://github.com/kubeshop/testkube/issues) or [discussions](https://github.com/kubeshop/testkube/discussions)

# Testkube
# Testkube

For more info go to [main testkube repo](https://github.com/kubeshop/testkube)

Expand Down
2 changes: 1 addition & 1 deletion contrib/executor/gradle/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ func (r *GradleRunner) Run(ctx context.Context, execution testkube.Execution) (r
if args[i] == "<projectDir>" {
args[i] = project
}
args[i] = os.ExpandEnv(args[i])
}

output.PrintEvent("Running task: "+task, directory, gradleCommand, args)
out, err := executor.Run(runPath, gradleCommand, envManager, args...)
out = envManager.ObfuscateSecrets(out)

Expand Down

0 comments on commit 48d625e

Please sign in to comment.