-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run integration tests against oldstable (#310)
* feawt(scripts/coderversion): emit OLDSTABLE version * chore: update README to better illustrate testing on tip of main * chore(integration): add test for workspace owner being set * ci: run integration tests against oldstable
- Loading branch information
Showing
5 changed files
with
136 additions
and
2 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
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
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
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
terraform { | ||
required_providers { | ||
coder = { | ||
source = "coder/coder" | ||
} | ||
local = { | ||
source = "hashicorp/local" | ||
} | ||
} | ||
} | ||
|
||
// TODO: test coder_external_auth | ||
// data coder_external_auth "me" {} | ||
data "coder_provisioner" "me" {} | ||
data "coder_workspace" "me" {} | ||
data "coder_workspace_owner" "me" {} | ||
|
||
locals { | ||
# NOTE: these must all be strings in the output | ||
output = { | ||
"provisioner.arch" : data.coder_provisioner.me.arch, | ||
"provisioner.id" : data.coder_provisioner.me.id, | ||
"provisioner.os" : data.coder_provisioner.me.os, | ||
"workspace.access_port" : tostring(data.coder_workspace.me.access_port), | ||
"workspace.access_url" : data.coder_workspace.me.access_url, | ||
"workspace.id" : data.coder_workspace.me.id, | ||
"workspace.name" : data.coder_workspace.me.name, | ||
"workspace.start_count" : tostring(data.coder_workspace.me.start_count), | ||
"workspace.template_id" : data.coder_workspace.me.template_id, | ||
"workspace.template_name" : data.coder_workspace.me.template_name, | ||
"workspace.template_version" : data.coder_workspace.me.template_version, | ||
"workspace.transition" : data.coder_workspace.me.transition, | ||
"workspace_owner.email" : data.coder_workspace_owner.me.email, | ||
"workspace_owner.full_name" : data.coder_workspace_owner.me.full_name, | ||
"workspace_owner.groups" : jsonencode(data.coder_workspace_owner.me.groups), | ||
"workspace_owner.id" : data.coder_workspace_owner.me.id, | ||
"workspace_owner.name" : data.coder_workspace_owner.me.name, | ||
"workspace_owner.oidc_access_token" : data.coder_workspace_owner.me.oidc_access_token, | ||
"workspace_owner.session_token" : data.coder_workspace_owner.me.session_token, | ||
"workspace_owner.ssh_private_key" : data.coder_workspace_owner.me.ssh_private_key, | ||
"workspace_owner.ssh_public_key" : data.coder_workspace_owner.me.ssh_public_key, | ||
"workspace_owner.login_type" : data.coder_workspace_owner.me.login_type, | ||
} | ||
} | ||
|
||
variable "output_path" { | ||
type = string | ||
} | ||
|
||
resource "local_file" "output" { | ||
filename = var.output_path | ||
content = jsonencode(local.output) | ||
} | ||
|
||
output "output" { | ||
value = local.output | ||
sensitive = true | ||
} |
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