-
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.
Merge pull request #133 from vincentclaes/updgrade-cdk
upgrade cdk
- Loading branch information
Showing
8 changed files
with
1,450 additions
and
1,203 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
This file was deleted.
Oops, something went wrong.
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,22 +1,33 @@ | ||
name: Build-Test-RunExamples | ||
on: [pull_request] | ||
|
||
env: | ||
IMAGE_TAG: local | ||
name: build-python | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Build-Test-RunExamples: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: ["3.8"] | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
|
||
steps: | ||
- name: Checking out | ||
uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Build Container | ||
run: | | ||
cat .devcontainer/devcontainer.Dockerfile | docker build -t $IMAGE_TAG - | ||
- name: Setup project | ||
run: make setup | ||
|
||
- name: Run Tests and Examples | ||
run: docker run -v $PWD:/workspace/vscode -w /workspace/vscode $IMAGE_TAG make gh-actions | ||
- name: Run test suite | ||
run: make test |
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,25 @@ | ||
from aws_cdk import core | ||
|
||
from datajob.datajob_stack import DataJobStack | ||
from datajob.glue.glue_job import GlueJob | ||
from datajob.stepfunctions.stepfunctions_workflow import StepfunctionsWorkflow | ||
|
||
app = core.App() | ||
|
||
# The datajob_stack is the instance that will result in a cloudformation stack. | ||
# We inject the datajob_stack object through all the resources that we want to add. | ||
with DataJobStack(scope=app, id="data-pipeline-simple") as datajob_stack: | ||
|
||
# We define 2 glue jobs with the relative path to the source code. | ||
task = GlueJob( | ||
datajob_stack=datajob_stack, name="task1", job_path="glue_jobs/task1.py" | ||
) | ||
|
||
for i in range(100, 250): | ||
# We instantiate a step functions workflow and orchestrate the glue jobs. | ||
with StepfunctionsWorkflow( | ||
datajob_stack=datajob_stack, name=f"workflow-{i}" | ||
) as sfn: | ||
task >> ... | ||
|
||
app.synth() |
Oops, something went wrong.