Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix variable name #225

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/integration/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
20 changes: 13 additions & 7 deletions test/integration/scripts/setup-garm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading