-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
6 changed files
with
89 additions
and
4 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,33 @@ | ||
name: Minimal Example | ||
on: push | ||
|
||
jobs: | ||
minimal-example: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
|
||
- name: Login to ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- name: Cache Docker builds | ||
uses: satackey/[email protected] | ||
continue-on-error: true | ||
|
||
- name: Run Dagster Cloud CI action | ||
# Here, use `uses: dagster-io/dagster-cloud-ci-action@{version}` | ||
# e.g. `uses: dagster-io/[email protected]` | ||
uses: ./ | ||
with: | ||
location-file: ./example/minimal/locations.yaml | ||
dagit-url: https://elementl.dogfood.dagster.cloud/dev | ||
api-token: ${{ secrets.DAGSTER_AGENT_TOKEN }} |
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,11 @@ | ||
FROM python:3.8-slim | ||
|
||
ENV DAGSTER_VERSION=0.12.14 | ||
|
||
RUN pip install \ | ||
dagster==${DAGSTER_VERSION} \ | ||
dagster-cloud==${DAGSTER_VERSION} | ||
|
||
WORKDIR /opt/dagster/app | ||
|
||
COPY repo.py /opt/dagster/app |
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,8 @@ | ||
# Minimal Example | ||
|
||
This is a minimal example of a repo set up to use the CI Action. The [`locations.yaml`](./locations.yaml) file | ||
specifies to build the `github_action_demo_minimal` code location using the Dockerfile in the current | ||
directory, using `repo.py` as an entry point. | ||
|
||
The GitHub actions workflow for this example can be found at | ||
[`.github/workflows/example-minimal.yml`](../../.github/workflows/example-minimal.yml). |
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,5 @@ | ||
locations: | ||
github_action_demo_minimal: | ||
build: . | ||
registry: 764506304434.dkr.ecr.us-west-2.amazonaws.com/github-action-demo-minimal | ||
python_file: repo.py |
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,27 @@ | ||
from dagster import RunRequest, pipeline, repository, schedule, sensor, solid | ||
|
||
|
||
@solid() | ||
def foo_solid(_): | ||
pass | ||
|
||
|
||
@solid() | ||
def foo_solid_2(_): | ||
pass | ||
|
||
|
||
@pipeline | ||
def foo_pipeline(): | ||
foo_solid() | ||
foo_solid_2() | ||
|
||
|
||
@pipeline | ||
def other_foo_pipeline(): | ||
foo_solid() | ||
|
||
|
||
@repository | ||
def foo_repo(): | ||
return [foo_pipeline] |