forked from toolshed/abra
fix: coop-cloud
-> toolshed
This commit is contained in:
@ -97,16 +97,17 @@ func (a Abra) GetCatalogueDir() string { return path.Join(a.GetAbraDir(), "catal
|
||||
var config = LoadAbraConfig()
|
||||
|
||||
var (
|
||||
ABRA_DIR = config.GetAbraDir()
|
||||
SERVERS_DIR = config.GetServersDir()
|
||||
RECIPES_DIR = config.GetRecipesDir()
|
||||
VENDOR_DIR = config.GetVendorDir()
|
||||
BACKUP_DIR = config.GetBackupDir()
|
||||
CATALOGUE_DIR = config.GetCatalogueDir()
|
||||
RECIPES_JSON = path.Join(config.GetCatalogueDir(), "recipes.json")
|
||||
REPOS_BASE_URL = "https://git.coopcloud.tech/coop-cloud"
|
||||
CATALOGUE_JSON_REPO_NAME = "recipes-catalogue-json"
|
||||
SSH_URL_TEMPLATE = "ssh://git@git.coopcloud.tech:2222/coop-cloud/%s.git"
|
||||
ABRA_DIR = config.GetAbraDir()
|
||||
SERVERS_DIR = config.GetServersDir()
|
||||
RECIPES_DIR = config.GetRecipesDir()
|
||||
VENDOR_DIR = config.GetVendorDir()
|
||||
BACKUP_DIR = config.GetBackupDir()
|
||||
CATALOGUE_DIR = config.GetCatalogueDir()
|
||||
RECIPES_JSON = path.Join(config.GetCatalogueDir(), "recipes.json")
|
||||
REPOS_BASE_URL = "https://git.coopcloud.tech/coop-cloud"
|
||||
CATALOGUE_JSON_REPO_NAME = "recipes-catalogue-json"
|
||||
TOOLSHED_SSH_URL_TEMPLATE = "ssh://git@git.coopcloud.tech:2222/toolshed/%s.git"
|
||||
RECIPES_SSH_URL_TEMPLATE = "ssh://git@git.coopcloud.tech:2222/coop-cloud/%s.git"
|
||||
|
||||
// NOTE(d1): please note, this was done purely out of laziness on our part
|
||||
// AFAICR. it's easy to punt the value into the label because that is what is
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"git.coopcloud.tech/coop-cloud/godotenv"
|
||||
"git.coopcloud.tech/toolshed/godotenv"
|
||||
)
|
||||
|
||||
// envVarModifiers is a list of env var modifier strings. These are added to
|
||||
|
@ -150,7 +150,7 @@ func Get(name string) Recipe {
|
||||
}
|
||||
|
||||
gitURL := fmt.Sprintf("%s/%s.git", config.REPOS_BASE_URL, name)
|
||||
sshURL := fmt.Sprintf(config.SSH_URL_TEMPLATE, name)
|
||||
sshURL := fmt.Sprintf(config.RECIPES_SSH_URL_TEMPLATE, name)
|
||||
if strings.Contains(name, "/") {
|
||||
u, err := url.Parse(name)
|
||||
if err != nil {
|
||||
|
@ -21,8 +21,8 @@ func TestGet(t *testing.T) {
|
||||
recipe: Recipe{
|
||||
Name: "foo",
|
||||
Dir: path.Join(cfg.GetAbraDir(), "/recipes/foo"),
|
||||
GitURL: "https://git.coopcloud.tech/coop-cloud/foo.git",
|
||||
SSHURL: "ssh://git@git.coopcloud.tech:2222/coop-cloud/foo.git",
|
||||
GitURL: "https://git.coopcloud.tech/toolshed/foo.git",
|
||||
SSHURL: "ssh://git@git.coopcloud.tech:2222/toolshed/foo.git",
|
||||
ComposePath: path.Join(cfg.GetAbraDir(), "recipes/foo/compose.yml"),
|
||||
ReadmePath: path.Join(cfg.GetAbraDir(), "recipes/foo/README.md"),
|
||||
SampleEnvPath: path.Join(cfg.GetAbraDir(), "recipes/foo/.env.sample"),
|
||||
@ -35,8 +35,8 @@ func TestGet(t *testing.T) {
|
||||
Name: "foo",
|
||||
EnvVersion: "1.2.3",
|
||||
Dir: path.Join(cfg.GetAbraDir(), "/recipes/foo"),
|
||||
GitURL: "https://git.coopcloud.tech/coop-cloud/foo.git",
|
||||
SSHURL: "ssh://git@git.coopcloud.tech:2222/coop-cloud/foo.git",
|
||||
GitURL: "https://git.coopcloud.tech/toolshed/foo.git",
|
||||
SSHURL: "ssh://git@git.coopcloud.tech:2222/toolshed/foo.git",
|
||||
ComposePath: path.Join(cfg.GetAbraDir(), "recipes/foo/compose.yml"),
|
||||
ReadmePath: path.Join(cfg.GetAbraDir(), "recipes/foo/README.md"),
|
||||
SampleEnvPath: path.Join(cfg.GetAbraDir(), "recipes/foo/.env.sample"),
|
||||
@ -100,7 +100,7 @@ func TestGetVersionLabelLocalDoesNotUseTimeoutLabel(t *testing.T) {
|
||||
// returns it. hopefully this won't fail too often! if you're here because
|
||||
// of a failure, just update the `defaultTimeoutLabel` value & permalink
|
||||
// below
|
||||
// https://git.coopcloud.tech/coop-cloud/traefik/src/commit/ac3a47fe8ca3ef92db84f64cfedfbb348000faee/.env.sample#L2
|
||||
// https://git.coopcloud.tech/toolshed/traefik/src/commit/ac3a47fe8ca3ef92db84f64cfedfbb348000faee/.env.sample#L2
|
||||
defaultTimeoutLabel := "300"
|
||||
assert.NotEqual(t, label, defaultTimeoutLabel)
|
||||
}
|
||||
|
Reference in New Issue
Block a user