-
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.
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/806 Co-authored-by: David Boreham <[email protected]> Co-committed-by: David Boreham <[email protected]>
- Loading branch information
Showing
12 changed files
with
339 additions
and
47 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: External Stack Test | ||
|
||
on: | ||
push: | ||
branches: '*' | ||
paths: | ||
- '!**' | ||
- '.gitea/workflows/triggers/test-external-stack' | ||
- '.gitea/workflows/test-external-stack.yml' | ||
- 'tests/external-stack/run-test.sh' | ||
schedule: # Note: coordinate with other tests to not overload runners at the same time of day | ||
- cron: '8 19 * * *' | ||
|
||
jobs: | ||
test: | ||
name: "Run external stack test suite" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Clone project repository" | ||
uses: actions/checkout@v3 | ||
# At present the stock setup-python action fails on Linux/aarch64 | ||
# Conditional steps below workaroud this by using deadsnakes for that case only | ||
- name: "Install Python for ARM on Linux" | ||
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} | ||
uses: deadsnakes/[email protected] | ||
with: | ||
python-version: '3.8' | ||
- name: "Install Python cases other than ARM on Linux" | ||
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: "Print Python version" | ||
run: python3 --version | ||
- name: "Install shiv" | ||
run: pip install shiv | ||
- name: "Generate build version file" | ||
run: ./scripts/create_build_tag_file.sh | ||
- name: "Build local shiv package" | ||
run: ./scripts/build_shiv_package.sh | ||
- name: "Run external stack tests" | ||
run: ./tests/external-stack/run-test.sh | ||
- name: Notify Vulcanize Slack on CI failure | ||
if: ${{ always() && github.ref_name == 'main' }} | ||
uses: ravsamhq/notify-slack-action@v2 | ||
with: | ||
status: ${{ job.status }} | ||
notify_when: 'failure' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.VULCANIZE_SLACK_CI_ALERTS }} | ||
- name: Notify DeepStack Slack on CI failure | ||
if: ${{ always() && github.ref_name == 'main' }} | ||
uses: ravsamhq/notify-slack-action@v2 | ||
with: | ||
status: ${{ job.status }} | ||
notify_when: 'failure' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.DEEPSTACK_SLACK_CI_ALERTS }} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Change this file to trigger running the external-stack CI job |
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright © 2022, 2023 Vulcanize | ||
|
||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
|
||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http:#www.gnu.org/licenses/>. | ||
|
||
# env vars: | ||
# CERC_REPO_BASE_DIR defaults to ~/cerc | ||
|
||
|
||
import click | ||
import os | ||
|
||
from decouple import config | ||
from git import exc | ||
|
||
from stack_orchestrator.opts import opts | ||
from stack_orchestrator.repos.setup_repositories import process_repo | ||
from stack_orchestrator.util import error_exit | ||
|
||
|
||
@click.command() | ||
@click.argument('stack-locator') | ||
@click.option('--git-ssh', is_flag=True, default=False) | ||
@click.option('--check-only', is_flag=True, default=False) | ||
@click.option('--pull', is_flag=True, default=False) | ||
@click.pass_context | ||
def command(ctx, stack_locator, git_ssh, check_only, pull): | ||
'''optionally resolve then git clone a repository containing one or more stack definitions''' | ||
dev_root_path = os.path.expanduser(config("CERC_REPO_BASE_DIR", default="~/cerc")) | ||
if not opts.o.quiet: | ||
print(f"Dev Root is: {dev_root_path}") | ||
try: | ||
process_repo(pull, check_only, git_ssh, dev_root_path, None, stack_locator) | ||
except exc.GitCommandError as error: | ||
error_exit(f"\n******* git command returned error exit status:\n{error}") |
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
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
Oops, something went wrong.