forked from coop-cloud/abra-bash
Compare commits
21 Commits
Author | SHA1 | Date |
---|---|---|
decentral1se | e6f4e942a2 | |
decentral1se | 419e893968 | |
decentral1se | 4529c05d2b | |
decentral1se | 32b11c9bee | |
decentral1se | f1c1f25741 | |
decentral1se | a515198b9f | |
roxxers | 55138b7e0f | |
3wc | 78ab592209 | |
3wc | fdbbe93679 | |
3wc | cfdf7f82f6 | |
3wc | f69e155d27 | |
3wc | 9b7674c6d4 | |
3wc | 1c820c70fb | |
3wc | e92fa554d4 | |
3wc | 6ac14f55ca | |
3wc | 71820f7e0b | |
3wc | 207728e1be | |
decentral1se | 36e470c8e7 | |
decentral1se | 0096e0d30b | |
decentral1se | a636d2f17c | |
3wordchant | 179ed64e0f |
|
@ -48,9 +48,9 @@ steps:
|
|||
- name: trigger downstream builds
|
||||
image: plugins/downstream
|
||||
settings:
|
||||
server: https://drone.autonomic.zone
|
||||
server: https://build.coopcloud.tech
|
||||
token:
|
||||
from_secret: decentral1se_token
|
||||
from_secret: coopcloud_drone_token
|
||||
fork: true
|
||||
repositories:
|
||||
- coop-cloud/drone-abra
|
||||
|
@ -72,7 +72,7 @@ steps:
|
|||
roomid: "IFazIpLtxiScqbHqoa:autonomic.zone"
|
||||
userid: "@autono-bot:autonomic.zone"
|
||||
accesstoken:
|
||||
from_secret: autono_bot_access_token
|
||||
from_secret: autonobot_rocketchat_access_token
|
||||
depends_on:
|
||||
- run shellcheck
|
||||
- run flake8
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: "Do not use this issue tracker"
|
||||
about: "Do not use this issue tracker"
|
||||
title: "Do not use this issue tracker"
|
||||
labels: []
|
||||
---
|
||||
|
||||
Please report your issue on [`coop-cloud/organising`](https://git.coopcloud.tech/coop-cloud/organising)
|
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -9,9 +9,28 @@
|
|||
|
||||
# abra x.x.x (UNRELEASED)
|
||||
|
||||
# abra 10.0.5 (2021-09-06)
|
||||
|
||||
- Fix catalogue version listing parsing.
|
||||
|
||||
# abra 10.0.4 (2021-09-06)
|
||||
|
||||
- Understand how to parse the new catalogue versions listing.
|
||||
|
||||
# abra 10.0.3 (????-??-??)
|
||||
|
||||
- Sorry folks, no change log.
|
||||
|
||||
# abra 10.0.2 (????-??-??)
|
||||
|
||||
- Sorry folks, no change log.
|
||||
|
||||
# abra 10.0.1 (2021-07-30)
|
||||
|
||||
- New `recipe .. lint` command ([#202](https://git.autonomic.zone/coop-cloud/abra/issues/202))
|
||||
- `abra-capsul` plugin ([e85bcc4](https://git.autonomic.zone/coop-cloud/abra/commit/e85bcc4))
|
||||
- Fix `run <service> <cmd>` invocations ([#204](https://git.autonomic.zone/coop-cloud/abra/issues/204))
|
||||
- Point installer at our [half-migrated new Gitea instance](https://git.coopcloud.tech) ([#207](https://git.coopcloud.tech/coop-cloud/abra/pulls/207) thanks @nicksellen!)
|
||||
|
||||
# abra 10.0.0 (2021-07-06)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ RUN mkdir -p ~/.abra/apps
|
|||
RUN mkdir -p ~/.abra/vendor
|
||||
RUN mkdir -p ~/.ssh/
|
||||
|
||||
RUN ssh-keyscan -p 2222 git.autonomic.zone > ~/.ssh/known_hosts
|
||||
RUN ssh-keyscan -p 2222 git.coopcloud.tech > ~/.ssh/known_hosts
|
||||
|
||||
RUN curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 --output ~/.abra/vendor/jq
|
||||
RUN chmod +x ~/.abra/vendor/jq
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
# abra
|
||||
|
||||
## 🔥 🔥 🔥 D E P R E C A T E D 🔥 🔥 🔥
|
||||
|
||||
[`abra`](https://git.coopcloud.tech/coop-cloud/abra) served us well but we're porting it to [Golang](https://golang.org) over in [`go-abra`](https://git.coopcloud.tech/coop-cloud/go-abra). To learn more about the reasons for that, see [this blog post](https://coopcloud.tech/blog/this-month-in-coop-cloud-july/). This means this repository and tool are officially deprecated as of August 1rst 2021. We will still provide bug security fixes but no new features will be developed in `abra`. Feel free to go on using it and reporting issues against this issue tracker. Thanks for all the good times Bash.
|
||||
|
||||
## 🔥 🔥 🔥 D E P R E C A T E D 🔥 🔥 🔥
|
||||
|
||||
---
|
||||
|
||||
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/abra/status.svg)](https://drone.autonomic.zone/coop-cloud/abra)
|
||||
|
||||
> https://coopcloud.tech
|
||||
|
|
17
abra
17
abra
|
@ -2,10 +2,10 @@
|
|||
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
GIT_URL="https://git.autonomic.zone/coop-cloud/"
|
||||
GIT_URL="https://git.coopcloud.tech/coop-cloud/"
|
||||
ABRA_APPS_URL="https://apps.coopcloud.tech"
|
||||
ABRA_DIR="${ABRA_DIR:-$HOME/.abra}"
|
||||
ABRA_VERSION="10.0.0"
|
||||
ABRA_VERSION="10.0.5"
|
||||
ABRA_BACKUP_DIR="${ABRA_BACKUP_DIR:-$ABRA_DIR/backups}"
|
||||
ABRA_VENDOR_DIR="$ABRA_DIR/vendor"
|
||||
ABRA_APPS_JSON="${ABRA_DIR}/apps.json"
|
||||
|
@ -679,11 +679,6 @@ pwqgen_native() {
|
|||
shuf -n 3 /usr/share/dict/words | tr -dc 'a-zA-Z0-9' | tr -d '\n'
|
||||
}
|
||||
|
||||
# FIXME 3wc: update or remove
|
||||
if [ -z "$ABRA_ENV" ] && [ -f .env ] && type direnv > /dev/null 2>&1 && ! direnv status | grep -q 'Found RC allowed true'; then
|
||||
error "direnv is blocked, run direnv allow"
|
||||
fi
|
||||
|
||||
###### Parse apps.json
|
||||
|
||||
get_recipes() {
|
||||
|
@ -702,7 +697,7 @@ get_recipe_versions() {
|
|||
if [ "$recipe_json" = "null" ]; then
|
||||
declare -a RECIPE_VERSIONS
|
||||
else
|
||||
mapfile -t RECIPE_VERSIONS < <(echo "$recipe_json" | $JQ -r ".versions | keys | .[]" - | sort)
|
||||
mapfile -t RECIPE_VERSIONS < <(echo "$recipe_json" | $JQ -r ".versions | .[] | keys | add")
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -837,7 +832,7 @@ ensure_stack_deployed() {
|
|||
for service in $(docker ps -f "name=$STACK_NAME" -q); do
|
||||
debug "Polling $service for deployment status"
|
||||
|
||||
healthcheck=$(docker inspect --format "{{ json .State }}" "$service" | jq "try(.Health.Status // \"missing\")")
|
||||
healthcheck=$(docker inspect --format "{{ json .State }}" "$service" | $JQ "try(.Health.Status // \"missing\")")
|
||||
name=$(docker inspect --format '{{ index .Config.Labels "com.docker.swarm.service.name" }}' "$service")
|
||||
|
||||
if [[ ${MISSING[*]} =~ ${name} ]] || [[ ${HEALTHY[*]} =~ ${name} ]]; then
|
||||
|
@ -1719,7 +1714,7 @@ sub_app_secret_generate(){
|
|||
warning "These generated secrets are now stored as encrypted data on your server"
|
||||
warning "Please take a moment to make sure you have saved a copy of the passwords"
|
||||
warning "Abra is not able to show the password values in plain text again"
|
||||
warning "See https://docs.cloud.autonomic.zone/secrets/ for more on secrets"
|
||||
warning "See https://docs.coopcloud.tech/secrets/ for more on secrets"
|
||||
msg_already_outputted="true"
|
||||
fi
|
||||
|
||||
|
@ -2655,7 +2650,7 @@ sub_upgrade() {
|
|||
if [[ "$abra___dev" == "true" ]]; then
|
||||
curl https://install.abra.coopcloud.tech | bash -s -- --dev --no-deps
|
||||
else
|
||||
curl https://install.abra.coopcloud.tech | bash --no-deps
|
||||
curl https://install.abra.coopcloud.tech | bash -s -- --no-deps
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ HOME_PATH = expanduser("~/")
|
|||
CLONES_PATH = Path(f"{HOME_PATH}/.abra/apps").absolute()
|
||||
REPOS_TO_SKIP = (
|
||||
"abra",
|
||||
"abra-aur",
|
||||
"abra-apps",
|
||||
"abra-capsul",
|
||||
"abra-gandi",
|
||||
|
@ -21,6 +22,7 @@ REPOS_TO_SKIP = (
|
|||
"apps",
|
||||
"auto-apps-json",
|
||||
"auto-mirror",
|
||||
"aur-abra-git",
|
||||
"backup-bot",
|
||||
"coopcloud.tech",
|
||||
"coturn",
|
||||
|
@ -33,6 +35,7 @@ REPOS_TO_SKIP = (
|
|||
"organising",
|
||||
"pyabra",
|
||||
"radicle-seed-node",
|
||||
"tagcmp",
|
||||
"stack-ssh-deploy",
|
||||
"swarm-cronjob",
|
||||
"tyop",
|
||||
|
@ -63,7 +66,7 @@ def _run_cmd(cmd, shell=False, **kwargs):
|
|||
def get_repos_json():
|
||||
""" Retrieve repo list from Gitea """
|
||||
|
||||
url = "https://git.autonomic.zone/api/v1/orgs/coop-cloud/repos"
|
||||
url = "https://git.coopcloud.tech/api/v1/orgs/coop-cloud/repos"
|
||||
|
||||
log.info(f"Retrieving {url}")
|
||||
|
||||
|
|
|
@ -139,8 +139,13 @@ def get_app_metadata(app_path):
|
|||
return metadata
|
||||
|
||||
|
||||
def get_cached_versions(cached_apps_json, app_name):
|
||||
versions = cached_apps_json[app_name]["versions"]
|
||||
return [list(k)[0] for k in [version.keys() for version in versions]]
|
||||
|
||||
|
||||
def get_app_versions(app_path, cached_apps_json):
|
||||
versions = {}
|
||||
versions = []
|
||||
|
||||
chdir(app_path)
|
||||
|
||||
|
@ -155,7 +160,7 @@ def get_app_versions(app_path, cached_apps_json):
|
|||
app_name = basename(app_path)
|
||||
|
||||
try:
|
||||
existing_tags = cached_apps_json[app_name]["versions"].keys()
|
||||
existing_tags = get_cached_versions(cached_apps_json, app_name)
|
||||
except KeyError:
|
||||
existing_tags = []
|
||||
|
||||
|
@ -171,9 +176,8 @@ def get_app_versions(app_path, cached_apps_json):
|
|||
if service in ("null", "---"):
|
||||
continue
|
||||
|
||||
if (
|
||||
tag in existing_tags
|
||||
and service in cached_apps_json[app_name]["versions"][tag]
|
||||
if tag in existing_tags and service in get_cached_versions(
|
||||
cached_apps_json, app_name
|
||||
):
|
||||
log.info(f"Skipping {tag} because we've already processed it")
|
||||
existing_versions = cached_apps_json[app_name]["versions"][tag][service]
|
||||
|
@ -206,7 +210,7 @@ def get_app_versions(app_path, cached_apps_json):
|
|||
|
||||
parsed_services.append(service)
|
||||
|
||||
versions[tag] = service_versions
|
||||
versions.append({tag: service_versions})
|
||||
|
||||
_run_cmd(f"git checkout {initial_branch}")
|
||||
|
||||
|
@ -220,7 +224,7 @@ def main():
|
|||
skopeo_login()
|
||||
|
||||
repos_json = get_repos_json()
|
||||
clone_all_apps(repos_json)
|
||||
# clone_all_apps(repos_json)
|
||||
|
||||
with open(args.output, "w", encoding="utf-8") as handle:
|
||||
dump(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# shellcheck disable=SC2154,SC2034
|
||||
|
||||
ABRA_VERSION="10.0.0"
|
||||
ABRA_VERSION="10.0.5"
|
||||
GIT_URL="https://git.coopcloud.tech/coop-cloud/abra"
|
||||
ABRA_SRC="$GIT_URL/raw/tag/$ABRA_VERSION/abra"
|
||||
ABRA_DIR="${ABRA_DIR:-$HOME/.abra}"
|
||||
|
@ -161,7 +161,8 @@ function install_requirements {
|
|||
|
||||
sudo apt update && sudo apt install -y \
|
||||
passwdqc \
|
||||
pwgen
|
||||
pwgen \
|
||||
git
|
||||
|
||||
echo "Install Docker (https://docs.docker.com/engine/install/debian/)?"
|
||||
prompt_confirm
|
||||
|
@ -169,7 +170,7 @@ function install_requirements {
|
|||
else
|
||||
echo "Sorry, we only support Debian based distributions at the moment"
|
||||
echo "You'll have to install the requirements manually for your distribution"
|
||||
echo "See https://git.autonomic.zone/coop-cloud/abra#requirements for more"
|
||||
echo "See https://git.coopcloud.tech/coop-cloud/abra#requirements for more"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue