Skip to content

Commit

Permalink
fix(updatecli): correct secrets and short next end date in `end-dates…
Browse files Browse the repository at this point in the history
…` PR body (#743)

This PR adds concerned secrets to the values to fix the PR body message,
and use a short next end date in PR title and commit message.

It also adds the current end date in the PR body.

Ref:
-
#742 (comment)
  • Loading branch information
lemeurherve authored Jun 21, 2024
1 parent 72a465a commit 790b31d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 71 deletions.
15 changes: 12 additions & 3 deletions updatecli/updatecli.d/fs-sp-writer-end-dates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ sources:
command: bash ./updatecli/scripts/dateadd.sh
environments:
- name: PATH
shortNextEndDate:
name: Short next `end_date` date within 3 months
kind: shell
spec:
command: bash ./updatecli/scripts/dateadd.sh | cut -c -10
environments:
- name: PATH

conditions:
checkIfEndDateSoonExpired:
Expand All @@ -42,7 +49,7 @@ conditions:

targets:
updateNextEndDate:
name: generate new end date {{ source "nextEndDate" }} for {{ $val.service }} File Share service principal writer on infra.ci.jenkins.io
name: generate new end date {{ source "shortNextEndDate" }} for {{ $val.service }} File Share service principal writer on infra.ci.jenkins.io
kind: yaml
sourceid: nextEndDate
spec:
Expand All @@ -55,14 +62,16 @@ actions:
kind: github/pullrequest
scmid: default
spec:
title: Generate new end date {{ source "nextEndDate" }} for {{ $val.service }} File Share service principal writer on infra.ci.jenkins.io
title: Generate new end date {{ source "shortNextEndDate" }} for {{ $val.service }} File Share service principal writer on infra.ci.jenkins.io
description: |
This PR updates the end date of {{ $val.service }} File Share service principal writer on infra.ci.jenkins.io.
The current end date is set to {{ $val.end_date }}.
After merging this PR, a new password will be generated.
> [!IMPORTANT]
> You'll have to ensure that `STATS_SERVICE_PRINCIPAL_WRITER_CLIENT_SECRET` is updated with this new password
> You'll have to ensure that `{{ $val.secret }}` is updated with this new password
> in https://github.com/jenkins-infra/charts-secrets/blob/main/config/infra.ci.jenkins.io/jenkins-secrets.yaml.
If you don't, the build of {{ $val.service }} on infra.ci.jenkins.io won't be able to update the website content anymore.
Expand Down
68 changes: 0 additions & 68 deletions updatecli/updatecli.d/stats.jenkins.io.sp.endate.yaml

This file was deleted.

0 comments on commit 790b31d

Please sign in to comment.