Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(dogfood): update dogfood template to use artifactory#11452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
matifali merged 2 commits intomainfromdogfood-artifactory
Jan 5, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletionsdogfood/main.tf
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,16 @@ terraform {
}
}

variable "jfrog_url" {
type = string
description = "Artifactory URL. e.g. https://myartifactory.example.com"
# ensue the URL is HTTPS or HTTP
validation {
condition = can(regex("^(https|http)://", var.jfrog_url))
error_message = "jfrog_url must be a valid URL starting with either 'https://' or 'http://'"
}
}

locals {
// These are cluster service addresses mapped to Tailscale nodes. Ask Dean or
// Kyle for help.
Expand All@@ -21,7 +31,10 @@ locals {
"sa-saopaulo" = "tcp://oberstein-sao-cdr-dev.tailscale.svc.cluster.local:2375"
}

repo_dir = replace(data.coder_parameter.repo_dir.value, "/^~\\//", "/home/coder/")
repo_dir = replace(data.coder_parameter.repo_dir.value, "/^~\\//", "/home/coder/")
container_name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}"
registry_name = "codercom/oss-dogfood"
jfrog_host = replace(var.jfrog_url, "https://", "")
}

data "coder_parameter" "repo_dir" {
Expand DownExpand Up@@ -125,6 +138,20 @@ module "coder-login" {
agent_id = coder_agent.dev.id
}

module "jfrog" {
source = "https://registry.coder.com/modules/jfrog-oauth"
agent_id = coder_agent.dev.id
jfrog_url = var.jfrog_url
configure_code_server = true
username_field = "username"
package_managers = {
"npm" : "npm",
"go" : "go",
"pypi" : "pypi",
"docker" : "docker"
}
}

resource "coder_agent" "dev" {
arch = "amd64"
os = "linux"
Expand DownExpand Up@@ -219,8 +246,9 @@ resource "coder_agent" "dev" {
startup_script_timeout = 60
startup_script = <<-EOT
set -eux -o pipefail
# Start Docker service
sudo service docker start
EOT
EOT
}

resource "docker_volume" "home_volume" {
Expand DownExpand Up@@ -250,10 +278,6 @@ resource "docker_volume" "home_volume" {
}
}

locals {
container_name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}"
registry_name = "codercom/oss-dogfood"
}
data "docker_registry_image" "dogfood" {
name = "${local.registry_name}:latest"
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp