From 66b741f036725da73738899dcf631d61a362a6a0 Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Tue, 23 Jan 2024 12:42:48 -0600 Subject: [PATCH] fix vars --- .github/workflows/nightly-release.yml | 13 ------------- .github/workflows/release.yml | 26 +++++++++++++++++++------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index aefc7ff5eba..c6b5dafaca4 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -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 }} @@ -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: | @@ -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 }} @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 254e92aa0a9..656dbbea70f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: | @@ -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: @@ -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 @@ -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 }} @@ -138,7 +150,7 @@ 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 @@ -146,9 +158,9 @@ jobs: 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 }}