Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ReleaseRelease Data
masterpf_release_data.csv
kohnnot branched yetpf_release_data.csv
jakartapf_release_data.csv
istanbul
(security updates only)
pf_release_data.csv
honolulu
(security updates only)
pf_release_data.csv
previous releases
(unsupported)
Policy Framework Project: Component Versions

...

Warning

With care an expert can start from an intermediate phase if repositories early in the release process such as policy/common or policy/models are not being released. To do this, the expert can carefully edit your local copy of the releasePhase.sh script and comment out the parts of each release phase that the expert does not want to execute. For example, if the expert wants to start from Phase 8 below (use the existing versions of policy/parent, policy/common, policy/docker, and policy/models), the expert can comment out the operation to update the policy/models snapshots and safely start from Phase 8.

Running a Release

In each phase run getReleaseData.sh followed by releasePhase.sh.


Warning

The getReleaseData.sh script, among other things, retrieves the repository tags from the repository being released from nordix gerrit. After a repo release has been carried out in a stage (reviews are merged etc), the tag for the release is automatically created in github. There can sometimes be a delay in propagating the tag to onap gerrit and then especially to nordix gerrit. This means that the tags will be unavailable for getReleaseData.sh to fetch. And thus, the pf_release_data.csv will NOT have the latest released tag. In this case, you MUST manually update the release number in the pf_release_data.csv file.

For example, after stage 2, the parent latest version tag may not be in nordix yet. You will notice, after stage 2, when you run getReleaseData.sh, the line with policy/parent in the pf_release_data.csv file does not have the new version. So, you just update that line with the new version (no need to update the SNAPSHOT version) - and then continue with stage 3.

Running a Release

In each phase run getReleaseData.sh followed by releasePhase.sh.

Code Block
languagebash
% getReleaseData.sh -l onap -b jakarta
% releasePhase.sh -l onap -i POLICY-112911 -p 1

% getReleaseData.sh -l onap -b jakarta
% releasePhase.sh -l onap -i POLICY-112911 -p 2

..............
Code Block
languagebash
% getReleaseData.sh -l onap -b jakarta
% releasePhase.sh -l onap -i POLICY-112911 -p 1

% getReleaseData.sh -l onap -b jakarta
% releasePhase.sh -l onap -i POLICY-112911 -p 2

............................

% getReleaseData.sh -l onap -b jakarta
% releasePhase.sh -l onap -i POLICY-112911 -p 15 -i POLICY-112911 -p 15


4Stage release on policy/api in Gerrit
Stage release on policy/pap in Gerrit
Stage release on policy/distribution in Gerrit
Stage release on policy/clamp in Gerritpdp Maven artifacts
Release policy/xacml-pdp Maven artifacts
PhaseActions Performed
1Update internal references in policy/parent
2

Stage release on policy/parent in Gerrit
Release policy/parent

3

Update snapshots in policy/parent
Update policy/parent references in policy/common
Update policy/parent references in policy/docker

4

Stage release on policy/common in Gerrit
Stage release on policy/docker in Gerrit
Release policy/common Maven artifacts
Release policy/docker Docker images

5Update snapshots in policy/common
Update snapshots in policy/docker
Update policy/parent and policy/common references in policy/models
6Stage release on policy/models in Gerrit
Release policy/models Maven artifacts
7Release policy/models Docker images
8Update snapshots in policy/models

Update policy/parent, policy/common, policy/models and base Docker references in policy/api
Update policy/parent, policy/common, policy/models and base Docker references in policy/pap
Update policy/parent, policy/common, policy/models and base Docker references in policy/distribution
Update policy/parent, policy/common, policy/models and base Docker references in policy/clamp
Update policy/parent, policy/common, policy/models and base Docker references in policy/apex-pdp
Update policy/parent, policy/common, policy/models and base Docker references in policy/drools-pdp
Update policy/parent, policy/common, policy/models and base Docker references in policy/xacml-pdp

9
PhaseActions Performed
1Update internal references in policy/parent
2

Stage release on policy/parent api in Gerrit
Release Stage release on policy/parent

3

Update snapshots in policy/parent
Update policy/parent references in policy/common
Update policy/parent references in policy/docker

