efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 1 | --- |
| 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 Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 38 | name: "{project-name}-docker-python-jobs" |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 39 | container-tag-method: latest |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 40 | 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" |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 44 | sonarcloud: true |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 45 | sonarcloud-project-organization: "{sonarcloud_project_organization}" |
| 46 | sonarcloud-project-key: "{sonarcloud_project_organization}_{project-name}" |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 47 | python-version: python3 |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 48 | wss-product-name: "{project-name}" |
| 49 | docker-root: "{src-dir}" |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 50 | gerrit_trigger_file_paths: |
| 51 | - compare-type: REG_EXP |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 52 | pattern: "{src-dir}/.*" |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 53 | jobs: |
vv770d | c540be9 | 2022-08-02 17:13:42 +0000 | [diff] [blame] | 54 | - gerrit-tox-verify: |
| 55 | pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh |
| 56 | stream: all |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 57 | branch: "*" |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 58 | - gerrit-docker-verify |
efiacor | 80fc2e2 | 2020-03-26 09:44:32 +0000 | [diff] [blame] | 59 | - gerrit-docker-merge: |
| 60 | post_docker_build_script: | |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 61 | #!/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 |
efiacor | 2f6ada1 | 2021-05-17 15:06:52 +0100 | [diff] [blame] | 69 | stream: master |
| 70 | branch: master |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 71 | - gerrit-tox-sonar: |
| 72 | # workaround because gerrit-tox-sonar doesn't support mvn-params/opts |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 73 | sonar-mvn-goal: "-f {src-dir}/pom.xml sonar:sonar" |
| 74 | cron: "@daily" |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 75 | 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 |
efiacor | 2b95304 | 2020-03-02 17:38:30 +0000 | [diff] [blame] | 82 | build-node: ubuntu1804-docker-8c-8g |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 83 | project-name: |
| 84 | - dcaegen2-services-pmsh: |
| 85 | src-dir: components/pm-subscription-handler |
| 86 | docker-name: onap/org.onap.dcaegen2.services.pmsh |
Anil Belur | 7b3203a | 2023-04-14 21:54:49 +1000 | [diff] [blame] | 87 | stream: |
| 88 | - master: |
| 89 | branch: master |
Vijay Venkatesh Kumar | 66af885 | 2023-05-09 22:05:20 +0000 | [diff] [blame] | 90 | - london: |
| 91 | branch: london |
Anil Belur | 7b3203a | 2023-04-14 21:54:49 +1000 | [diff] [blame] | 92 | jobs: |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 93 | - "{project-name}-docker-python-jobs" |
Anil Belur | 7b3203a | 2023-04-14 21:54:49 +1000 | [diff] [blame] | 94 | |
| 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: |
vv770d | 2ba7af0 | 2022-02-14 16:45:56 +0000 | [diff] [blame] | 101 | - dcaegen2-services-ml-prediction-ms: |
| 102 | src-dir: components/ml-prediction-ms |
| 103 | docker-name: onap/org.onap.dcaegen2.services.ml-prediction-ms |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 104 | stream: |
| 105 | - master: |
| 106 | branch: master |
Vijay Venkatesh Kumar | 66af885 | 2023-05-09 22:05:20 +0000 | [diff] [blame] | 107 | - london: |
| 108 | branch: london |
Anil Belur | 7b3203a | 2023-04-14 21:54:49 +1000 | [diff] [blame] | 109 | jobs: |
Andrew Grimberg | 5bc205b | 2023-05-03 09:22:20 -0700 | [diff] [blame] | 110 | - "{project-name}-docker-python-jobs" |
Anil Belur | 7b3203a | 2023-04-14 21:54:49 +1000 | [diff] [blame] | 111 | |
| 112 | - project: |
| 113 | name: dcaegen2-services-subprojects-view |
efiacor | 786a07b | 2020-02-27 20:22:06 +0000 | [diff] [blame] | 114 | views: |
| 115 | - project-view: |
| 116 | project-name: dcaegen2-services-pmsh |