Skip to content

Commit

Permalink
ci: now using KALISIO_GITHUB_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Jun 7, 2024
1 parent fb19873 commit 2453b0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
run: bash ./scripts/setup_workspace.sh
- name: Run tests
env:
Expand All @@ -40,7 +40,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
run: bash ./scripts/setup_workspace.sh -n ${{ matrix.node }}
- name: Run tests
env:
Expand All @@ -60,7 +60,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
run: bash ./scripts/setup_workspace.sh
- name: Build app
env:
Expand All @@ -80,7 +80,7 @@ jobs:
run: bash ./scripts/init_runner.sh ${{ github.job }}
- name: Setup workspace
env:
GITHUB_DEVELOPMENT_TOKEN: ${{ secrets.GH_DEVELOPMENT_TOKEN }}
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
run: bash ./scripts/setup_workspace.sh
- name: Build docs
env:
Expand Down
11 changes: 4 additions & 7 deletions scripts/setup_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -euo pipefail
THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}")
THIS_DIR=$(dirname "$THIS_FILE")
ROOT_DIR=$(dirname "$THIS_DIR")
WORKSPACE_DIR="$(dirname "$ROOT_DIR")"

. "$THIS_DIR/kash/kash.sh"

Expand All @@ -13,10 +14,7 @@ ROOT_DIR=$(dirname "$THIS_DIR")

begin_group "Setting up workspace ..."

if [ "$CI" = true ]; then
WORKSPACE_DIR="$(dirname "$ROOT_DIR")"
DEVELOPMENT_REPO_URL="https://$GITHUB_DEVELOPMENT_TOKEN@github.com/kalisio/development.git"
else
if [ "$CI" != true ]; then
while getopts "b:t" option; do
case $option in
b) # defines branch
Expand All @@ -30,12 +28,11 @@ else

shift $((OPTIND-1))
WORKSPACE_DIR="$1"
DEVELOPMENT_REPO_URL="$GITHUB_URL/kalisio/development.git"

# Clone project in the workspace
git_shallow_clone "$GITHUB_URL/kalisio/krawler.git" "$WORKSPACE_DIR/krawler" "${WORKSPACE_TAG:-${WORKSPACE_BRANCH:-}}"
git_shallow_clone "$KALISIO_GITHUB_URL/kalisio/krawler.git" "$WORKSPACE_DIR/krawler" "${WORKSPACE_TAG:-${WORKSPACE_BRANCH:-}}"
fi

setup_lib_workspace "$WORKSPACE_DIR" "$DEVELOPMENT_REPO_URL"
setup_lib_workspace "$WORKSPACE_DIR" "$KALISIO_GITHUB_URL/kalisio/development.git"

end_group "Setting up workspace ..."

0 comments on commit 2453b0b

Please sign in to comment.