refactor: remover todas as dependências do GitLab no workshop

- Aula 08: nginx-ingress TCP passthrough gitlab→gitea, comments
- Aula 09: add-client.sh API GitLab→Gitea
- Aula 11: node-bugado deployment image registry.kube.quest→gitea.kube.quest
- Aula 12: setup.sh/cleanup.sh API GitLab→Gitea, ArgoCD repoURL
- Aula 13: k8s manifests, benchmarks: registry.kube.quest→gitea.kube.quest,
           gitlab-registry→gitea-registry, GITLAB_TOKEN→GITEA_TOKEN
- Aula 14: comments GitLab→Gitea
- README raiz: arquitetura, tabela, DNS
This commit is contained in:
ArgoCD Setup
2026-03-14 02:02:01 -03:00
parent d380cd8585
commit e8c793058c
26 changed files with 217 additions and 187 deletions

View File

@@ -110,28 +110,24 @@ else
fi
# =============================================================================
# REMOVER PROJETO GITLAB (OPCIONAL)
# REMOVER REPOSITÓRIO GITEA (OPCIONAL)
# =============================================================================
if [[ -n "$GITLAB_HOST" && -n "$GITLAB_TOKEN" ]]; then
if [[ -n "$GITEA_HOST" && -n "$GITEA_TOKEN" ]]; then
echo ""
read -p "Remover projeto 'factory/monitoring' do GitLab? [y/N]: " REMOVE_PROJECT
read -p "Remover repositório 'factory/monitoring' do Gitea? [y/N]: " REMOVE_PROJECT
if [[ "$REMOVE_PROJECT" == "y" || "$REMOVE_PROJECT" == "Y" ]]; then
log_info "Removendo projeto do GitLab..."
log_info "Removendo repositório do Gitea..."
# Obter ID do projeto
PROJECT_RESPONSE=$(curl -s --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" \
"https://${GITLAB_HOST}/api/v4/projects/factory%2Fmonitoring")
DELETE_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" --request DELETE \
-H "Authorization: token ${GITEA_TOKEN}" \
"https://${GITEA_HOST}/api/v1/repos/factory/monitoring")
PROJECT_ID=$(echo "$PROJECT_RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
if [[ -n "$PROJECT_ID" ]]; then
curl -s --request DELETE --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" \
"https://${GITLAB_HOST}/api/v4/projects/${PROJECT_ID}"
log_success "Projeto removido do GitLab"
if [[ "$DELETE_RESPONSE" == "204" ]]; then
log_success "Repositório removido do Gitea"
else
log_info "Projeto não encontrado no GitLab"
log_info "Repositório não encontrado no Gitea (HTTP ${DELETE_RESPONSE})"
fi
fi
fi