From b036716eb765310c6fa149b6035cb9f7adc09110 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 15 Jan 2026 08:58:27 -0600 Subject: [PATCH] Fix environment variable name in monitoring script Changed GITLAB_TOKEN to GITLAB_ACCESS_TOKEN throughout --- scripts/README.md | 6 +++--- scripts/monitor-deploy.sh | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/README.md b/scripts/README.md index 9d3a7c63..177ae25a 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -24,12 +24,12 @@ Real-time monitoring of GitLab CI/CD pipelines and Kubernetes deployments. 2. **Export token** ```bash - export GITLAB_TOKEN= + export GITLAB_ACCESS_TOKEN= ``` Add to your `~/.zshrc` or `~/.bashrc`: ```bash - export GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx + export GITLAB_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx ``` 3. **Install dependencies** @@ -104,7 +104,7 @@ Refreshing in 5s... (Ctrl+C to stop) ### Troubleshooting -**"GITLAB_TOKEN not set"** +**"GITLAB_ACCESS_TOKEN not set"** - Export your GitLab personal access token **"jq is required"** diff --git a/scripts/monitor-deploy.sh b/scripts/monitor-deploy.sh index 54941d39..56abce52 100755 --- a/scripts/monitor-deploy.sh +++ b/scripts/monitor-deploy.sh @@ -34,17 +34,17 @@ usage() { echo " agent - Monitor towerops-agent" echo "" echo "Environment variables:" - echo " GITLAB_TOKEN - Required for API access" - echo " Get from: https://gitlab.com/-/profile/personal_access_tokens" - echo " Scopes needed: read_api" + echo " GITLAB_ACCESS_TOKEN - Required for API access" + echo " Get from: https://gitlab.com/-/profile/personal_access_tokens" + echo " Scopes needed: read_api" exit 1 } check_dependencies() { - if [ -z "$GITLAB_TOKEN" ]; then - echo -e "${RED}Error: GITLAB_TOKEN environment variable not set${NC}" + if [ -z "$GITLAB_ACCESS_TOKEN" ]; then + echo -e "${RED}Error: GITLAB_ACCESS_TOKEN environment variable not set${NC}" echo "Get a token from: https://gitlab.com/-/profile/personal_access_tokens" - echo "Then export GITLAB_TOKEN=" + echo "Then export GITLAB_ACCESS_TOKEN=" exit 1 fi @@ -98,7 +98,7 @@ get_project_info() { gitlab_api() { local endpoint=$1 - curl -s -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ + curl -s -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" \ "https://gitlab.com/api/v4${endpoint}" }