Skip to content

Commit

Permalink
Merge pull request #369 from eclipse-tractusx/chore/notifier_workflow
Browse files Browse the repository at this point in the history
chore: notifier workflow & mail template update
  • Loading branch information
tomaszbarwicki authored Nov 17, 2023
2 parents eae8494 + 682a205 commit fa74441
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/psql-release-notifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@
name: PostgreSQL new release notifier

on:
workflow_dispatch:
schedule:
# Run every day at 01:00 at night
- cron: "0 1 * * *" # UTC time
workflow_dispatch:
inputs:
recipient:
description: "Recipent email"
required: false
schedule:
# Run every day at 01:00 at night
- cron: "0 1 * * *" # UTC time
env:
TRACTUSX_MAILINGLIST: [email protected]
TRACTUSX_MAILINGLIST: ${{ github.event.inputs.recipient != '' && github.event.inputs.recipient || '[email protected]' }}
DEVSECOPS_NOTIFICATION_EMAIL: [email protected]
DEVSECOPS_NOTIFICATION_EMAIL_PASSWORD: ${{ secrets.NOTIFICATION_EMAIL_PASSWORD }}
CURRENT_ALIGNED_PSQL_VER: 15.0.0
Expand Down
2 changes: 1 addition & 1 deletion release-notifier/internal/psql/psqlnotifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func SaveLatestRel(release string) {
func Notify(newRelease string, alignedRelease string) {
var buff bytes.Buffer
mimeHeaders := "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n"
buff.Write([]byte(fmt.Sprintf("Subject: Action Required: PostgreSQL New Release (%s) and Update Process\n%s\n\n", newRelease, mimeHeaders)))
buff.Write([]byte(fmt.Sprintf("Subject: Action Required: PostgreSQL New Release (%s)\n%s\n\n", newRelease, mimeHeaders)))

t, _ := template.ParseFiles(mailTemplate)
t.Execute(&buff, struct {
Expand Down
8 changes: 3 additions & 5 deletions release-notifier/templates/mail-psql.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<p>Dear Tractus-X Community,</p>

<p>
We're excited to inform you that PostgreSQL has released a new version, {{.NewPSQLRelease}}, and we need your attention to ensure our projects remain up-to-date and secure. Please follow the instructions below based on the type of release (read more about <a href="https://semver.org">versioning schema</a>).
We're excited to inform you that PostgreSQL has released a new version, {{.NewPSQLRelease}}, and we need your attention to ensure our projects remain up to date and secure. Please follow the instructions below based on the type of release (read more about <a href="https://semver.org">versioning schema</a>).
</p>

<h2>Current Aligned Version:</h2>
Expand All @@ -37,7 +37,7 @@
<li>Create a <a href="mailto:[email protected]">mailing list</a> discussion thread with a clear title indicating the major PostgreSQL release upgrade.</li>
<li>Summarize the major changes in PostgreSQL v{{.NewPSQLRelease}} and discuss any potential impacts on our projects.</li>
<li>Collaborate with the community to outline a consensus on the upgrade.</li>
<li>Follow the agreed-upon <a href="www">process</a> for implementing the major release upgrade.</li>
<li>Follow the <a href="https://github.com/eclipse-tractusx/sig-release/blob/main/release-notifier/README.md#major-release-upgrade-process-description">process</a> for implementing the major release upgrade.</li>
</ol>

<h2>Minor or Patch Release:</h2>
Expand All @@ -57,14 +57,12 @@
<h2>Resources</h2>
<p>You can find the latest PostgreSQL Helm charts on bitnami official Helm chart repository: <a href="https://bitnami.com/stack/postgresql/helm">Bitnami Helm Chart Repository</a>.</p>

<p>Detailed documentation on how to update Helm chart dependencies can be found here: <a href="[Documentation Link]">Documentation Link</a>.</p>

<h2>Contribution</h2>
<p>
We would like to invite you to contribute to this project and provide your valuable insights. Your feedback and suggestions will be greatly appreciated as we continue to refine and expand the functionality of our release notification tool.
</p>
<p>
To access the repository for this project and explore the code, please visit the following link: [GitHub].
To access the repository for this project and explore the code, please visit the following link: [sig-release/release-notifier](https://github.com/eclipse-tractusx/sig-release/tree/main/release-notifier).
</p>
<p>
Encourage you to visit general Tractus-X <a href="https://eclipse-tractusx.github.io/docs/oss/how-to-contribute">How to Contribute guide</a>.
Expand Down

0 comments on commit fa74441

Please sign in to comment.