Zack Williams | b531e57 | 2018-10-23 09:03:33 -0700 | [diff] [blame] | 1 | --- |
| 2 | # verification jobs for 'osam' repo |
| 3 | |
| 4 | - project: |
| 5 | name: osam |
| 6 | project: '{name}' |
| 7 | |
| 8 | jobs: |
| 9 | - 'verify-osam-jobs': |
| 10 | branch-regexp: '{supported-branches-regexp}' |
| 11 | |
| 12 | - job-group: |
| 13 | name: 'verify-osam-jobs' |
| 14 | jobs: |
| 15 | - 'verify-licensed' |
Zack Williams | 83a475b | 2018-12-13 09:26:48 -0700 | [diff] [blame] | 16 | - 'osam-test': |
Zack Williams | ad92e6e | 2020-10-07 09:54:10 -0700 | [diff] [blame] | 17 | dependency-jobs: 'verify_osam_licensed' |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 18 | |
| 19 | - job-template: |
| 20 | id: 'osam-test' |
| 21 | name: 'verify_{project}_test' |
| 22 | |
| 23 | description: | |
| 24 | Created by {id} job-template from ci-management/jjb/verify/osam.yaml |
| 25 | |
| 26 | triggers: |
| 27 | - cord-infra-gerrit-trigger-patchset: |
| 28 | gerrit-server-name: '{gerrit-server-name}' |
| 29 | project-regexp: '^{project}$' |
| 30 | branch-regexp: '{branch-regexp}' |
| 31 | dependency-jobs: '{dependency-jobs}' |
| 32 | file-include-regexp: '{all-files-regexp}' |
| 33 | |
| 34 | properties: |
| 35 | - cord-infra-properties: |
| 36 | build-days-to-keep: '{build-days-to-keep}' |
| 37 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 38 | |
| 39 | wrappers: |
| 40 | - lf-infra-wrappers: |
Zack Williams | 1068edd | 2018-11-08 08:40:12 -0700 | [diff] [blame] | 41 | build-timeout: 40 |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 42 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 43 | |
| 44 | scm: |
| 45 | - cord-infra-gerrit-scm: |
| 46 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
| 47 | refspec: '$GERRIT_REFSPEC' |
| 48 | branch: '$GERRIT_BRANCH' |
| 49 | submodule-recursive: 'false' |
| 50 | choosing-strategy: 'gerrit' |
| 51 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
Zack Williams | a626144 | 2018-11-01 14:00:35 -0700 | [diff] [blame] | 52 | basedir: '{basedir}' |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 53 | |
Hung-Wei Chiu | f6cbde2 | 2021-04-22 22:15:23 -0700 | [diff] [blame] | 54 | node: 'ubuntu18.04-basebuild-1c-2g' |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 55 | project-type: freestyle |
| 56 | concurrent: true |
| 57 | |
| 58 | builders: |
Joey Armstrong | 1cc9029 | 2024-04-02 09:27:33 -0400 | [diff] [blame] | 59 | # NOTE: this env var is only required to fix a bug in the "surefire" |
| 60 | # dependency: |
| 61 | # https://issues.apache.org/jira/browse/SUREFIRE-1588 |
| 62 | # https://github.com/apache/maven-surefire/pull/197 |
| 63 | # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911925 |
Zack Williams | 77e2d3c | 2018-11-14 09:58:31 -0700 | [diff] [blame] | 64 | # should be removed as soon as this problem is resolved |
| 65 | - inject: |
| 66 | properties-content: | |
| 67 | _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true |
| 68 | |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 69 | - shell: | |
| 70 | #!/usr/bin/env bash |
| 71 | set -eux -o pipefail |
| 72 | |
| 73 | echo "Starting database for OSAM tests" |
| 74 | |
| 75 | # pull database |
| 76 | docker pull mariadb:10.3-bionic |
| 77 | |
| 78 | # run database |
| 79 | # Settings for the following commmand must match values given |
| 80 | # in: osam-core/model/src/main/resources/application.properties |
| 81 | |
Zack Williams | a626144 | 2018-11-01 14:00:35 -0700 | [diff] [blame] | 82 | docker run -d -p 3306:3306 --name springbootdb \ |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 83 | -e MYSQL_DATABASE=osam_core \ |
| 84 | -e MYSQL_USER=root \ |
| 85 | -e MYSQL_ROOT_PASSWORD=123456 \ |
| 86 | mariadb:10.3-bionic |
| 87 | |
Zack Williams | a626144 | 2018-11-01 14:00:35 -0700 | [diff] [blame] | 88 | # wait for mariadb to start up, print docker container status |
| 89 | sleep 15 |
| 90 | docker ps -a |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 91 | |
| 92 | - maven-target: |
| 93 | goals: "test" |
| 94 | pom: "pom.xml" |
Hung-Wei Chiu | 77f7171 | 2021-04-29 10:07:02 -0700 | [diff] [blame] | 95 | maven-version: '{maven-version}' |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 96 | |
| 97 | publishers: |
| 98 | - postbuildscript: |
| 99 | builders: |
| 100 | - build-on: |
| 101 | - SUCCESS |
| 102 | - UNSTABLE |
| 103 | - FAILURE |
| 104 | build-steps: |
| 105 | - shell: | |
| 106 | #!/usr/bin/env bash |
| 107 | set -eux -o pipefail |
| 108 | |
| 109 | echo "Stopping database" |
Zack Williams | a626144 | 2018-11-01 14:00:35 -0700 | [diff] [blame] | 110 | docker ps -a |
Zack Williams | c3c8393 | 2018-10-30 13:56:37 -0700 | [diff] [blame] | 111 | docker rm -f springbootdb |
| 112 | |
Joey Armstrong | af679da | 2023-01-31 14:22:41 -0500 | [diff] [blame] | 113 | |
| 114 | # [EOF] |