Skip to content

Commit

Permalink
[dbt installation] Change name pattern for job dump and replace Slack…
Browse files Browse the repository at this point in the history
… secret (#72)

* Fix dumps name pattern to avoid overwrite
* Change secret for Slack
  • Loading branch information
alexander-smolyakov committed Jan 27, 2023
1 parent ba5ae9a commit 3630725
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-dbt-installation-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
if: ${{ always() }}
id: job-status
run: |
file="test-${{ strategy.job-index }}-tag-${{ matrix.tag }}.json"
file="test-${{ inputs.package_name }}-${{ strategy.job-index }}-tag-${{ matrix.tag }}.json"
# Create file
touch $file
# Write job status to file
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-dbt-installation-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
with:
package_name: ${{ matrix.package }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_CHANNEL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_CORE_ALERTS }}

dbt-installation-pip:
if: >-
Expand All @@ -73,7 +73,7 @@ jobs:
with:
package_name: ${{ matrix.package }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_CHANNEL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_CORE_ALERTS }}

dbt-installation-docker:
if: >-
Expand All @@ -96,7 +96,7 @@ jobs:
with:
package_name: ${{ matrix.package }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_CHANNEL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_CORE_ALERTS }}

dbt-installation-source:
if: >-
Expand All @@ -119,4 +119,4 @@ jobs:
with:
package_name: ${{ matrix.package }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TEST_CHANNEL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_CORE_ALERTS }}
32 changes: 17 additions & 15 deletions .github/workflows/test-dbt-installation-notify-job-statuses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,23 @@ jobs:
core.debug(files_list);
files_list.map(file => {
const buffer = fs.readFileSync(`${artifact_folder}/${file}`);
const jobs_status = buffer.toString().trim().replace(/['"]+/g, '');
switch (jobs_status) {
case JOB_STATUSES_ENUM.success:
jobs_statuses.success.push(file);
break;
case JOB_STATUSES_ENUM.failure:
jobs_statuses.failure.push(file);
break;
case JOB_STATUSES_ENUM.cancelled:
jobs_statuses.cancelled.push(file);
break;
default:
jobs_statuses.undefined.push(file);
if (file.includes(${{ inputs.package_name }})) {
const buffer = fs.readFileSync(`${artifact_folder}/${file}`);
const jobs_status = buffer.toString().trim().replace(/['"]+/g, '');
switch (jobs_status) {
case JOB_STATUSES_ENUM.success:
jobs_statuses.success.push(file);
break;
case JOB_STATUSES_ENUM.failure:
jobs_statuses.failure.push(file);
break;
case JOB_STATUSES_ENUM.cancelled:
jobs_statuses.cancelled.push(file);
break;
default:
jobs_statuses.undefined.push(file);
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-dbt-installation-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
if: ${{ always() }}
id: job-status
run: |
file="test-${{ strategy.job-index }}-python-v${{ matrix.python-version }}.json"
file="test-${{ inputs.package_name }}-${{ strategy.job-index }}-python-v${{ matrix.python-version }}.json"
# Create file
touch $file
# Write job status to file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-dbt-installation-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
if: ${{ always() }}
id: job-status
run: |
file="test-${{ strategy.job-index }}-branch-${{ matrix.branch }}-python-v${{ matrix.python-version }}.json"
file="test-${{ inputs.package_name }}-${{ strategy.job-index }}-branch-${{ matrix.branch }}-python-v${{ matrix.python-version }}.json"
# Create file
touch $file
# Write job status to file
Expand Down

0 comments on commit 3630725

Please sign in to comment.