blob: 53b6869fe8054d58a3002ab1e47a996edec97ee5 [file] [log] [blame]
efiacor786a07b2020-02-27 20:22:06 +00001---
2- job-group:
3 # This job group contains all the jobs that should be deployed for
4 # a subproject of dcaegen2/services that builds a Docker image from
5 # Python code.
6 #
7 # Required parameters:
8 # build-node: The node to run build on.
9 # mvn-settings: Maven settings.xml file containing credentials to use.
10 # project-name: The job name prefix
11 # src-dir: The subdirectory of the repository containing subproject code
12 # stream: The stream to build
13 # branch: The branch to build
14 #
15 # Note: Multiple subprojects can be built with a single JJB project
16 # by specifying the value of project-name as a list.
17 # Similarly, multiple streams can be built with a single JJB project
18 # by specifying the value of the stream as a list.
19 # For example:
20 # project-name:
21 # - subproject-name1:
22 # src-dir: subproject-dir1
23 # docker-name: onap/org.onap.dcaegen2.services.something.name1
24 # - subproject-name2:
25 # src-dir: subproject-dir2
26 # docker-name: onap/org.onap.dcaegen2.services.something.name2
27 # - subproject-name3:
28 # src-dir: subproject-dir3
29 # docker-name: onap/org.onap.dcaegen2.services.something.name3
30 # stream:
31 # - master:
32 # branch: master
33 # - release1:
34 # branch: release1.0
35 # jobs:
36 # - dcaegen2-docker-python-jobs
37
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070038 name: "{project-name}-docker-python-jobs"
efiacor786a07b2020-02-27 20:22:06 +000039 container-tag-method: latest
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070040 docker-get-container-tag-script: "../../shell/docker-ts-tag-override.sh"
41 nexus-iq-namespace: "onap-"
42 tox-dir: "{src-dir}"
43 tox-envs: "py3"
efiacor786a07b2020-02-27 20:22:06 +000044 sonarcloud: true
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070045 sonarcloud-project-organization: "{sonarcloud_project_organization}"
46 sonarcloud-project-key: "{sonarcloud_project_organization}_{project-name}"
efiacor786a07b2020-02-27 20:22:06 +000047 python-version: python3
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070048 wss-product-name: "{project-name}"
49 docker-root: "{src-dir}"
efiacor786a07b2020-02-27 20:22:06 +000050 gerrit_trigger_file_paths:
51 - compare-type: REG_EXP
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070052 pattern: "{src-dir}/.*"
efiacor786a07b2020-02-27 20:22:06 +000053 jobs:
vv770dc540be92022-08-02 17:13:42 +000054 - gerrit-tox-verify:
55 pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
56 stream: all
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070057 branch: "*"
efiacor786a07b2020-02-27 20:22:06 +000058 - gerrit-docker-verify
efiacor80fc2e22020-03-26 09:44:32 +000059 - gerrit-docker-merge:
60 post_docker_build_script: |
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070061 #!/bin/bash
62 set -uex -o pipefail
63 DOCKER_IMAGE_TAG2=${{DOCKER_IMAGE_TAG%-*}}
64 DNAME={container-snapshot-registry}/{docker-name}
65 docker tag $DNAME:$DOCKER_IMAGE_TAG $DNAME:$DOCKER_IMAGE_TAG2
66 docker tag $DNAME:$DOCKER_IMAGE_TAG $DNAME:latest
67 docker push $DNAME:$DOCKER_IMAGE_TAG2
68 docker push $DNAME:latest
efiacor2f6ada12021-05-17 15:06:52 +010069 stream: master
70 branch: master
efiacor786a07b2020-02-27 20:22:06 +000071 - gerrit-tox-sonar:
72 # workaround because gerrit-tox-sonar doesn't support mvn-params/opts
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070073 sonar-mvn-goal: "-f {src-dir}/pom.xml sonar:sonar"
74 cron: "@daily"
efiacor786a07b2020-02-27 20:22:06 +000075 stream: master
76 branch: master
77
78- project:
79 name: dcaegen2-services-docker-python-subprojects
80 project: dcaegen2/services
81 mvn-settings: dcaegen2-services-settings
efiacor2b953042020-03-02 17:38:30 +000082 build-node: ubuntu1804-docker-8c-8g
efiacor786a07b2020-02-27 20:22:06 +000083 project-name:
84 - dcaegen2-services-pmsh:
85 src-dir: components/pm-subscription-handler
86 docker-name: onap/org.onap.dcaegen2.services.pmsh
Anil Belur7b3203a2023-04-14 21:54:49 +100087 stream:
88 - master:
89 branch: master
Vijay Venkatesh Kumar66af8852023-05-09 22:05:20 +000090 - london:
91 branch: london
Anil Belur7b3203a2023-04-14 21:54:49 +100092 jobs:
Andrew Grimberg5bc205b2023-05-03 09:22:20 -070093 - "{project-name}-docker-python-jobs"
Anil Belur7b3203a2023-04-14 21:54:49 +100094
95- project:
96 name: dcaegen2-services-ml
97 project: dcaegen2/services
98 mvn-settings: dcaegen2-services-settings
99 build-node: ubuntu1804-docker-8c-8g
100 project-name:
vv770d2ba7af02022-02-14 16:45:56 +0000101 - dcaegen2-services-ml-prediction-ms:
102 src-dir: components/ml-prediction-ms
103 docker-name: onap/org.onap.dcaegen2.services.ml-prediction-ms
efiacor786a07b2020-02-27 20:22:06 +0000104 stream:
105 - master:
106 branch: master
Vijay Venkatesh Kumar66af8852023-05-09 22:05:20 +0000107 - london:
108 branch: london
Anil Belur7b3203a2023-04-14 21:54:49 +1000109 jobs:
Andrew Grimberg5bc205b2023-05-03 09:22:20 -0700110 - "{project-name}-docker-python-jobs"
Anil Belur7b3203a2023-04-14 21:54:49 +1000111
112- project:
113 name: dcaegen2-services-subprojects-view
efiacor786a07b2020-02-27 20:22:06 +0000114 views:
115 - project-view:
116 project-name: dcaegen2-services-pmsh