Add AWS credentials config file 68/63168/11
authorHoua Yang <hyang@contractor.linuxfoundation.org>
Fri, 21 Feb 2020 21:59:59 +0000 (15:59 -0600)
committerHoua Yang <hyang@contractor.linuxfoundation.org>
Thu, 26 Mar 2020 21:20:41 +0000 (16:20 -0500)
Add new jenkins-s3-log-ship config file provider utilizing a conditional
step. This is needed to be able to use new lftools deploy s3 api call to
upload logs to AWS S3.

Issue-Id: RELENG-2749
Signed-off-by: Houa Yang <hyang@contractor.linuxfoundation.org>
Change-Id: I2171c4f5a8a18259feca265b628cb7288a18c54f

jjb/lf-macros.yaml

index 8961184..94847dc 100644 (file)
           files:
             - file-id: "jenkins-log-archives-settings"
               variable: "SETTINGS_FILE"
+      - conditional-step:
+          condition-kind: regex-match
+          regex: "^.*logs-s3.*"
+          label: $S3_BUCKET
+          steps:
+            - config-file-provider:
+                files:
+                  - file-id: "jenkins-s3-log-ship"
+                    target: $HOME/.aws/credentials
       - lf-infra-create-netrc:
           server-id: logs
       - shell: !include-raw: