Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »


Projects can leverage this set of templates when they are a python project that needs to upload python packages to a PyPi repository.



These templates are located in the ci-management repo at "ci-management/jjb/onap-jjb/onap-pypi-template.yaml".

There are currently 4 templates available:

  1. {project-name}-python-staging-{stream}
  2. {project-name}-python-release-{stream}
  3. {project-name}-{subproject}-python-staging-{stream}
  4. {project-name}-{subproject}-python-release-{stream}

General Job Information

The "staging" jobs will trigger a Jenkins job that builds the python package and pushes the package to a staging repo located here https://nexus3.onap.org/repository/PyPi.staging/.

The staging jobs can be triggered by the following events:

  1. A gerrit merge event
  2. A comment on a gerrit patch of "pypi-remerge"

The "release" jobs will trigger a similar job that builds the python package and pushes it to the release repo located here https://nexus3.onap.org/repository/PyPi.release/.

The release jobs can be triggered by the following event:

  1.  A comment on a gerrit patch of "pypi-release"


Both jobs require the following variables to be defined:

  • project-name
  • stream
  • tox-dir (optional, default: '')
  • tox-envs (optional, default: '')


Python projects with a subproject

Some projects have a structure where one repo contains several projects.  LF has built templates to support them as well; you will use

these projects:

  • {project-name}-{subproject}-python-staging-{stream}
  • {project-name}-{subproject}-python-release-{stream}


Here is a concrete example of how to set up pypi jobs for a project with subprojects using dcaegen2/utils.

Example.yaml
---
- project:
    name: dcaegen2-utils
    project-name: 'dcaegen2-utils'
    python-version: python3
    project: 'dcaegen2/utils'
    stream:
      - 'master':
          branch: 'master'
    mvn-settings: 'dcaegen2-utils-settings'
    # due to a strange macro / variable translation problem this needs
    # to be passed as a string block to properly get the properties
    # correctly defined in the job
    maven-deploy-properties: |
      deployAtEnd=true
    files: '**'
    archive-artifacts: ''
    subproject:
      - 'dcaeapplib':
          tox-dir: dcaeapplib/
          tox-envs: ''
      - 'onap-dcae-dbs-docker-client':
          tox-dir: onap-dcae-dbs-docker-client/
          tox-envs: ''
      - 'onap-dcae-dcaepolicy-lib':
          tox-dir: onap-dcae-dcaepolicy-lib/
          tox-envs: ''
      - 'python-discovery-client':
          tox-dir: python-discovery-client/
          tox-envs: ''
      - 'python-dockering':
          tox-dir: python-dockering/
          tox-envs: ''

    jobs:
      - '{project-name}-{subproject}-python-staging-{stream}'
      - '{project-name}-{subproject}-python-release-{stream}'

   
    build-node: 'ubuntu1604-docker-8c-8g'




{s

  • No labels