pap in Gerrit
Stage release on policy/distribution in Gerrit
Stage release on policy/clamp in Gerrit
Stage release on policy/apex-pdp in Gerrit


Stage release on policy/common drools-pdp in Gerrit
Stage release on policy/docker xacml-pdp in Gerrit
Release policy/common api Maven artifacts
Release policy/docker Docker images

5Update snapshots in policy/common
Update snapshots in policy/docker
Update policy/parent and policy/common references in policy/models
6Stage release on policy/models in Gerrit
Release policy/models Maven artifacts
7Release policy/models Docker images

pap Maven artifacts
Release policy/distribution Maven artifacts
Release policy/clamp Maven artifacts
Release policy/apex-pdp Maven artifacts
Release policy/drools-pdp Maven artifacts
Release policy/xacml-pdp Maven artifacts

10

Release policy/api Docker images
Release policy/pap Docker images
Release policy/distribution Docker images
Release policy/clamp Docker images
Release policy/apex-pdp Docker images
Release policy/drools-pdp Docker images
Release policy/xacml-pdp Docker images

11Update snapshots in policy/api
Update snapshots in policy/pap
Update snapshots in policy/distribution
Update snapshots
8Update snapshots in policy/modelsUpdate policy/parent, policy/common, policy/models and base Docker references in policy/api
Update policy/parent, policy/common, policy/models and base Docker references in policy/pap
Update policy/parent, policy/common, policy/models and base Docker references in policy/distribution
Update policy/parent, policy/common, policy/models and base Docker references in policy/clamp
Update snapshots in policy/parent, policy/common, policy/models and base Docker references apex-pdp
Update snapshots in policy/drools-pdp
Update snapshots in policy/apexxacml-pdp
Update policy/parent, policy/common, policy/models, policy/drools-pdp and base Docker references in policy/drools-pdpapplications
Update policy/parent, policy/common, policy/models, policy/apex-pdp and base Docker references in policy/xacml-pdpgui
129

Stage release on policy/apex-pdp in Gerrit
Stage release on policy/drools-pdp applications in Gerrit
Stage release on policy/xacml-pdp gui in Gerrit
Release policy/api drools-applications Maven artifacts
Release policy/pap gui Maven artifactsRelease policy/distribution Maven artifacts

13

Stage release on policy/drools-applications in Gerrit (Note: a second stage-release is required on drools-applications following maven artifact release)
Release policy/clamp Maven artifactsdrools-applications Docker images
Release policy/apex-pdp Maven artifacts
Release gui Docker images

14

Update snapshots in policy/drools-

10

Release policy/api Docker images
Release policy/pap Docker images
Release policy/distribution Docker images
Release policy/clamp Docker images
Release policy/apex-pdp Docker images
Release policy/drools-pdp Docker images
Release policy/xacml-pdp Docker images

11Update snapshots in policy/api
Update snapshots in policy/pap
Update snapshots in policy/distribution
Update snapshots in policy/clamp
Update snapshots in policy/apex-pdp
Update snapshots in policy/drools-pdp
Update snapshots in policy/xacml-pdp
Update policy/parent, policy/common, policy/models, policy/drools-pdp and base Docker references in policy/drools-applications
Update policy/parent, policy/common, policy/models, policy/apex-pdp and base Docker references in policy/gui
12

Stage release on policy/drools-applications in Gerrit
Stage release on policy/gui in Gerrit
Release policy/drools-applications Maven artifacts
Release policy/gui Maven artifacts

13

Stage release on policy/drools-applications in Gerrit (Note: a second stage-release is required on drools-applications following maven artifact release)
Release policy/drools-applications Docker images
Release policy/gui Docker images

14

Update snapshots in policy/drools-applications
Update snapshots in policy/gui

15Store the updated pf_release_data.sh file in policy/parent with an optional Gerrit tag for the release

Updating image revisions in OOM

When releasing in ONAP, the revisions of the Policy Framework Docker images must be updated in OOM.

The image revisions in the Policy Framework values.yaml files are updated using the updateOomImages.sh script. The script updates the image revisions in OOM and creates a commit in Gerrit for the change.

applications
Update snapshots in policy/gui

15Store the updated pf_release_data.sh file in policy/parent with an optional Gerrit tag for the release

