-
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.
Merge pull request #4 from dagster-io/benpankow/docker-target-stage
Allowed specifying Docker target stage in locations.yaml
- Loading branch information
Showing
11 changed files
with
127 additions
and
16 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: Docker Target Stage Example | ||
on: push | ||
|
||
jobs: | ||
docker-target-stage-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/CD action | ||
# Here, use `uses: dagster-io/dagster-cloud-cicd-action@{version}` | ||
# e.g. `uses: dagster-io/[email protected]` | ||
uses: ./ | ||
with: | ||
location-file: ./example/docker-target-stage/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
Large diffs are not rendered by default.
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
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 @@ | ||
FROM python:3.8-slim AS first-stage | ||
|
||
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 | ||
|
||
FROM python:3.8-slim AS second-stage |
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,6 @@ | ||
# Docker Target Stage Example | ||
|
||
This example specifies a [Docker target stage](https://docs.docker.com/develop/develop-images/multistage-build/) as part of the image build process. | ||
|
||
The GitHub actions workflow for this example can be found at | ||
[`.github/workflows/example-docker-target-stage.yml`](../../.github/workflows/example-docker-target-stage.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,6 @@ | ||
locations: | ||
github_action_demo_target_stage: | ||
build: . | ||
target: first-stage | ||
registry: 764506304434.dkr.ecr.us-west-2.amazonaws.com/github-action-demo-build-target | ||
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] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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