-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Public copy <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c5072f7
commit c938a3e
Showing
2 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
terraform { | ||
required_providers { | ||
oci = { source = "chainguard-dev/oci" } | ||
oci = { source = "chainguard-dev/oci" } | ||
imagetest = { source = "chainguard-dev/imagetest" } | ||
} | ||
} | ||
|
||
variable "digest" { | ||
description = "The image digest to run tests over." | ||
} | ||
|
||
data "oci_exec_test" "runs" { | ||
digest = var.digest | ||
script = "${path.module}/runs.sh" | ||
data "imagetest_inventory" "this" {} | ||
|
||
resource "imagetest_harness_docker" "this" { | ||
name = "bash" | ||
inventory = data.imagetest_inventory.this | ||
|
||
envs = { | ||
"IMAGE_NAME" : var.digest | ||
} | ||
} | ||
|
||
resource "imagetest_feature" "docker" { | ||
name = "Test bash" | ||
harness = imagetest_harness_docker.this | ||
|
||
steps = [ | ||
{ | ||
name = "run a bash function" | ||
cmd = <<EOF | ||
docker run --rm $IMAGE_NAME \ | ||
"function hello() { echo 'hello world'; }; hello" |grep "hello world" | ||
EOF | ||
}] | ||
} |
This file was deleted.
Oops, something went wrong.