Updating image revisions in OOM

When releasing in ONAP, the revisions of the Policy Framework Docker images must be updated in OOM.

The image revisions in the Policy Framework values.yaml files are updated using the updateOomImages.sh script. The script updates the image revisions in OOM and creates a commit in Gerrit for the change.

  1. Clone a copy of the OOM repository into a suitable location. The suggested location is onap/oom, where the Policy Framework repositories are in onap/policy/parent, onap/policy/common etc.
  2. Make sure that the correct branch of OOM is checked out, if you are, for example, working on a Jakarta release of the Policy Framework, check out the Jakarta branch on the OOM repository.
  3. Run the updateOomImages.sh script:

    Code Block
    languagebash
    % updateOomImages.sh -l onap -i POLICY-112911


A commit is raised that updates OOM for the new Policy Framework release. The commit is inspected and merged as normal.

Tagging a Release

When an official release is completed, a tag for that release is created on each repository in Gerrit. The official releases from the Policy Framework are catalogued on the Policy Framework Project: Component Versions page. The following types of releases are tagged:

TypeNumberingDescription
ONAPx.y.0-ONAPAn ONAP Full Release, where x.y.0 is the ONAP release version
ONAP Maintenancex.y.z-ONAPAn ONAP Maintenance Release, where x.y.z is the ONAP release patch version
Policy Framework Interimx.y.z-PF-In

An interim release of the Policy Framework for Policy Framework stakeholders, to be included in the next ONAP Maintenance release on that branch. x.y.z is the ONAP release version and n is the Policy Framework Interim release number on that ONAP release version.

If a release is not made available to ONAP or to stakeholders (such as a release for integration testing), the release need not be tagged.

When preforming the final phase in the release process, use the -t option on the releasePhase.shscript to set a tag on the release data stored in Gerrit for the release. The tag used should match the tag used on the repositories in Gerrit for the release.

Code Block
languagebash
releasePhase.sh -l onap -p 15 -i POLICY-112911 -t 1.10.0-ONAP

Branching

Branching is where a new branch is created on each repository in the Policy Framework and the minor revision of each repository is stepped. Branching is usually performed when development is completed for a release and development is moving onto the next release.

To branch, perform the following steps:

  1. In Gerrit, create the new branch off the master branch in each repository
  2. Check that all the branches have been created correctly
  3. On the master branch, run the getReleaseData.sh script to update the pf_release_data.csv file

    Code Block
    languagebash
    getReleaseData.sh -l onap


  4. Run the newReleaseSnapshots.sh script to update the snapshot versions on all the repositories and merge the generated commits

    1. For a minor release run the script as follows:

      Code Block
      languagebash
      newReleaseSnapshots
  5. Clone a copy of the OOM repository into a suitable location. The suggested location is onap/oom, where the Policy Framework repositories are in onap/policy/parent, onap/policy/common etc.
  6. Make sure that the correct branch of OOM is checked out, if you are, for example, working on a Jakarta release of the Policy Framework, check out the Jakarta branch on the OOM repository.
  7. Run the updateOomImages.sh script:

    Code Block
    languagebash
    % updateOomImages
    1. .sh -l onap -i POLICY-112911

A commit is raised that updates OOM for the new Policy Framework release. The commit is inspected and merged as normal.

Tagging a Release

When an official release is completed, a tag for that release is created on each repository in Gerrit. The official releases from the Policy Framework are catalogued on the Policy Framework Project: Component Versions page. The following types of releases are tagged:

...

An interim release of the Policy Framework for Policy Framework stakeholders, to be included in the next ONAP Maintenance release on that branch. x.y.z is the ONAP release version and n is the Policy Framework Interim release number on that ONAP release version.


    1. For a major release run the script with the -m flag as follows:

      Code Block
      languagebash
      newReleaseSnapshots.sh -m -l onap -i POLICY-112911


  1. Run the resolveRefs.sh script to update the cross references and base docker images, then merge the generated commits

    Code Block
    languagebash
    resolveRefs.sh -l onap -i POLICY-112911


  2. Add the new branch to the JJB job Yaml files in onap/ci-management/jjb/policy so that the Jenkins jobs for the new branch are created.
  3. Check out the release branch into a separate tree structure:
      release_name/policy/parent
      release_name/policy/common
      etc.
  4. On the release branch, edit the file release_name/policy/parent/docs/conf.py and change all references to master or latest to your release name (these variables are release, version and branch)
  5. On the release branch, edit the .gitreview file and change the line defaultbranch=master to defaultbranch=<release_name>, where <release_name> is the name of the new release
  6. Raise commits and merge the changes in 7. and 8. above.

