diff --git a/.github/workflows/hybrid_branch_deployments.yml b/.github/workflows/hybrid_branch_deployments.yml deleted file mode 100644 index 39ba3db6..00000000 --- a/.github/workflows/hybrid_branch_deployments.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Hybrid Branch Deployments -on: - pull_request: - types: [opened, synchronize, reopened, closed] -env: - DAGSTER_CLOUD_URL: "https://action-demo-hybrid.dogfood.dagster.cloud" - -jobs: - parse_workspace: - runs-on: ubuntu-latest - outputs: - build_info: ${{ steps.parse-workspace.outputs.build_info }} - secrets_set: ${{ steps.parse-workspace.outputs.secrets_set }} - steps: - - uses: actions/checkout@v4 - - name: Parse cloud workspace - id: parse-workspace - uses: ./actions/utils/parse_workspace - with: - dagster_cloud_file: sample-repo/dagster_cloud.yaml - - dagster_cloud_build_push: - runs-on: ubuntu-latest - needs: parse_workspace - name: Dagster Hybrid Branch Deployments - strategy: - fail-fast: false - matrix: - location: ${{ fromJSON(needs.parse_workspace.outputs.build_info) }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.sha }} - - - 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 - uses: aws-actions/amazon-ecr-login@v1 - - - name: Build and deploy to Dagster Cloud hybrid - uses: ./actions/hybrid_branch_deploy - with: - dagster_cloud_api_token: ${{ secrets.DAGSTER_CLOUD_HYBRID_API_TOKEN }} - location: ${{ toJson(matrix.location) }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/hybrid_deploy.yml b/.github/workflows/hybrid_deploy.yml deleted file mode 100644 index c2d9eada..00000000 --- a/.github/workflows/hybrid_deploy.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Hybrid Prod Deploy -on: - push: - branches: - - "main" -env: - DAGSTER_CLOUD_URL: "https://action-demo-hybrid.dogfood.dagster.cloud" - DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_HYBRID_API_TOKEN }} - -jobs: - parse_workspace: - runs-on: ubuntu-latest - outputs: - build_info: ${{ steps.parse-workspace.outputs.build_info }} - steps: - - uses: actions/checkout@v4 - - name: Parse cloud workspace - id: parse-workspace - uses: ./actions/utils/parse_workspace - with: - dagster_cloud_file: sample-repo/dagster_cloud.yaml - - dagster_cloud_build_push: - runs-on: ubuntu-latest - needs: parse_workspace - name: Dagster Hybrid Deploy - strategy: - fail-fast: false - matrix: - location: ${{ fromJSON(needs.parse_workspace.outputs.build_info) }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - - 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 - uses: aws-actions/amazon-ecr-login@v1 - - - name: Build and deploy to Dagster Cloud hybrid - uses: ./actions/hybrid_prod_deploy - with: - dagster_cloud_api_token: ${{ secrets.DAGSTER_CLOUD_HYBRID_API_TOKEN }} - location: ${{ toJson(matrix.location) }} - env_vars: ${{ toJson(secrets) }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pex_cli_tests.yml b/.github/workflows/pex_cli_tests.yml new file mode 100644 index 00000000..1da1d0a1 --- /dev/null +++ b/.github/workflows/pex_cli_tests.yml @@ -0,0 +1,24 @@ +name: Tests PEX CLI and action utils +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + test_pex_cli_on_ubuntu: + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04] + max-parallel: 2 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: Print dg version + uses: ./actions/utils/dg-cli + with: + command: "--version" + + - name: Print dagster-cloud version + uses: ./actions/utils/dagster-cloud-cli + with: + command: "--version" diff --git a/.github/workflows/serverless_branch_custom_base_image.yml b/.github/workflows/serverless_branch_custom_base_image.yml deleted file mode 100644 index 678e5314..00000000 --- a/.github/workflows/serverless_branch_custom_base_image.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Serverless Branch Deployments -on: - pull_request: - types: [opened, synchronize, reopened, closed] -env: - DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_URL }} - -jobs: - parse_workspace: - runs-on: ubuntu-latest - outputs: - build_info: ${{ steps.parse-workspace.outputs.build_info }} - secrets_set: ${{ steps.parse-workspace.outputs.secrets_set }} - steps: - - uses: actions/checkout@v4 - - name: Parse cloud workspace - id: parse-workspace - uses: ./actions/utils/parse_workspace - with: - dagster_cloud_file: sample-repo/dagster_cloud.yaml - - dagster_cloud_build_push: - runs-on: ubuntu-latest - needs: parse_workspace - name: Dagster Serverless Branch Deployments - strategy: - fail-fast: false - matrix: - location: ${{ fromJSON(needs.parse_workspace.outputs.build_info) }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.sha }} - - name: Build and deploy to Dagster Cloud serverless - uses: ./actions/serverless_branch_deploy - with: - dagster_cloud_api_token: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_API_TOKEN }} - location: ${{ toJson(matrix.location) }} - env_vars: ${{ toJson(secrets) }} - base_image: "ghcr.io/dagster-io/dagster-cloud-action:test_custom_base_image" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/serverless_branch_deployments.yml b/.github/workflows/serverless_branch_deployments.yml deleted file mode 100644 index ef4531a5..00000000 --- a/.github/workflows/serverless_branch_deployments.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Serverless Branch Deployments -on: - pull_request: - types: [opened, synchronize, reopened, closed] -env: - DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_URL }} - -jobs: - parse_workspace: - runs-on: ubuntu-latest - outputs: - build_info: ${{ steps.parse-workspace.outputs.build_info }} - secrets_set: ${{ steps.parse-workspace.outputs.secrets_set }} - steps: - - uses: actions/checkout@v4 - - name: Parse cloud workspace - id: parse-workspace - uses: ./actions/utils/parse_workspace - with: - dagster_cloud_file: sample-repo/dagster_cloud.yaml - - dagster_cloud_build_push: - runs-on: ubuntu-latest - needs: parse_workspace - name: Dagster Serverless Branch Deployments - strategy: - fail-fast: false - matrix: - location: ${{ fromJSON(needs.parse_workspace.outputs.build_info) }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.sha }} - - name: Build and deploy to Dagster Cloud serverless - uses: ./actions/serverless_branch_deploy - with: - dagster_cloud_api_token: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_API_TOKEN }} - location: ${{ toJson(matrix.location) }} - env_vars: ${{ toJson(secrets) }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/serverless_custom_image.yml b/.github/workflows/serverless_custom_image.yml deleted file mode 100644 index 8d2a9bd5..00000000 --- a/.github/workflows/serverless_custom_image.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Serverless Prod Deploy -on: - push: - branches: - - "main" -env: - DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_URL }} - DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_API_TOKEN }} - -jobs: - parse_workspace: - runs-on: ubuntu-latest - outputs: - build_info: ${{ steps.parse-workspace.outputs.build_info }} - steps: - - uses: actions/checkout@v4 - - name: Parse cloud workspace - id: parse-workspace - uses: ./actions/utils/parse_workspace - with: - dagster_cloud_file: sample-repo/dagster_cloud.yaml - - dagster_cloud_build_push: - runs-on: ubuntu-latest - needs: parse_workspace - name: Dagster Serverless Deploy - strategy: - fail-fast: false - matrix: - location: ${{ fromJSON(needs.parse_workspace.outputs.build_info) }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - name: Build and deploy to Dagster Cloud serverless - uses: ./actions/serverless_prod_deploy - with: - dagster_cloud_api_token: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_API_TOKEN }} - location: ${{ toJson(matrix.location) }} - env_vars: ${{ toJson(secrets) }} - base_image: "ghcr.io/dagster-io/dagster-cloud-action:test_custom_base_image" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/serverless_deploy.yml b/.github/workflows/serverless_deploy.yml deleted file mode 100644 index ff9273e0..00000000 --- a/.github/workflows/serverless_deploy.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Serverless Prod Deploy -on: - push: - branches: - - "main" -env: - DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_URL }} - DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_API_TOKEN }} - -jobs: - parse_workspace: - runs-on: ubuntu-latest - outputs: - build_info: ${{ steps.parse-workspace.outputs.build_info }} - steps: - - uses: actions/checkout@v4 - - name: Parse cloud workspace - id: parse-workspace - uses: ./actions/utils/parse_workspace - with: - dagster_cloud_file: sample-repo/dagster_cloud.yaml - - dagster_cloud_build_push: - runs-on: ubuntu-latest - needs: parse_workspace - name: Dagster Serverless Deploy - strategy: - fail-fast: false - matrix: - location: ${{ fromJSON(needs.parse_workspace.outputs.build_info) }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - name: Build and deploy to Dagster Cloud serverless - uses: ./actions/serverless_prod_deploy - with: - dagster_cloud_api_token: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_API_TOKEN }} - location: ${{ toJson(matrix.location) }} - env_vars: ${{ toJson(secrets) }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/serverless_launch_job_definitions.yml b/.github/workflows/serverless_launch_job_definitions.yml deleted file mode 100644 index 7de7b84b..00000000 --- a/.github/workflows/serverless_launch_job_definitions.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Serverless Job Launch (Definitions) -on: - pull_request: - types: [opened, synchronize, reopened, closed] -env: - DAGSTER_CLOUD_URL: "https://dagster-cloud-action-github-workflow-serverless.dagster.cloud" - -jobs: - dagster_cloud_launch: - runs-on: ubuntu-latest - name: Dagster Serverless Job Launch - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.sha }} - - name: Launch a job on Dagster Cloud serverless - uses: ./actions/utils/run - with: - location_name: from_gh_action - job_name: simple_job - env: - DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_SERVERLESS_API_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 24ed1659..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Tests -on: - push: - -jobs: - test: - runs-on: ubuntu-latest - name: PyTest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: PyTest - run: pytest diff --git a/actions/utils/dg-cli/action.yml b/actions/utils/dg-cli/action.yml new file mode 100644 index 00000000..86633074 --- /dev/null +++ b/actions/utils/dg-cli/action.yml @@ -0,0 +1,13 @@ +name: "dg " +description: "Run a dg cli command" +inputs: + command: + required: true + description: "The dg cli command to run" + +runs: + using: "composite" + steps: + - id: dg-cli + run: $GITHUB_ACTION_PATH/../../../generated/gha/dagster-cloud.pex -m dagster_dg.cli:main ${{ inputs.command }} + shell: bash diff --git a/generated/gha/dagster-cloud.pex b/generated/gha/dagster-cloud.pex index 9e606d5d..cef756f4 100755 Binary files a/generated/gha/dagster-cloud.pex and b/generated/gha/dagster-cloud.pex differ