Skip to content

Commit 75839b1

Browse files
committed
#121: Fixed Github release (#122)
1 parent e567e13 commit 75839b1

13 files changed

+101
-43
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
- name: Build Artifacts
2323
run: poetry build
2424

25-
- name: PyPi Release
26-
env:
27-
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__"
28-
POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}"
29-
run: poetry publish
25+
# - name: PyPi Release
26+
# env:
27+
# POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__"
28+
# POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}"
29+
# run: poetry publish

.github/workflows/slc_cd.yml

Lines changed: 37 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/slc_ci_build_slc.yml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/slc_ci_check_for_build.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/slc_ci_prepare_test_container.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/slc_ci_test_slc.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/changes/changes_2.0.0.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,3 @@ Besides, it updates dependencies and fixes some bugs.
2424
- #111: Create new templates for Github Workflows - tests
2525
- #114: Addeed command for deploying cd workflows
2626
- #116: Added CD workflows
27-
28-
## Bugs
29-
30-
- #119: Fixed Github release

doc/changes/unreleased.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Unreleased
22

3+
This hotfix fixes the Github release workflows and avoids leakage of passwords in log artifacts.
4+
35
## Refactorings
46

57
- #125: Updated exaslct and added check for password leak
68
- #127: Reformatted code with latest PTB
9+
10+
This hotfix fixes the Github release workflows.
11+
12+
13+
## Bugs
14+
15+
- #119: Fixed Github release
16+
- #121: Fixed Github release

exasol/slc_ci_setup/templates/slc_cd.yml.tmpl

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
push:
77
tags:
88
- '**'
9+
10+
env:
11+
RELEASE_NAME: "SLC-${{ github.ref_name }}"
12+
913
jobs:
1014
prepare-test-container:
1115
uses: ./.github/workflows/slc_ci_prepare_test_container.yml
@@ -41,25 +45,47 @@ jobs:
4145
name: Create Github release
4246
runs-on: ubuntu-24.04
4347
steps:
44-
- name: Download SLCs
45-
id: download-slcs
46-
uses: actions/download-artifact@v4
47-
with:
48-
pattern: slc-*-release
49-
path: "slc"
50-
merge-multiple: true
48+
- name: SCM Checkout
49+
uses: actions/checkout@v4
5150

5251
- name: Download Logs
5352
id: download-logs
5453
uses: actions/download-artifact@v4
5554
with:
56-
pattern: logs-*
57-
merge-multiple: true
55+
pattern: logs_*
56+
merge-multiple: false
5857
path: "logs"
5958

59+
- name: Zip logs
60+
run: zip -r logs.zip logs
61+
6062
- name: GitHub Release
6163
run: >
62-
gh release create "SLC-${GITHUB_REF_NAME}"
64+
gh release create "$RELEASE_NAME"
6365
--title "SLC ${GITHUB_REF_NAME}"
6466
--notes-file "./doc/changes/changes_${GITHUB_REF_NAME}.md"
65-
slc/* logs/*{% endraw %}
67+
--draft
68+
logs.zip
69+
env:
70+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
72+
upload-release-slc:
73+
needs: [get-flavors, cd]
74+
runs-on: ubuntu-24.04
75+
strategy:
76+
fail-fast: true
77+
matrix:
78+
flavor: ${{fromJson(needs.get-flavors.outputs.matrix)}}
79+
steps:
80+
- name: SCM Checkout
81+
uses: actions/checkout@v4
82+
- name: Download SLC
83+
id: download-slc
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: slc-${{matrix.flavor}}-release
87+
path: "slc"
88+
- name: Upload to release
89+
run: gh release upload "$RELEASE_NAME" slc/*
90+
env:
91+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}{% endraw %}

exasol/slc_ci_setup/templates/slc_ci_build_slc.yml.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
env:
6464
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
6565
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
66-
BRANCH_NAME: ${{github.head_ref || github.ref_name}}
66+
BRANCH_NAME: ${{github.head_ref || github.ref}}
6767
COMMIT_SHA: ${{github.sha}}
6868
FLAVOR: ${{inputs.flavor}}
6969

@@ -74,11 +74,11 @@ jobs:
7474
if: ${{ always() }}
7575
name: Upload log artifacts
7676
with:
77-
name: logs_${{inputs.flavor}}
77+
name: logs_build_${{inputs.flavor}}
7878
path: |
7979
.build_output/jobs/**/*
8080
.build_output/security_scan/**/*
81-
.build_output/metadata/**/*
81+
.build_output/meta_data/**/*
8282
retention-days: 30
8383

8484
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)