From 81cdc843ece1828ac460f78453b18306d24ac65b Mon Sep 17 00:00:00 2001 From: decentral1se Date: Fri, 3 Jan 2025 20:23:27 +0100 Subject: [PATCH] fix: `coop-cloud` -> `toolshed` --- .drone.yml | 6 +++--- README.md | 4 ++-- cli/app/cmd_test.go | 2 +- cli/catalogue/catalogue.go | 2 +- pkg/config/abra.go | 21 ++++++++++--------- pkg/envfile/envfile.go | 2 +- pkg/recipe/recipe.go | 2 +- pkg/recipe/recipe_test.go | 10 ++++----- scripts/installer/installer | 6 +++--- scripts/tests/run-ci-int | 2 +- .../app_deploy_remote_recipes.bats | 12 +++++------ tests/integration/helpers/recipe.bash | 4 ++-- 12 files changed, 37 insertions(+), 36 deletions(-) diff --git a/.drone.yml b/.drone.yml index cfc88e86..9f2063f7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,7 +10,7 @@ steps: - name: make test image: golang:1.22 environment: - CATL_URL: https://git.coopcloud.tech/coop-cloud/recipes-catalogue-json.git + CATL_URL: https://git.coopcloud.tech/toolshed/recipes-catalogue-json.git commands: - mkdir -p $HOME/.abra - git clone $CATL_URL $HOME/.abra/catalogue @@ -50,7 +50,7 @@ steps: username: 3wordchant password: from_secret: git_coopcloud_tech_token_3wc - repo: git.coopcloud.tech/coop-cloud/abra + repo: git.coopcloud.tech/toolshed/abra tags: dev registry: git.coopcloud.tech when: @@ -74,7 +74,7 @@ steps: request_pty: true script: - | - wget https://git.coopcloud.tech/coop-cloud/abra/raw/branch/main/scripts/tests/run-ci-int -O run-ci-int + wget https://git.coopcloud.tech/toolshed/abra/raw/branch/main/scripts/tests/run-ci-int -O run-ci-int chmod +x run-ci-int sh run-ci-int when: diff --git a/README.md b/README.md index 0b50bb2f..5ae21bbe 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # `abra` -[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/abra/status.svg?ref=refs/heads/main)](https://build.coopcloud.tech/coop-cloud/abra) -[![Go Report Card](https://goreportcard.com/badge/git.coopcloud.tech/coop-cloud/abra)](https://goreportcard.com/report/git.coopcloud.tech/coop-cloud/abra) +[![Build Status](https://build.coopcloud.tech/api/badges/toolshed/abra/status.svg?ref=refs/heads/main)](https://build.coopcloud.tech/toolshed/abra) +[![Go Report Card](https://goreportcard.com/badge/git.coopcloud.tech/toolshed/abra)](https://goreportcard.com/report/git.coopcloud.tech/toolshed/abra) [![Go Reference](https://pkg.go.dev/badge/coopcloud.tech/abra.svg)](https://pkg.go.dev/coopcloud.tech/abra) The Co-op Cloud utility belt 🎩🐇 diff --git a/cli/app/cmd_test.go b/cli/app/cmd_test.go index ed3ac6f9..a07bc899 100644 --- a/cli/app/cmd_test.go +++ b/cli/app/cmd_test.go @@ -13,7 +13,7 @@ func TestParseCmdArgs(t *testing.T) { }{ // `--` is not parsed when passed in from the command-line e.g. -- foo bar baz // so we need to eumlate that as missing when testing if bash args are passed in - // see https://git.coopcloud.tech/coop-cloud/organising/issues/336 for more + // see https://git.coopcloud.tech/toolshed/organising/issues/336 for more {[]string{"foo.com", "app", "test"}, false, ""}, {[]string{"foo.com", "app", "test", "foo"}, true, "foo "}, {[]string{"foo.com", "app", "test", "foo", "bar", "baz"}, true, "foo bar baz "}, diff --git a/cli/catalogue/catalogue.go b/cli/catalogue/catalogue.go index 01f582b7..8f57da7c 100644 --- a/cli/catalogue/catalogue.go +++ b/cli/catalogue/catalogue.go @@ -168,7 +168,7 @@ keys configured on your account.`, log.Fatal(err) } - sshURL := fmt.Sprintf(config.SSH_URL_TEMPLATE, config.CATALOGUE_JSON_REPO_NAME) + sshURL := fmt.Sprintf(config.TOOLSHED_SSH_URL_TEMPLATE, config.CATALOGUE_JSON_REPO_NAME) if err := gitPkg.CreateRemote(repo, "origin-ssh", sshURL, internal.Dry); err != nil { log.Fatal(err) } diff --git a/pkg/config/abra.go b/pkg/config/abra.go index 07ff04cf..27b5fef1 100644 --- a/pkg/config/abra.go +++ b/pkg/config/abra.go @@ -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 diff --git a/pkg/envfile/envfile.go b/pkg/envfile/envfile.go index 9e41b19b..f10359cf 100644 --- a/pkg/envfile/envfile.go +++ b/pkg/envfile/envfile.go @@ -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 diff --git a/pkg/recipe/recipe.go b/pkg/recipe/recipe.go index 7306a336..2434f7ed 100644 --- a/pkg/recipe/recipe.go +++ b/pkg/recipe/recipe.go @@ -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 { diff --git a/pkg/recipe/recipe_test.go b/pkg/recipe/recipe_test.go index 8afd9df6..43641a8f 100644 --- a/pkg/recipe/recipe_test.go +++ b/pkg/recipe/recipe_test.go @@ -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) } diff --git a/scripts/installer/installer b/scripts/installer/installer index 781fd5e9..89c317d8 100755 --- a/scripts/installer/installer +++ b/scripts/installer/installer @@ -1,9 +1,9 @@ #!/usr/bin/env bash ABRA_VERSION="0.9.0-beta" -ABRA_RELEASE_URL="https://git.coopcloud.tech/api/v1/repos/coop-cloud/abra/releases/tags/$ABRA_VERSION" +ABRA_RELEASE_URL="https://git.coopcloud.tech/api/v1/repos/toolshed/abra/releases/tags/$ABRA_VERSION" RC_VERSION="0.8.0-rc1-beta" -RC_VERSION_URL="https://git.coopcloud.tech/api/v1/repos/coop-cloud/abra/releases/tags/$RC_VERSION" +RC_VERSION_URL="https://git.coopcloud.tech/api/v1/repos/toolshed/abra/releases/tags/$RC_VERSION" for arg in "$@"; do if [ "$arg" == "--rc" ]; then @@ -40,7 +40,7 @@ function install_abra_release { if ! type "wget" > /dev/null 2>&1; then echo "'wget' is not installed, cannot proceed..." echo "perhaps try installing manually via the releases URL?" - echo "https://git.coopcloud.tech/coop-cloud/abra/releases" + echo "https://git.coopcloud.tech/toolshed/abra/releases" exit 1 fi diff --git a/scripts/tests/run-ci-int b/scripts/tests/run-ci-int index d131b6f3..f5b756e9 100755 --- a/scripts/tests/run-ci-int +++ b/scripts/tests/run-ci-int @@ -42,7 +42,7 @@ echo "========================================================================" echo "CLONING ABRA" echo "========================================================================" rm -rf abra -git clone ssh://git@git.coopcloud.tech:2222/coop-cloud/abra.git +git clone ssh://git@git.coopcloud.tech:2222/toolshed/abra.git cd abra git checkout main echo "========================================================================" diff --git a/tests/integration/app_deploy_remote_recipes.bats b/tests/integration/app_deploy_remote_recipes.bats index 0e006ce0..586040cc 100644 --- a/tests/integration/app_deploy_remote_recipes.bats +++ b/tests/integration/app_deploy_remote_recipes.bats @@ -27,18 +27,18 @@ teardown(){ # bats test_tags=slow @test "deploy remote recipe" { - run sed -i 's/TYPE=abra-test-recipe:.*/TYPE=git.coopcloud.tech\/coop-cloud\/abra-test-recipe/g' \ + run sed -i 's/TYPE=abra-test-recipe:.*/TYPE=git.coopcloud.tech\/toolshed\/abra-test-recipe/g' \ "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" assert_success run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks assert_success - assert_output --partial "git.coopcloud.tech/coop-cloud/abra-test-recipe" + assert_output --partial "git.coopcloud.tech/toolshed/abra-test-recipe" } # bats test_tags=slow @test "deploy remote recipe with version" { - run sed -i 's/TYPE=abra-test-recipe:.*/TYPE=git.coopcloud.tech\/coop-cloud\/abra-test-recipe:0.2.0+1.21.0/g' \ + run sed -i 's/TYPE=abra-test-recipe:.*/TYPE=git.coopcloud.tech\/toolshed\/abra-test-recipe:0.2.0+1.21.0/g' \ "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" assert_success @@ -49,7 +49,7 @@ teardown(){ # bats test_tags=slow @test "deploy remote recipe with chaos commit" { - run sed -i 's/TYPE=abra-test-recipe:.*/TYPE=git.coopcloud.tech\/coop-cloud\/abra-test-recipe:1e83340e/g' \ + run sed -i 's/TYPE=abra-test-recipe:.*/TYPE=git.coopcloud.tech\/toolshed\/abra-test-recipe:1e83340e/g' \ "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" assert_success @@ -60,14 +60,14 @@ teardown(){ # bats test_tags=slow @test "remote recipe version written to env" { - run sed -i 's/TYPE=abra-test-recipe:.*/TYPE=git.coopcloud.tech\/coop-cloud\/abra-test-recipe/g' \ + run sed -i 's/TYPE=abra-test-recipe:.*/TYPE=git.coopcloud.tech\/toolshed\/abra-test-recipe/g' \ "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" assert_success run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks assert_success - run grep -q "TYPE=git.coopcloud.tech\/coop-cloud\/abra-test-recipe:$(_latest_release)" \ + run grep -q "TYPE=git.coopcloud.tech\/toolshed\/abra-test-recipe:$(_latest_release)" \ "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" assert_success } diff --git a/tests/integration/helpers/recipe.bash b/tests/integration/helpers/recipe.bash index 2a9bd80d..b50da5e4 100644 --- a/tests/integration/helpers/recipe.bash +++ b/tests/integration/helpers/recipe.bash @@ -9,7 +9,7 @@ _fetch_recipe() { run mkdir -p "$ABRA_DIR/recipes" assert_success - run git clone "https://git.coopcloud.tech/coop-cloud/$TEST_RECIPE" "$ABRA_DIR/recipes/$TEST_RECIPE" + run git clone "https://git.coopcloud.tech/toolshed/$TEST_RECIPE" "$ABRA_DIR/recipes/$TEST_RECIPE" assert_success fi } @@ -33,7 +33,7 @@ _ensure_latest_version(){ _ensure_catalogue(){ if [[ ! -d "$ABRA_DIR/catalogue" ]]; then - run git clone https://git.coopcloud.tech/coop-cloud/recipes-catalogue-json.git $ABRA_DIR/catalogue + run git clone https://git.coopcloud.tech/toolshed/recipes-catalogue-json.git $ABRA_DIR/catalogue assert_success fi }