If a release is not made available to ONAP or to stakeholders (such as a release for integration testing), the release need not be tagged.

Branching

Branching is where a new branch is created on each repository in the Policy Framework and the minor revision of each repository is stepped. Branching is usually performed when development is completed for a release and development is moving onto the next release.

To branch, perform the following steps:

  1. In Gerrit, create the new branch off the master branch in each repository
  2. Check that all the branches have been created correctly
  3. On the master branch, run the getReleaseData.sh script to update the pf_release_data.csv file

    Code Block
    languagebash
    getReleaseData.sh -l onap

    Run the newReleaseSnapshots.sh script to update the snapshot versions and various references on all the repositories

    Code Block
    languagebash
    newReleaseSnapshots.sh -l onap -i POLICY-112911

The snapshot versions and references are now set correctly on the master branch for and the next release branch.

Example of Performing a Release

...

ScriptDescription
bumpSnapshots.sh
bumpSnapshots.sh - generate commits to bump the snapshot version and update references to snapshot references
               on any repos that need to be bumped or updated

       usage:  bumpSnapshots.sh [-options]

       options
         -h           - this help message
         -d data_file - the policy release data file to use, defaults to './pf_release_data.csv'
         -l location  - the location of the policy framework repos on the file system,
                        defaults to './'
         -i issue-id  - issue ID in the format POLICY-nnnn

 examples:
  bumpSnapshots.sh -l /home/user/onap -d /home/user/data/pf_release_data.csv -i POLICY-1234
    bump snapshots on the repos at location '/home/user/onap' using the release data
    in the file '/home/user/data/pf_release_data.csv'
generateCommit.sh
generateCommit.sh - generates a new commit or a patch on an existing commit for PF releases

       usage:  generateCommit.sh [-options]

       options
         -h                - this help message
         -l location       - the location of the policy framework repos on the file system,
                             defaults to './'
         -r repo           - the policy repo to which to commit
         -i issue-id       - issue ID in the format POLICY-nnnn
         -e commit-header  - the header for the commit
         -m commit-message - the message body for the commit

 example:
  generateCommit.sh -l /home/git/onap -r policy/pap -i POLICY-1234 -e commit-header -m commit-message
    create a new commit or update an existing commit on policy/pap with the given details
getReleaseData.sh
getReleaseData.sh - gets information from the checked out Policy Framework repos for the release process

       usage:  getReleaseData.sh [-options]

       options
         -h           - this help message
         -b branch    - the branch to release on, defaults to 'master'
         -d data_file - the policy release data file to create, defaults to './pf_release_data.csv'
         -l location  - the location of the policy framework repos on the file system,
                        defaults to './'
mkart.sh
mkart.sh - create the release yaml file to release the current snapshot on the current repo

     usage:  mkart.sh [-options]

       options
       -d - create a release yaml foie for a repo that has Docker images
mkdock.sh
mkdock.sh - create the release container yaml file to release the docker images on the current repo

   usage:  mkdock.sh docker-container-name1 docker-container-name2 ...
newReleaseSnapshots.sh
on release changes, generate commits to set the snapshot version and update
references on any repos that reference other repos

       usage:  newReleaseSnapshots.sh [-options]

       options
         -h           - this help message
         -d data_file - the policy release data file to use, defaults to './pf_release_data.csv'
         -l location  - the location of the policy framework repos on the file system,
                        defaults to './'
         -i issue-id  - issue ID in the format POLICY-nnnn

 examples:
  newReleaseSnapshots.sh -l /home/user/onap -d /home/user/data/pf_release_data.csv -i POLICY-1234
    set snapshots on the repos at location '/home/user/onap' using the release data
    in the file '/home/user/data/pf_release_data.csv'
