-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
375b448
commit 73fae16
Showing
1 changed file
with
11 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,11 +52,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: build-charm | ||
steps: | ||
# - name: Setup Lxd Juju Controller | ||
# uses: charmed-kubernetes/actions-operator@main | ||
# with: | ||
# juju-channel: 3.1/stable | ||
# provider: lxd | ||
- name: Initialize LXD | ||
run: | | ||
sudo snap refresh lxd --channel=latest/stable | ||
|
@@ -144,7 +139,7 @@ jobs: | |
if [ $(echo "$output" | jq 'length') -eq 0 ] | ||
then | ||
echo "not-started" | ||
echo "not_started" | ||
else | ||
# Parse output with jq to get the status field of the first object | ||
status=$(echo "$output" | jq -r '.[0].status') | ||
|
@@ -156,110 +151,13 @@ jobs: | |
for i in {1..120} | ||
do | ||
echo workflow status: $(get-workflow-status) | ||
sleep 30 | ||
done; kill $(jobs -p) & | ||
# | ||
# deploy-e2e-test-runner: | ||
# runs-on: ubuntu-latest | ||
# needs: build-charm | ||
# steps: | ||
# - name: Setup Lxd Juju Controller | ||
# uses: charmed-kubernetes/actions-operator@main | ||
# with: | ||
# juju-channel: 3.1/stable | ||
# provider: lxd | ||
# | ||
# - name: Create Testing Juju Model | ||
# run: juju add-model testing | ||
# | ||
# - name: Setting Testing Model Constraints | ||
# run: juju set-model-constraints "virt-type=virtual-machine mem=24G cores=6" | ||
# | ||
# - name: Change Testing Model Logging Level | ||
# run: juju model-config logging-config="<root>=INFO;unit=DEBUG" | ||
# | ||
# - name: Set Testing Model Proxy Configuration | ||
# run: | | ||
# juju model-config juju-http-proxy=$http_proxy | ||
# juju model-config juju-https-proxy=$https_proxy | ||
# juju model-config juju-no-proxy=$no_proxy | ||
# | ||
# - name: Download github-runner Charm | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: github-runner_ubuntu-22.04-amd64.charm | ||
# | ||
# - name: Deploy github-runner Charm | ||
# run: | | ||
# cp github-runner_ubuntu-22.04-amd64.charm /home/ubuntu/github-runner_ubuntu-22.04-amd64.charm | ||
# juju deploy /home/ubuntu/github-runner_ubuntu-22.04-amd64.charm \ | ||
# e${{ github.run_id }}n${{ github.run_number }}r \ | ||
# --base [email protected] \ | ||
# --config path=${{ secrets.E2E_TESTING_REPO }} \ | ||
# --config token=${{ secrets.E2E_TESTING_TOKEN }} \ | ||
# --config virtual-machines=1 \ | ||
# --config vm-cpu=4 \ | ||
# --config vm-memory=16GiB | ||
# | ||
# - name: Install GitHub Cli | ||
# run: which gh || sudo apt install gh -y | ||
# | ||
# - name: Dispatch Workflow on Testing Runner | ||
# env: | ||
# GH_TOKEN: ${{ secrets.E2E_TESTING_TOKEN }} | ||
# run: | | ||
# MAIN_SHA=$(gh api \ | ||
# -H "Accept: application/vnd.github+json" \ | ||
# -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
# /repos/${{ secrets.E2E_TESTING_REPO }}/git/ref/heads/main --jq .object.sha) | ||
# | ||
# gh api \ | ||
# --method POST \ | ||
# -H "Accept: application/vnd.github+json" \ | ||
# -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
# /repos/${{ secrets.E2E_TESTING_REPO }}/git/refs \ | ||
# -f ref='refs/heads/e${{ github.run_id }}n${{ github.run_number }}r' \ | ||
# -f sha=$MAIN_SHA | ||
# | ||
# gh workflow run test.yaml \ | ||
# -R ${{ secrets.E2E_TESTING_REPO }} \ | ||
# --ref e${{ github.run_id }}n${{ github.run_number }}r \ | ||
# -f runner=e${{ github.run_id }}n${{ github.run_number }}r | ||
# | ||
# sleep 5 | ||
# | ||
# - name: Watch github-runner | ||
# env: | ||
# GH_TOKEN: ${{ secrets.E2E_TESTING_TOKEN }} | ||
# run: | | ||
# gh run list \ | ||
# -R ${{ secrets.E2E_TESTING_REPO }} \ | ||
# -L 100 \ | ||
# --json headBranch,status,workflowDatabaseId \ | ||
# | jq '.[] | select(.headBranch=="e${{ github.run_id }}n${{ github.run_number }}r")' | ||
# | ||
# get-workflow-status() { | ||
# output=$(gh run list \ | ||
# -R ${{ secrets.E2E_TESTING_REPO }} \ | ||
# -L 100 \ | ||
# --json headBranch,status \ | ||
# | jq '[.[] | select(.headBranch=="e${{ github.run_id }}n${{ github.run_number }}r")]') | ||
# | ||
# if [ $(echo "$output" | jq 'length') -eq 0 ] | ||
# then | ||
# echo "not-started" | ||
# else | ||
# # Parse output with jq to get the status field of the first object | ||
# status=$(echo "$output" | jq -r '.[0].status') | ||
# echo "$status" | ||
# fi | ||
# } | ||
# | ||
# juju debug-log --replay --tail & | ||
# | ||
# for i in {1..120} | ||
# do | ||
# echo workflow status: $(get-workflow-status) | ||
# sleep 30 | ||
# done; kill $(jobs -p) & | ||
sleep 30 | ||
echo workflow status: $(get-workflow-status) | ||
if [[ $status != "not-started" && $status != "queued" && $status != "in_progress" ]]; then | ||
break | ||
fi | ||
done | ||
kill $(jobs -p) | ||
if [[ $status != "not-started" && $status != "queued" && $status != "in_progress" ]]; then | ||
exit 1 | ||
fi |