blob: 634d1d8469d3e7bb37e7f3bb645f318798ab99a8 [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
38 name: '{project-name}-docker-python-jobs'
39 id: dcaegen2-services-docker-python-jobs
40 container-tag-method: latest
41 docker-get-container-tag-script: '../../shell/docker-ts-tag-override.sh'
42 nexus-iq-namespace: 'onap-'
43 tox-dir: '{src-dir}'
Vijay Venkatesh Kumar220b4db2022-08-24 21:54:44 +000044 tox-envs: 'py3'
efiacor786a07b2020-02-27 20:22:06 +000045 sonarcloud: true
46 sonarcloud-project-organization: '{sonarcloud_project_organization}'
efiacor786a07b2020-02-27 20:22:06 +000047 sonarcloud-project-key: '{sonarcloud_project_organization}_{project-name}'
48 python-version: python3
49 wss-product-name: '{project-name}'
50 docker-root: '{src-dir}'
51 gerrit_trigger_file_paths:
52 - compare-type: REG_EXP
53 pattern: '{src-dir}/.*'
54 jobs:
vv770dc540be92022-08-02 17:13:42 +000055 - gerrit-tox-verify:
56 pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
57 stream: all
58 branch: '*'
efiacor786a07b2020-02-27 20:22:06 +000059 - gerrit-docker-verify
efiacor80fc2e22020-03-26 09:44:32 +000060 - gerrit-docker-merge:
61 post_docker_build_script: |
62 #!/bin/bash
63 set -uex -o pipefail
64 DOCKER_IMAGE_TAG2=${{DOCKER_IMAGE_TAG%-*}}
65 DNAME={container-snapshot-registry}/{docker-name}
66 docker tag $DNAME:$DOCKER_IMAGE_TAG $DNAME:$DOCKER_IMAGE_TAG2
67 docker tag $DNAME:$DOCKER_IMAGE_TAG $DNAME:latest
68 docker push $DNAME:$DOCKER_IMAGE_TAG2
69 docker push $DNAME:latest
efiacor2f6ada12021-05-17 15:06:52 +010070 stream: master
71 branch: master
72 - gerrit-docker-merge-maintainance:
73 post_docker_build_script: |
74 #!/bin/bash
75 set -uex -o pipefail
76 DOCKER_IMAGE_TAG2=${{DOCKER_IMAGE_TAG%-*}}
77 DNAME={container-snapshot-registry}/{docker-name}
78 docker tag $DNAME:$DOCKER_IMAGE_TAG $DNAME:$DOCKER_IMAGE_TAG2
79 docker push $DNAME:$DOCKER_IMAGE_TAG2
Vijay Venkatesh Kumar5b1dbab2022-10-11 15:30:48 +000080 stream: kohn
81 branch: kohn
efiacor2f6ada12021-05-17 15:06:52 +010082 cron: ''
efiacor786a07b2020-02-27 20:22:06 +000083 - gerrit-tox-sonar:
84 # workaround because gerrit-tox-sonar doesn't support mvn-params/opts
85 sonar-mvn-goal: '-f {src-dir}/pom.xml sonar:sonar'
86 cron: '@daily'
87 stream: master
88 branch: master
89
90- project:
91 name: dcaegen2-services-docker-python-subprojects
92 project: dcaegen2/services
93 mvn-settings: dcaegen2-services-settings
efiacor2b953042020-03-02 17:38:30 +000094 build-node: ubuntu1804-docker-8c-8g
efiacor786a07b2020-02-27 20:22:06 +000095 project-name:
96 - dcaegen2-services-pmsh:
97 src-dir: components/pm-subscription-handler
98 docker-name: onap/org.onap.dcaegen2.services.pmsh
vv770d2ba7af02022-02-14 16:45:56 +000099 - dcaegen2-services-ml-prediction-ms:
100 src-dir: components/ml-prediction-ms
101 docker-name: onap/org.onap.dcaegen2.services.ml-prediction-ms
efiacor786a07b2020-02-27 20:22:06 +0000102 stream:
103 - master:
104 branch: master
Vijay Venkatesh Kumar5b1dbab2022-10-11 15:30:48 +0000105 - kohn:
106 branch: kohn
efiacor786a07b2020-02-27 20:22:06 +0000107 views:
108 - project-view:
109 project-name: dcaegen2-services-pmsh
110 jobs:
111 - dcaegen2-services-docker-python-jobs