releasePhase.sh
releasePhase.sh - execute a certain policy framework release phase

       usage:  releasePhase.sh [-options]

       options
         -h           - this help message
         -d data_file - the policy release data file to use, defaults to './pf_release_data.csv'
         -l location  - the location of the policy framework repos on the file system,
                        defaults to './'
         -i issue-id  - issue ID in the format POLICY-nnnn
         -p phase     - the release phase, a positive integer
-t tag       - tag the release data file with the given tag

 examples:
  releasePhase.sh -l /home/user/onap -d /home/user/data/pf_release_data.csv -i POLICY-1234 -p 3
    perform release phase 3 on the repos at location '/home/user/onap' using the release data
    in the file '/home/user/data/pf_release_data.csv'
releaseRepo.sh
releaseRepo.sh - release the specified repository by generating the release yaml file and the release commit

       usage:  releaseRepo.sh [-options]

       options
         -h           - this help message
         -d data_file - the policy release data file to use, defaults to './pf_release_data.csv'
         -l location  - the location of the policy framework repos on the file system,
                        defaults to './'
         -r repo      - the policy repo to release
         -i issue-id  - issue ID in the format POLICY-nnnn

 examples:
  releaseRepo.sh -l /home/user/onap -d /home/user/data/pf_release_data.csv -r policy/common -i POLICY-1234
    release the 'policy/common' repo at location '/home/user/onap' using the release data
    in the file '/home/user/data/pf_release_data.csv'
releaseRepoImages.sh
releaseRepoImages.sh - release the docker images for the specified repository by generating the release yaml file and
               the release commit
       usage:  releaseRepoImages.sh [-options]

       options
         -h           - this help message
         -d data_file - the policy release data file to use, defaults to './pf_release_data.csv'
         -l location  - the location of the policy framework repos on the file system,
                        defaults to './'
         -r repo      - the policy repo to release
         -i issue-id  - issue ID in the format POLICY-nnnn

 examples:
  releaseRepoImages.sh -l /home/user/onap -d /home/user/data/pf_release_data.csv -r policy/common -i POLICY-1234
    release the 'policy/common' repo at location '/home/user/onap' using the release data
    in the file '/home/user/data/pf_release_data.csv'
updateOomImages.sh
updateOomImages.sh - generate an OOM commit to update the versions of Policy Framework images in values.yaml files

       usage:  updateOomImages.sh [-options]

       options
         -h           - this help message
         -d data_file - the policy release data file to use, defaults to './pf_release_data.csv'
         -l location  - the location of the OOM repo on the file system,
                        defaults to './'
         -i issue-id  - issue ID in the format POLICY-nnnn

 examples:
  updateOomImages.sh -l /home/user/onap -d /home/user/data/pf_release_data.csv -i POLICY-1234
    update the version of policy framework images at location '/home/user/onap/oom' using the release data
    in the file '/home/user/data/pf_release_data.csv'
updateParentRef.sh
updateParentRef.sh - update the parent reference in a POM file
       usage:  updateParentRef.sh [-options]
       options
         -h             - this help message
         -f pom_file    - the POM file to update
         -g group_id    - the parent group ID
         -a artifact_id - the parent artifact ID
         -v version     - the parent version
updateRefs.sh
updateRefs.sh - updates the inter-repo references in Policy Framework POM files

       usage:  updateRefs.sh [-options]

       options
         -h           - this help message
         -d data_file - the policy release data file to use, generated by the 'getReleaseData.sh' script,
                        defaults to './pf_release_data.csv'
         -l location  - the location of the policy framework repos on the file system,
                        defaults to './'
         -r repo      - the policy repo to update
         -p           - update policy/parent references
         -c           - update policy/common references
         -m           - update policy/model references
         -o           - update policy/drools-pdp references
         -x           - update policy/apex-pdp references
         -k           - update docker base images in Dockerfiles
         -f           - update release data in policy parent
-t tag       - tag the release data file with the given tag
        -s           - update release references to snapshot references,
                        if omitted, snapshot references are updated to release references

 examples:
  updateRefs.sh -pcm -r policy/pap
              update the parent, common, and models references of policy/pap
              to the current released version

  updateRefs.sh -c -m -s -r policy/api
              update the common and models references of policy/api
              to the current snapshot version

...