go.ligato.io/vpp-agent/v3@v3.5.0/tests/jenkins/jobs5/05test_template.yaml (about)

     1  - job-template:
     2      description: |-
     3        <!-- Managed by Jenkins Job Builder -->
     4        {path_to_test} ## {HOWTOBUILD_INCLTAGPRESENT}
     5        Note 1 - Source Code Management
     6        - no setup inside of this job because this is a prerequisite - prepared folder with ligato/vpp agent project
     7        this is in order to save the time needed for project setup in case that every suite present in unique file is run separately
     8        - THE CONSEQUENCE: the path to the test file is hardcoded (generated by jenkins job builder)
     9        Note 2 - other prerequisites
    10        - that docker images are built
    11        - nodes are properly setup (python, robotframework, jjb, docker, robot account, ...)
    12        - file with variables (VARIABLES_FILE) prepared describing current topology in folder tests/robot/variables
    13        Note 3
    14        -prerequisites and variables values are going to be changed from pipelines which fire up the separate jenkins jobs
    15        -however this job can be fired up also manually provided that prerequisites are satisfied
    16        Note 4
    17        - prerequisites is that Jenkins master is labeled PrepareLigatoTestConfig
    18        TODO:
    19        - running directly on ARM64 nodes
    20        generated on {date_of_jjb_generation}
    21        .
    22      builders:
    23        - shell: |-
    24            # defaults:
    25            # --loglevel TRACE:INFO
    26            # -v VARIABLES:arm64_local  # it refers to the file tests/robot/variables/arm64_local_variables.robot
    27            # -v AGENT_VPP_IMAGE_NAME:ligato/vpp-agent-arm64:dev  # to override the settings in variable file
    28            # -v DOCKER_HOST_IP: 147.75.72.194 # to override the settings in variable file
    29            # --include ExpectedFailure  # default for manual execution
    30            if [ "${{HOWTOBUILD}}" = "--exclude ExpectedFailure" ]; then
    31              # if tag ExpectedFailure is present in robot test then this jenkins job will be commented in pipeline
    32              # if tag ExpectedFailure is present in robot test the placeholder HOWTOBUILD_TAGPRESENT will be replaced by --include ExpectedFailure to indicate that robot test is tagged otherwise placeholder will by replaced by spaces
    33              # if pipeline is executed with parameter --exclude ExpectedFailure it should be replaced correctly here
    34              pybot --loglevel ${{LOGLEVEL}} -v AGENT_VPP_IMAGE_NAME:${{IMAGE_NAME}} -v AGENT_IMAGE_NAME:${{IMAGE_NAME}} -v DOCKER_HOST_IP:${{DOCKER_HOST_IP}} -v VARIABLES:${{VARIABLES_FILE}} {HOWTOBUILD_EXCLTAGPRESENT}  {path_to_test}
    35            else
    36              #pybot --nostatusrc --xunit xunit.xml --xunitskipnoncritical --loglevel TRACE:INFO --consolecolors on -v VARIABLES:{local_variables_file} --exclude ExpectedFailure {path_to_test}
    37              pybot --loglevel ${{LOGLEVEL}} -v AGENT_VPP_IMAGE_NAME:${{IMAGE_NAME}} -v AGENT_IMAGE_NAME:${{IMAGE_NAME}} -v DOCKER_HOST_IP:${{DOCKER_HOST_IP}} -v VARIABLES:${{VARIABLES_FILE}} {HOWTOBUILD_INCLTAGPRESENT}  {path_to_test}
    38            fi
    39            #20190227 --nostatusrc will indicate  the test always PASS which is not desirable
    40      name: '05{inode_of_folder}_{name_of_test}_job'
    41      node: PrepareLigatoTestConfig
    42      parameters:
    43        - choice:
    44            choices:
    45              - --include ExpectedFailure
    46              - --exclude ExpectedFailure
    47            description: |-
    48              tests with tag ExpectedFailure
    49              manual execution - default the test run
    50              execution from pipeline - both
    51            name: HOWTOBUILD
    52        - string:
    53            default: TRACE:INFO
    54            description: ''
    55            name: LOGLEVEL
    56            trim: 'true'
    57        - string:
    58            default: arm64_local
    59            description: 'ARM64 testing: contivvpp'
    60            name: VARIABLES_FILE
    61            trim: 'true'
    62        - string:
    63            default: 147.75.72.194
    64            description: 'to override the settings in VARIABLES_FILE'
    65            name: DOCKER_HOST_IP
    66            trim: 'true'
    67        - string:
    68            default: ligato/vpp-agent-arm64:dev
    69            description: 'to override the settings in VARIABLES_FILE'
    70            name: IMAGE_NAME
    71            trim: 'true'
    72      project-type: freestyle
    73      publishers:
    74        - archive:
    75            allow-empty: false
    76            artifacts: results/**/*
    77            case-sensitive: true
    78            default-excludes: true
    79            fingerprint: false
    80            only-if-success: false
    81        - raw:
    82            xml: |
    83              <hudson.plugins.robot.RobotPublisher plugin="robot@1.6.4">
    84              <outputPath>./</outputPath>
    85              <reportFileName>report.html</reportFileName>
    86              <logFileName>log.html</logFileName>
    87              <outputFileName>output.xml</outputFileName>
    88              <disableArchiveOutput>false</disableArchiveOutput>
    89              <passThreshold>0.0</passThreshold>
    90              <unstableThreshold>0.0</unstableThreshold>
    91              <otherFiles>
    92              <string />
    93              </otherFiles>
    94              <enableCache>true</enableCache>
    95              <onlyCritical>true</onlyCritical>
    96              </hudson.plugins.robot.RobotPublisher>
    97      triggers: []
    98      wrappers:
    99        - timeout:
   100            timeout: 280
   101            type: absolute
   102            write-description: Timed out!
   103        - timestamps