Skip to content

Commit

Permalink
fix vars
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed Jan 23, 2024
1 parent 74f7e84 commit 66b741f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
runs-on: ubuntu-latest

outputs:
commit_sha: ${{ steps.resolve-commit-sha.outputs.release_commit }}
version_number: ${{ steps.nightly-release-version.outputs.number }}
release_branch: ${{ steps.release-branch.outputs.name }}

Expand All @@ -43,12 +42,6 @@ jobs:
with:
ref: ${{ env.RELEASE_BRANCH }}

- name: "Resolve Commit To Release"
id: resolve-commit-sha
run: |
commit_sha=$(git rev-parse HEAD)
echo "release_commit=$commit_sha" >> $GITHUB_OUTPUT
- name: "Get Current Version Number"
id: version-number-sources
run: |
Expand Down Expand Up @@ -88,7 +81,6 @@ jobs:
steps:
- name: "[DEBUG] Log Outputs"
run: |
echo commit_sha : ${{ needs.aggregate-release-data.outputs.commit_sha }}
echo version_number: ${{ needs.aggregate-release-data.outputs.version_number }}
echo release_branch: ${{ needs.aggregate-release-data.outputs.release_branch }}
Expand All @@ -97,13 +89,8 @@ jobs:

uses: ./.github/workflows/release.yml
with:
sha: ${{ needs.aggregate-release-data.outputs.commit_sha }}
target_branch: ${{ needs.aggregate-release-data.outputs.release_branch }}
version_number: ${{ needs.aggregate-release-data.outputs.version_number }}
build_script_path: "scripts/build-dist.sh"
env_setup_script_path: "scripts/env-setup.sh"
s3_bucket_name: "core-team-artifacts"
package_test_command: "dbt --version"
test_run: true
nightly_release: true
secrets: inherit
26 changes: 19 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ jobs:
name: Log Inputs
runs-on: ubuntu-latest
outputs:
starting_sha: ${{ steps.set_path.outputs.changelog_path }}
starting_sha: ${{ steps.set_sha.outputs.changelog_path }}
build_script_path: ${{ steps.set_path.outputs.build_script_path }}
env_setup_script_path: ${{ steps.set_path.outputs.env_setup_script_path }}
s3_bucket_name: ${{ steps.set_path.outputs.s3_bucket_name }}
package_test_command: ${{ steps.set_path.outputs.package_test_command }}
steps:
- name: "[DEBUG] Print Variables"
run: |
Expand All @@ -91,6 +95,14 @@ jobs:
echo AWS S3 bucket name: ${{ env.s3_bucket_name }}
echo Package test command: ${{ env.package_test_command }}
- name: "Set paths"
id: set_path
run: |
echo "build_script_path=${{ env.build_script_path }}" >> $GITHUB_ENV
echo "env_setup_script_path=${{ env.env_setup_script_path }}" >> $GITHUB_ENV
echo "s3_bucket_name=${{ env.s3_bucket_name }}" >> $GITHUB_ENV
echo "package_test_command=${{ env.package_test_command }}" >> $GITHUB_ENV
- name: "Checkout target branch"
uses: actions/checkout@v4
with:
Expand All @@ -101,7 +113,7 @@ jobs:
# The changes always get merged into the head so we can't use a specific commit fo
# releases anyways.
- name: "Capture sha"
id: set_path
id: set_sha
run: |
echo "starting_sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT
Expand All @@ -115,7 +127,7 @@ jobs:
sha: ${{ needs.job-setup.outputs.starting_sha }}
version_number: ${{ inputs.version_number }}
target_branch: ${{ inputs.target_branch }}
env_setup_script_path: ${{ env.env_setup_script_path }}
env_setup_script_path: ${{ needs.job-setup.outputs.env_setup_script_path }}
test_run: ${{ inputs.test_run }}
nightly_release: ${{ inputs.nightly_release }}

Expand All @@ -138,17 +150,17 @@ jobs:
build-test-package:
name: Build, Test, Package
if: ${{ !failure() && !cancelled() }}
needs: [bump-version-generate-changelog]
needs: [job-setup, bump-version-generate-changelog]

uses: dbt-labs/dbt-release/.github/workflows/build.yml@main

with:
sha: ${{ needs.bump-version-generate-changelog.outputs.final_sha }}
version_number: ${{ inputs.version_number }}
changelog_path: ${{ needs.bump-version-generate-changelog.outputs.changelog_path }}
build_script_path: ${{ env.build_script_path }}
s3_bucket_name: ${{ env.s3_bucket_name }}
package_test_command: ${{ env.package_test_command }}
build_script_path: ${{ needs.job-setup.outputs.build_script_path }}
s3_bucket_name: ${{ needs.job-setup.outputs.s3_bucket_name }}
package_test_command: ${{ needs.job-setup.outputs.package_test_command }}
test_run: ${{ inputs.test_run }}
nightly_release: ${{ inputs.nightly_release }}

Expand Down

0 comments on commit 66b741f

Please sign in to comment.