CI: Deprecate Jenkins Sonar jobs
[ci-management.git] / jjb / oran-templates / oran-package-cloud-macros.yaml
1 ---
2 #   Copyright (c) 2020 AT&T Intellectual Property.
3 #
4 #   Licensed under the Apache License, Version 2.0 (the "License");
5 #   you may not use this file except in compliance with the License.
6 #   You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #   Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #   See the License for the specific language governing permissions and
14 #   limitations under the License.
15
16 - builder:
17     # provisions files required by package_cloud ruby gem
18     name: oran-packagecloud-file-provider
19     builders:
20       - config-file-provider:
21           files:
22             - file-id: ".packagecloud"
23               target: "$HOME/.packagecloud"
24       - config-file-provider:
25           files:
26             - file-id: "packagecloud_api"
27               target: "$HOME/packagecloud_api"
28
29 - builder:
30     # Runs shell script to push packages to PackageCloud.
31     # {build-dir} is directory with deb/rpm files to push
32     # {packagecloud-account} is PackageCloud account ID; example: oran
33     # {packagecloud-repo} is PackageCloud repository; example: master, staging
34     # {debian-distribution-versions} is list of DEB package distro/version strings
35     #    separated by space; example: ubuntu/bionic debian/stretch
36     # {rpm-distribution-versions} is list of RPM package distro/version strings
37     #    separated by space; example: el/4 el/5
38     name: oran-packagecloud-push
39     builders:
40       - inject:
41           properties-content: |
42             BUILD_DIR={build-dir}
43             PACKAGECLOUD_ACCOUNT={packagecloud-account}
44             PACKAGECLOUD_REPO={packagecloud-repo}
45             DEBIAN_DISTRIBUTION_VERSIONS={debian-distribution-versions}
46             RPM_DISTRIBUTION_VERSIONS={rpm-distribution-versions}
47       - shell: !include-raw-escape: ../shell/packagecloud-push.sh