-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add readme and stk validate action to pipe
- Loading branch information
Showing
19 changed files
with
690 additions
and
167 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,30 @@ | ||
name: Quality Check | ||
on: | ||
workflow_call: | ||
secrets: | ||
git-org-token: | ||
required: true | ||
pull_request: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
static_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install linters | ||
run: | | ||
pip install black | ||
- name: Perform lint | ||
run: | | ||
black . --check |
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,88 @@ | ||
name: STK actions quality-check | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
validate-actions: | ||
name: StackSpot Runtime (v2) | ||
runs-on: ubuntu-latest | ||
env: | ||
LANG: C.UTF-8 | ||
LANGUAGE: C.UTF-8 | ||
LC_ALL: C.UTF-8 | ||
PYTHONIOENCODING: utf-8 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- run: sudo apt update && sudo apt install -y curl unzip git jq | ||
name: install dependencies | ||
|
||
- name: Setup STK CLI | ||
run: | | ||
curl \ | ||
--fail \ | ||
--http2-prior-knowledge \ | ||
--location \ | ||
--output /tmp/stk.deb \ | ||
--silent \ | ||
--show-error \ | ||
--tlsv1.3 \ | ||
https://stk.stackspot.com/installer/linux/stk.deb | ||
sudo dpkg --install /tmp/stk.deb || echo installed | ||
rm --force /tmp/stk.deb | ||
- name: Show STK CLI version | ||
run: $HOME/.stk/bin/stk --version | ||
|
||
- name: Login StackSpot | ||
run: | | ||
$HOME/.stk/bin/stk login -id ${{ secrets.STK_CLIENT_ID }} -key ${{ secrets.STK_CLIENT_SECRET }} -r ${{ secrets.STK_REALM }} | ||
- name: Validate main action | ||
run: | | ||
$HOME/.stk/bin/stk validate action | ||
- name: Validate runtime-cancel-run-action action | ||
run: | | ||
cd runtime-cancel-run-action | ||
$HOME/.stk/bin/stk validate action | ||
- name: Validate runtime-create-manifest-action action | ||
run: | | ||
cd runtime-create-manifest-action | ||
$HOME/.stk/bin/stk validate action | ||
- name: Validate runtime-deploy-action action | ||
run: | | ||
cd runtime-deploy-action | ||
$HOME/.stk/bin/stk validate action | ||
- name: Validate runtime-destroy-action action | ||
run: | | ||
cd runtime-destroy-action | ||
$HOME/.stk/bin/stk validate action | ||
- name: Validate runtime-iac-action action | ||
run: | | ||
cd runtime-iac-action | ||
$HOME/.stk/bin/stk validate action | ||
- name: Validate runtime-manager-action action | ||
run: | | ||
cd runtime-manager-action | ||
$HOME/.stk/bin/stk validate action | ||
- name: Validate runtime-rollback-action action | ||
run: | | ||
cd runtime-rollback-action | ||
$HOME/.stk/bin/stk validate action | ||
- name: Validate runtime-matrix action | ||
run: | | ||
cd runtime-matrix | ||
$HOME/.stk/bin/stk validate action | ||
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 |
---|---|---|
@@ -1,2 +1,43 @@ | ||
# workflow-stackspot-actions-runtime-selfhosted | ||
workflow-stackspot-actions-runtime-selfhosted | ||
# StackSpot actions runtimes repository | ||
|
||
This repository contains various StackSpot Actions that can be used to automate processes in CI/CD pipelines. Additionally, there is a main action that orchestrates the execution of the other actions, simplifying the integration and management of multiple tasks in a single workflow. | ||
|
||
## Repository Structure | ||
|
||
|
||
## Requirements | ||
|
||
Before using the actions in this repository, ensure that you have the following requirements: | ||
|
||
* StackSpot CLI installed and configured. | ||
|
||
## How to Use | ||
|
||
### Deploy | ||
|
||
```bash | ||
stk run action <path-where-u-cloned-the-repository> \ | ||
--workflow_type deploy \ | ||
--environment "<environment>" \ | ||
--version_tag "<version-tag>" \ | ||
--repository_name "<repository-name>" \ | ||
--client_id "<stackspot-client-id>" \ | ||
--client_key "<stackspot-client-key>" \ | ||
--client_realm "<stackspot-client-realm>" \ | ||
--aws_access_key_id "<aws-access-key-id>" \ | ||
--aws_secret_access_key "<aws-secret-access-key>" \ | ||
--aws_session_token "<aws-session-token>" \ | ||
--tf_state_bucket_name "<tf_state_bucket>" \ | ||
--iac_bucket_name "<iac_bucket_name>" \ | ||
--tf_state_region "<aws-region>" \ | ||
--iac_region "<aws-region>" \ | ||
--aws_region "<aws-region>" | ||
``` | ||
|
||
### Cancel | ||
|
||
```bash | ||
stk run action <path-where-u-cloned-the-repository> \ | ||
--workflow_type cancel \ | ||
--run_id "<run_id>" | ||
``` |
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 @@ | ||
# |
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 @@ | ||
# |
Oops, something went wrong.