From fb4690af739f87ee5619b5fd41a6f6a96cc594c5 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Tue, 18 Sep 2018 18:38:14 -0400 Subject: [PATCH] Add a Windows wrapper macro We currently don't support ssh-agents on Windows. Split the wrapper so that we have a Windows specific one. Issue: RELENG-939 Change-Id: I0474206ddc706d8bb5c5c6762237bf227dc6cf82 Signed-off-by: Thanh Ha --- docs/jjb/lf-macros.rst | 25 ++++++++++++++++------ jjb/lf-macros.yaml | 20 +++++++++++++---- .../windows-infra-wrapper-b40af1f40facc3d8.yaml | 9 ++++++++ 3 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 releasenotes/notes/windows-infra-wrapper-b40af1f40facc3d8.yaml diff --git a/docs/jjb/lf-macros.rst b/docs/jjb/lf-macros.rst index ce7ac0d2..9f35594f 100644 --- a/docs/jjb/lf-macros.rst +++ b/docs/jjb/lf-macros.rst @@ -327,20 +327,33 @@ the GHPRB plugin and not manually. Wrappers ======== +lf-infra-wrappers-common +------------------------ + +Provides lf-infra recommended wrappers which should be used in every +job-template. It's meant to be used by more specific wrappers below. + lf-infra-wrappers ----------------- Provides lf-infra recommended wrappers which should be used in every -job-template. +job-template that's run on Linux systems. -This wrapper requires that a managed file called `npmrc` exists in the Jenkins. The main use -case here is to point to a npm proxy, on Nexus for example. -The type of the file should be "Custom file". You can set various npmrc settings in it. -Documentation on npm configuration can be found at https://docs.npmjs.com/files/npmrc. -If you are not using npm then it is fine for the file to be empty. +This wrapper requires that a managed file called `npmrc` exists in the Jenkins. +The main use case here is to point to a npm proxy, on Nexus for example. +The type of the file should be "Custom file". You can set various npmrc +settings in it. Documentation on npm configuration can be found at +https://docs.npmjs.com/files/npmrc. If you are not using npm then it is fine +for the file to be empty. Example npmrc: .. code-block:: bash registry=https://nexus3.onap.org/repository/npm.public/ + +lf-infra-wrappers-windows +------------------------- + +Provides lf-infra recommended wrappers which should be used in every +job-template that's run on Windows systems. diff --git a/jjb/lf-macros.yaml b/jjb/lf-macros.yaml index d59a9644..ac577c8c 100644 --- a/jjb/lf-macros.yaml +++ b/jjb/lf-macros.yaml @@ -554,7 +554,7 @@ ############ - wrapper: - name: lf-infra-wrappers + name: lf-infra-wrappers-common wrappers: - mask-passwords - timeout: @@ -563,14 +563,26 @@ timeout-var: 'BUILD_TIMEOUT' fail: true - timestamps - - ssh-agent-credentials: - users: - - '{jenkins-ssh-credential}' - openstack: single-use: true + +- wrapper: + name: lf-infra-wrappers + wrappers: + - lf-infra-wrappers-common: + build-timeout: '{build-timeout}' - config-file-provider: files: - file-id: npmrc target: '$HOME/.npmrc' - file-id: pipconf target: '$HOME/.config/pip/pip.conf' + - ssh-agent-credentials: + users: + - '{jenkins-ssh-credential}' + +- wrapper: + name: lf-infra-wrappers-windows + wrappers: + - lf-infra-wrappers-common: + build-timeout: '{build-timeout}' diff --git a/releasenotes/notes/windows-infra-wrapper-b40af1f40facc3d8.yaml b/releasenotes/notes/windows-infra-wrapper-b40af1f40facc3d8.yaml new file mode 100644 index 00000000..1f5a388d --- /dev/null +++ b/releasenotes/notes/windows-infra-wrapper-b40af1f40facc3d8.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Add lf-infra-wrappers-windows to handle Windows specific wrapper + configuration. + - | + Refactor lf-infra-wrappers to be for Linux systems and split out the + non-linux specific components into a new lf-infra-wrappers-common. This + change is seamless for current users of lf-infra-wrappers. -- 2.16.6