-
Notifications
You must be signed in to change notification settings - Fork 25
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
rmoff
committed
Sep 11, 2024
1 parent
5b48cc4
commit 5a39d00
Showing
4 changed files
with
134 additions
and
0 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,48 @@ | ||
name: Decodable CLI Setup and Apply | ||
|
||
on: | ||
# push: | ||
# branches: | ||
# - main | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
setup-and-apply: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download and unpack the Decodable CLI | ||
run: | | ||
curl -L https://releases.decodable.co/decodable-cli/linux/amd64/decodable-cli-linux-amd64-1.20.0.tar.gz -o /tmp/decodable-cli.tar.gz && \ | ||
tar -xzf /tmp/decodable-cli.tar.gz -C /tmp && \ | ||
sudo mv /tmp/decodable-cli-linux-amd64-1.20.0/bin/decodable /usr/local/bin && \ | ||
rm -r /tmp/decodable-cli.tar.gz /tmp/decodable-cli-linux-amd64-1.20.0 | ||
- name: Create Decodable CLI auth file | ||
run: | | ||
mkdir -p ~/.decodable | ||
cat <<EOF > ~/.decodable/auth | ||
version: 1.0.0 | ||
tokens: | ||
default: | ||
refresh_token: ${{ secrets.DECODABLE_REFRESH_TOKEN }} | ||
EOF | ||
- name: Create Decodable CLI config file | ||
run: | | ||
mkdir -p ~/.decodable | ||
cat <<EOF > ~/.decodable/config | ||
version: 1.0.0 | ||
active-profile: default | ||
profiles: | ||
default: | ||
account: ${{ vars.DECODABLE_ACCOUNT_NAME }} | ||
EOF | ||
- name: Apply all Decodable resources | ||
run: decodable apply decodable-cicd/*/*.yaml |
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,25 @@ | ||
--- | ||
kind: connection | ||
metadata: | ||
name: datagen-01 | ||
description: "" | ||
spec_version: v2 | ||
spec: | ||
connector: datagen | ||
type: source | ||
stream_name: envoy | ||
schema_v2: | ||
fields: | ||
- kind: physical | ||
name: message | ||
type: STRING | ||
constraints: {} | ||
properties: | ||
delay: "5000" | ||
format: json | ||
data.type: envoy | ||
execution: | ||
active: true | ||
task_count: 1 | ||
task_size: M | ||
|
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,48 @@ | ||
name: Decodable CLI Setup and Apply | ||
|
||
on: | ||
# push: | ||
# branches: | ||
# - main | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
setup-and-apply: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download and unpack the Decodable CLI | ||
run: | | ||
curl -L https://releases.decodable.co/decodable-cli/linux/amd64/decodable-cli-linux-amd64-1.20.0.tar.gz -o /tmp/decodable-cli.tar.gz && \ | ||
tar -xzf /tmp/decodable-cli.tar.gz -C /tmp && \ | ||
sudo mv /tmp/decodable-cli-linux-amd64-1.20.0/bin/decodable /usr/local/bin && \ | ||
rm -r /tmp/decodable-cli.tar.gz /tmp/decodable-cli-linux-amd64-1.20.0 | ||
- name: Create Decodable CLI auth file | ||
run: | | ||
mkdir -p ~/.decodable | ||
cat <<EOF > ~/.decodable/auth | ||
version: 1.0.0 | ||
tokens: | ||
default: | ||
refresh_token: ${{ secrets.DECODABLE_REFRESH_TOKEN }} | ||
EOF | ||
- name: Create Decodable CLI config file | ||
run: | | ||
mkdir -p ~/.decodable | ||
cat <<EOF > ~/.decodable/config | ||
version: 1.0.0 | ||
active-profile: default | ||
profiles: | ||
default: | ||
account: ${{ vars.DECODABLE_ACCOUNT_NAME }} | ||
EOF | ||
- name: Apply all Decodable resources | ||
run: decodable apply decodable-cicd/*/*.yaml |
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,13 @@ | ||
--- | ||
kind: pipeline | ||
metadata: | ||
name: count-messages | ||
description: "" | ||
spec_version: v2 | ||
spec: | ||
type: SQL | ||
sql: INSERT INTO msg_count SELECT COUNT(*) AS ct FROM envoy | ||
execution: | ||
active: false | ||
task_count: 1 | ||
task_size: M |