Merge pull request #225 from gabriel-samfira/fix-variables

Fix variable name
This commit is contained in:
Gabriel 2024-02-26 21:06:14 +02:00 committed by GitHub
commit 2ea6bb9490
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 15 deletions

View file

@ -22,9 +22,6 @@ jobs:
- name: Install dependencies
run: sudo apt-get -qq update && sudo apt-get -qq install -y apg coreutils make
- name: Build GARM
run: make build
- name: Set up ngrok
id: ngrok
uses: gabriel-samfira/ngrok-tunnel-action@v1.1
@ -68,7 +65,7 @@ jobs:
if: always()
run: |
sudo systemctl status garm@runner || true
sudo journalctl --no-pager 2>&1 | tee /artifacts-logs/system.log
sudo journalctl --no-pager 2>&1 > /artifacts-logs/system.log
- name: Upload GARM and e2e logs
if: always()
@ -83,9 +80,8 @@ jobs:
set -o pipefail
set -o errexit
sudo systemctl stop garm
go run ./test/integration/gh_cleanup/main.go
sudo systemctl stop garm@runner || true
go run ./test/integration/gh_cleanup/main.go || true
env:
GARM_BASE_URL: ${{ steps.ngrok.outputs.tunnel-url }}
ORG_NAME: gsamfira

View file

@ -47,4 +47,4 @@ oauth2_token = "${GH_TOKEN}"
[[github]]
name = "${CREDENTIALS_NAME}-clone"
description = "GARM GitHub OAuth token - clone"
oauth2_token = "${GH_OAUTH_TOKEN}"
oauth2_token = "${GH_TOKEN}"

View file

@ -4,23 +4,29 @@ set -o errexit
DIR="$(dirname $0)"
BINARIES_DIR="$PWD/bin"
CONTRIB_DIR="$PWD/contrib"
CONFIG_DIR="$PWD/test/integration/config"
CONFIG_DIR_PROV="$PWD/test/integration/provider"
GARM_CONFIG_DIR=${GARM_CONFIG_DIR:-$(mktemp -d)}
PROVIDER_BIN_DIR="$GARM_CONFIG_DIR/providers.d/lxd"
IS_GH_WORKFLOW=${IS_GH_WORKFLOW:-"true"}
export CONFIG_DIR="$PWD/test/integration/config"
export CONFIG_DIR_PROV="$PWD/test/integration/provider"
export GARM_CONFIG_DIR=${GARM_CONFIG_DIR:-$(mktemp -d)}
export PROVIDER_BIN_DIR="$GARM_CONFIG_DIR/providers.d/lxd"
export IS_GH_WORKFLOW=${IS_GH_WORKFLOW:-"true"}
export LXD_PROVIDER_LOCATION=${LXD_PROVIDER_LOCATION:-""}
export RUN_USER=${RUN_USER:-$(whoami)}
export RUN_USER=${RUN_USER:-$USER}
export GARM_PORT=${GARM_PORT:-"9997"}
export GARM_SERVICE_NAME=${GARM_SERVICE_NAME:-"garm"}
export GARM_CONFIG_FILE=${GARM_CONFIG_FILE:-"${GARM_CONFIG_DIR}/config.toml"}
if [ -f "$GITHUB_ENV" ];then
echo "export GARM_CONFIG_DIR=${GARM_CONFIG_DIR}" >> $GITHUB_ENV
echo "export GARM_SERVICE_NAME=${GARM_SERVICE_NAME}" >> $GITHUB_ENV
fi
if [[ ! -f $BINARIES_DIR/garm ]] || [[ ! -f $BINARIES_DIR/garm-cli ]]; then
echo "ERROR: Please build GARM binaries first"
exit 1
fi
if [[ -z $GH_OAUTH_TOKEN ]]; then echo "ERROR: The env variable GH_OAUTH_TOKEN is not set"; exit 1; fi
if [[ -z $GH_TOKEN ]]; then echo "ERROR: The env variable GH_TOKEN is not set"; exit 1; fi
if [[ -z $CREDENTIALS_NAME ]]; then echo "ERROR: The env variable CREDENTIALS_NAME is not set"; exit 1; fi
if [[ -z $GARM_BASE_URL ]]; then echo "ERROR: The env variable GARM_BASE_URL is not set"; exit 1; fi