Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create a service principal to interact with stats-jenkins-io File Share #733

Conversation

lemeurherve
Copy link
Member

This PR creates a service principal to interact with stats-jenkins-io File Share expiring in 3 months.

Ref:

@lemeurherve lemeurherve merged commit 23b9374 into jenkins-infra:main Jun 19, 2024
3 checks passed
@lemeurherve lemeurherve deleted the helpdesk4132-stats-jenkins-io-fs-sp branch June 19, 2024 15:29
lemeurherve added a commit that referenced this pull request Jun 21, 2024
…incipal_writer` end date (#737)

This PR adds an updatecli manifest to track
`infraci_stats_jenkins_io_fileshare_serviceprincipal_writer` end date.

Proposed PR body:

>
![image](https://github.com/jenkins-infra/azure/assets/91831478/ad015472-2440-466d-b565-0a5c57950010)

Test:
<details><summary>updatecli diff --values updatecli/values.yaml --config
updatecli/updatecli.d/stats.jenkins.io.sp.endate.yaml</summary>

```console
+++++++++++
+ PREPARE +
+++++++++++

Loading Pipeline "updatecli/updatecli.d/stats.jenkins.io.sp.endate.yaml"

SCM repository retrieved: 1


++++++++++++++++++
+ AUTO DISCOVERY +
++++++++++++++++++



++++++++++++
+ PIPELINE +
++++++++++++



##################################################################################
# GENERATE NEW END DATE FOR STATS.JENKINS.IO FILE SHARE SERVICE PRINCIPAL WRITER #
##################################################################################


SOURCES
=======

nextExpiry
----------
The shell 🐚 command "/bin/sh /var/folders/ly/77mv7l9968g068w9_fwzwggw0000gp/T/updatecli/bin/bd1b66faf6e39c527f085eea5b269bba76c890efa7550e4ca84317fcabb6e3f1.sh" ran successfully with the following output:
----
2024-09-18T00:00:00Z
----
✔ shell command executed successfully

currentExpiry
-------------
✔ value "\"2023-09-19T23:00:00Z\"" found for key "$.end_dates.infraci_stats_jenkins_io_fileshare_serviceprincipal_writer" in the yaml file "locals.yaml"


CONDITIONS:
===========

checkIfExpirySoonExpired
------------------------
The shell 🐚 command "/bin/sh /var/folders/ly/77mv7l9968g068w9_fwzwggw0000gp/T/updatecli/bin/56202140e385731a2fc616bc17989ad91eed830fd60ba795da3fdd132df9fd37.sh" ran successfully with the following output:
----
time for update
----
✔ shell condition of type "console/output", passing


TARGETS
========

updateNextExpiry
----------------

**Dry Run enabled**

⚠ - change detected:
        * key "$.end_dates.infraci_stats_jenkins_io_fileshare_serviceprincipal_writer" should be updated from "\"2024-09-19T23:00:00Z\"" to "2024-09-18T00:00:00Z", in file "locals.yaml"


ACTIONS
========


Generate new end date for stats.jenkins.io File Share service principal writer - default
----------------------------------------------------------------------------------------

[Dry Run] An action of kind "github/pullrequest" is expected.

=============================

REPORTS:



⚠ Generate new end date for stats.jenkins.io File Share service principal writer:
        Source:
                ✔ [currentExpiry] Get current `end_date` date
                ✔ [nextExpiry] Prepare next `end_date` date within 3 months
        Condition:
                ✔ [checkIfExpirySoonExpired] 
        Target:
                ⚠ [updateNextExpiry] generate new end date 2024-09-18T00:00:00Z for stats.jenkins.io File Share service principal writer on infra.ci.jenkins.io


Run Summary
===========
Pipeline(s) run:
  * Changed:    1
  * Failed:     0
  * Skipped:    0
  * Succeeded:  0
  * Total:      1
 ```
 
 </details>
 
 Follow-up of:
- #734

Ref:
- #733 (comment)
- jenkins-infra/helpdesk#4132 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants