...
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:
Type | Numbering | Description |
---|---|---|
ONAP | x.y.0-ONAP | An ONAP Full Release, where x.y.0 is the ONAP release version |
ONAP Maintenance | x.y.z-ONAP | An ONAP Maintenance Release, where x.y.z is the ONAP release patch version |
Policy Framework Interim | x.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.
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.
<TBC>
Example of Performing a Release
A Release is where the all the Maven artifacts and Docker images are released on the current branch and and the snapshot version of the repositories is stepped.
...
To branch, perform the following steps:
- In Gerrit, create the new branch off the master branch in each repository
- Check that all the branches have been created correctly
On the master branch, run the getReleaseData.sh script to update the pf_release_data.csv file
Code Block language bash getReleaseData.sh -l onap
Run the newReleaseSnapshots.sh script to update the snapshot versions and various references on all the repositories
Code Block language bash newReleaseSnapshots.sh -l onap -i POLICY-112911
The snapshot versions and references are now set correctly on the master branch for the next release.
Example of Performing a Release
A Release is where the all the Maven artifacts and Docker images are released on the current branch and and the snapshot version of the repositories is stepped.
The process of performing a release is best illustrated by example. Let's assume we are on the Jakarta release. We have checked out the Policy Framework repositories into the onap/policy subdirectory of the current directory and the release scripts are in our PATH.
Code Block | ||
---|---|---|
| ||
% echo $PATH /usr/local/bin:/usr/bin:/bin:/% echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/liam/bin:/Users/meself/git/onap/policy/parent/integration/src/main/scripts/release % ls onap/policy apex-pdp clamp distribution drools-applications gui pap xacml-pdp api common docker drools-pdp models parent |
...
Code Block | ||
---|---|---|
| ||
% getReleaseData.sh -l onap -b jakarta updating the policy framework data from 'onap' to data file './pf_release_data.csv' . . . updating data from repo policy/parent branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/parent' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/parent updated to data file './pf_release_data.csv' . . . updating data from repo policy/docker branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/docker' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/docker updated to data file './pf_release_data.csv' . . . updating data from repo policy/common branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/common' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/common updated to data file './pf_release_data.csv' . . . updating data from repo policy/models branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/models' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/models updated to data file './pf_release_data.csv' . . . updating data from repo policy/api branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/api' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/api updated to data file './pf_release_data.csv' . . . updating data from repo policy/pap branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/pap' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/pap updated to data file './pf_release_data.csv' . . . updating data from repo policy/apex-pdp branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/apex-pdp' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/apex-pdp updated to data file './pf_release_data.csv' . . . updating data from repo policy/drools-pdp branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/drools-pdp' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/drools-pdp updated to data file './pf_release_data.csv' . . . updating data from repo policy/xacml-pdp branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/xacml-pdp' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/xacml-pdp updated to data file './pf_release_data.csv' . . . updating data from repo policy/distribution branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/distribution' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/distribution updated to data file './pf_release_data.csv' . . . updating data from repo policy/clamp branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/clamp' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/clamp updated to data file './pf_release_data.csv' . . . updating data from repo policy/gui branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/gui' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/gui updated to data file './pf_release_data.csv' . . . updating data from repo policy/drools-applications branch jakarta to data file './pf_release_data.csv' . . . updating repository 'policy/drools-applications' . . . Already on 'jakarta' Your branch is up to date with 'origin/jakarta'. Already up to date. Current branch jakarta is up to date. data from repo policy/drools-applications updated to data file './pf_release_data.csv' . . . policy framework data from 'onap' updated to data file './pf_release_data.csv' . . . Repo, Last Tag Version,Snapshot Version,Changed Files,Docker Images policy/parent,3.5.4,3.5.5-SNAPSHOT,1, policy/docker,2.4,Snapshot Version,Changed Files,Docker Images policy/parent,3.5.4,3.5.5-SNAPSHOT,1, policy/docker,2.4.4,2.4.5-SNAPSHOT,85,'policy-jre-alpine':'policy-jdk-alpine':'policy-db-migrator' policy/common,1.10.4,1.10.5-SNAPSHOT,0, policy/models,2.6.5,2.6.6-SNAPSHOT,2,'policy-models-simulator' policy/api,2.6.4,2.46.5-SNAPSHOT,851,'policy-jre-alpine':'policy-jdk-alpine':'policy-db-migratorapi' policy/pap,2.6.4,2.6.5-SNAPSHOT,1,'policy-pap' policy/commonapex-pdp,12.107.4,12.107.5-SNAPSHOT,0,1,'policy-apex-pdp' policy/modelsdrools-pdp,21.610.54,21.610.65-SNAPSHOT,21,'policy-models-simulatordrools' policy/apixacml-pdp,2.6.4,2.6.5-SNAPSHOT,1,'policy-apixacml-pdp' policy/papdistribution,2.67.4,2.67.5-SNAPSHOT,1,'policy-papdistribution' policy/apex-pdpclamp,6.2.7.4,6.2.7.5-SNAPSHOT,1,8,'policy-clamp-backend':'policy-apex-pdp-clamp-ac-pf-ppnt':'policy-clamp-ac-k8s-ppnt':'policy-clamp-ac-http-ppnt':'policy-clamp-runtime-acm' policy/drools-pdpgui,12.102.4,12.102.5-SNAPSHOT,12,'policy-droolsgui' policy/xacmldrools-pdpapplications,21.610.4,21.610.5-SNAPSHOT,16,'policy-xacmlpdpd-pdp' policy/distribution,2.7.4,2.7.5-SNAPSHOT,1,'policy-distribution' policy/clamp,6.2.4,6.2.5-SNAPSHOT,8,'policy-clamp-backend':'policy-clamp-ac-pf-ppnt':'policy-clamp-ac-k8s-ppnt':'policy-clamp-ac-http-ppnt':'policy-clamp-runtime-acm' policy/gui,2.2.4,2.2.5-SNAPSHOT,2,'policy-gui' policy/drools-applications,1.10.4,1.10.5-SNAPSHOT,6,'policy-pdpd-cl' |
Perform Phase 1, update of references in policy/parent
cl' |
Perform Phase 1, update of references in policy/parent
Code Block | ||
---|---|---|
| ||
% releasePhase.sh -l onap -i POLICY-112911 -p 1
Updating parent references in the parent pom and generating commit . . .
updating policy parent reference to 3.5.5 on onap/policy/parent . . .
policy parent reference updated on onap/policy/parent
generating commit 'update parent references in policy/parent pom' . . .
[jakarta ae6cc59] update parent references in policy/parent pom
1 file changed, 1 insertion(+), 1 deletion(-)
commit 'update parent references in policy/parent pom' generated
sending commit 'update parent references in policy/parent pom' to gerrit . . .
remote:
remote: Processing changes: refs: 1, new: 1
remote: Processing changes: refs: 1, new: 1
remote: Processing changes: refs: 1, new: 1
remote: Processing changes: refs: 1, new: 1, done
remote:
remote: SUCCESS
remote:
remote: https://gerrit.onap.org/c/onap/policy/parent/+/15332 | ||
Code Block | ||
| ||
% releasePhase.sh -l onap -i POLICY-112911 -p 1 Updating parent references in the parent pom and generating commit . . . updating policy parent reference to 3.5.5 on onap/policy/parent . . . policy parent reference updated on onap/policy/parent generating commit 'update parent references in policy/parent pom' . . . [jakarta ae6cc59] update parent references in policy/parent pom 1 file changed, 1 insertion(+), 1 deletion(-) commit 'update parent references in policy/parent pom' generated sending commit 'update parent references in policy/parent pom' to gerrit . . . [NEW] remote: remote: Processing changes: refs: 1, new: 1 remote: Processing changes: refs: 1, new: 1 remote: Processing changes: refs: 1, new: 1 remote: Processing changes: refs: 1, new: 1, done remote: remote: SUCCESS remote: remote: https://gerrit.onap.org/c/onap/policy/parent/+/15332 update parent references in policy/parent pom [NEW] remote: To ssh://gerrit.onap.org:29418/onap/policy/parent * [new reference] HEAD -> refs/for/jakarta commit 'update parent references in policy/parent pom' sent to gerrit . . . Updated parent references in the parent pom and generated commit |
The references are updated in the local repositories and a commit is created in Gerrit for the change.
The commit is reviewed and merged as normal.
Phase 2: Release policy/parent
When the commit for Phase 1 has been merged and the merge job has completed, stage the release of the policy/parent Maven artifacts by giving the stage-release magic word as a comment on the release commit. When the stage release job has completed in Gerrit, you can proceed to run Phase 2.
Get the release data.
Note |
---|
The output from git on the getReleaseData.sh script is omitted from Phase 2 for brevity. |
Code Block | ||
---|---|---|
| ||
% getReleaseData.sh -l onap -b jakarta
Repo, Last Tag Version,Snapshot Version,Changed Files,Docker Images
policy/parent,3.5.4,3.5.5-SNAPSHOT,1,
policy/docker,2.4.4,2.4.5-SNAPSHOT,85,'policy-jre-alpine':'policy-jdk-alpine':'policy-db-migrator'
policy/common,1.10.4,1.10.5-SNAPSHOT,0,
policy/models,2.6.5,2.6.6-SNAPSHOT,2,'policy-models-simulator'
policy/api,2.6.4,2.6.5-SNAPSHOT,1,'policy-api'
policy/pap,2.6.4,2.6.5-SNAPSHOT,1,'policy-pap'
policy/apex-pdp,2.7.4,2.7.5-SNAPSHOT,1,'policy-apex-pdp'
policy/drools-pdp,1.10.4,1.10.5-SNAPSHOT,1,'policy-drools'
policy/xacml-pdp,2.6.4,2.6.5-SNAPSHOT,1,'policy-xacml-pdp'
policy/distribution,2.7.4,2.7.5-SNAPSHOT,1,'policy-distribution'
policy/clamp,6.2.4,6.2.5-SNAPSHOT,8,'policy-clamp-backend':'policy-clamp-ac-pf-ppnt':'policy-clamp-ac-k8s-ppnt':'policy-clamp-ac-http-ppnt':'policy-clamp-runtime-acm'
policy/gui,2.2.4,2.2.5-SNAPSHOT,2,'policy-gui'
policy/drools-applications,1.10.4,1.10.5-SNAPSHOT,6,'policy-pdpd-cl'
|
Perform Phase 2, release policy/parent
To ssh://gerrit.onap.org:29418/onap/policy/parent
* [new reference] HEAD -> refs/for/jakarta
commit 'update parent references in policy/parent pom' sent to gerrit . . .
Updated parent references in the parent pom and generated commit |
The references are updated in the local repositories and a commit is created in Gerrit for the change.
The commit is reviewed and merged as normal.
Phase 2: Release policy/parent
When the commit for Phase 1 has been merged and the merge job has completed, stage the release of the policy/parent Maven artifacts by giving the stage-release magic word as a comment on the release commit. When the stage release job has completed in Gerrit, you can proceed to run Phase 2.
Get the release data.
Note |
---|
The output from git on the getReleaseData.sh script is omitted from Phase 2 for brevity. |
Code Block | ||
---|---|---|
| ||
% getReleaseData.sh -l onap -b jakarta
Repo, Last Tag Version,Snapshot Version,Changed Files,Docker Images
policy/parent,3.5.4,3.5.5-SNAPSHOT,1,
policy/docker,2.4.4,2.4.5-SNAPSHOT,85,'policy-jre-alpine':'policy-jdk-alpine':'policy-db-migrator'
policy/common,1.10.4,1.10.5-SNAPSHOT,0,
policy/models,2.6.5,2.6.6-SNAPSHOT,2,'policy-models-simulator'
policy/api,2.6.4,2.6.5-SNAPSHOT,1,'policy-api'
policy/pap,2.6.4,2.6.5-SNAPSHOT,1,'policy-pap'
policy/apex-pdp,2.7.4,2.7.5-SNAPSHOT,1,'policy-apex-pdp'
policy/drools-pdp,1.10.4,1.10.5-SNAPSHOT,1,'policy-drools'
policy/xacml-pdp,2.6.4,2.6.5-SNAPSHOT,1,'policy-xacml-pdp'
policy/distribution,2.7.4,2.7.5-SNAPSHOT,1,'policy-distribution'
policy/clamp,6.2.4,6.2.5-SNAPSHOT,8,'policy-clamp-backend':'policy-clamp-ac-pf-ppnt':'policy-clamp-ac-k8s-ppnt':'policy-clamp-ac-http-ppnt':'policy-clamp-runtime-acm'
policy/gui,2.2.4,2.2.5-SNAPSHOT,2,'policy-gui'
policy/drools-applications,1.10.4,1.10.5-SNAPSHOT,6,'policy-pdpd-cl'
|
Perform Phase 2, release policy/parent
Code Block | ||
---|---|---|
| ||
% releasePhase.sh -l onap -i POLICY-112911 -p 2
Generating artifact release yaml file and commit for policy/parent . . .
have you run 'stage-release' on the 'policy/parent' repo? y
Branch: jakarta
Project: policy/parent
Version: 3.5.5
Stage ID: policy-parent-maven-stage-jakarta/145/
Creating /Users/liam/work/releases/onap/policy/parent/releases/3.5.5.yaml
generating commit for policy/parent release: 3.5.4-->3.5.5 . . .
generating commit 'Release policy/parent: 3.5.5' . . .
[jakarta 2f0ceb1] Release policy/parent: 3.5.5
1 file changed, 4 insertions(+)
create mode 100644 releases/3.5.5.yaml
commit 'Release policy/parent: 3.5.5' generated
sending commit 'Release policy/parent: 3.5.5' to gerrit . . .
remote:
remote: Processing changes: refs: 1, new: 1
remote: Processing changes: refs: 1, new: 1, done
remote:
remote: SUCCESS
remote:
remote: https://gerrit.onap.org/c/onap/policy/parent/+/15333 Release policy/parent: 3.5.5 [NEW]
remote:
To ssh://gerrit.onap.org:29418/onap/policy/parent
* [new reference] HEAD -> refs/for/jakarta
| ||
Code Block | ||
| ||
% releasePhase.sh -l onap -i POLICY-112911 -p 2 Generating artifact release yaml file and commit for policy/parent . . . have you run 'stage-release' on the 'policy/parent' repo? y Branch: jakarta Project: policy/parent Version: 3.5.5 Stage ID: policy-parent-maven-stage-jakarta/145/ Creating /Users/liam/work/releases/onap/policy/parent/releases/3.5.5.yaml generating commit for policy/parent release: 3.5.4-->3.5.5 . . . generating commit 'Release policy/parent: 3.5.5' sent to gerrit . . . [jakarta 2f0ceb1] Releasecommit for policy/parent release: 33.5.4-->3.5.5 generated Generated 1artifact filerelease changed,yaml 4 insertions(+) create mode 100644 file and commit for policy/parent |
The onap/policy/parent/releases/3.5.5.yaml
...
file is created and a commit is raised on gerrit.
The commit is reviewed and merged as normal.
Subsequent Phases
Subsequent phases proceed in a similar manner with executions of getReleaseData.sh followed by executions of releasePhase.sh.
Appendix I: Release Script Usage
Script | Description |
---|---|
bumpSnapshots.sh | bumpSnapshots.sh - generate commits to bump the snapshot version and update references to snapshot references |
generateCommit.sh | generateCommit.sh - generates a new commit or a patch on an existing commit for PF releases |
The onap/policy/parent/releases/3.5.5.yaml file is created and a commit is raised on gerrit.
The commit is reviewed and merged as normal.
Subsequent Phases
Subsequent phases proceed in a similar manner with executions of getReleaseData.sh followed by executions of releasePhase.sh.
Appendix I: Release Script Usage
Script | Description | ||||||
---|---|---|---|---|---|---|---|
bumpSnapshots.sh | bumpSnapshots.sh - generate commits to bump the snapshot version and update references to snapshot references | ||||||
getReleaseData.sh | getReleaseData | generateCommit.sh | generateCommit.sh - generatesgets ainformation new commit or a patch on an existing commit for PF releasesfrom the checked out Policy Framework repos for the release process | ||||
mkart.sh | mkart.sh - create the release yaml file to release the current snapshot on the current repo | ||||||
mkdock.sh | mkdock.sh -l /home/git/onap -r policy/pap -i POLICY-1234 -e commit-header -m commit-message | ||||||
newReleaseSnapshots.sh | on release changes, generate commits to set the snapshot version and update | getReleaseData.sh | getReleaseData.sh - gets information from the checked out Policy Framework repos for the release process | mkart.sh | mkart.sh - create the release yaml file to release the current snapshot on the current repo | mkdock.sh | mkdockformat POLICY-nnnn |
releasePhase.sh | releasePhase.sh - execute a certain policy framework release phase | ||||||
releaseRepo.sh | releaseRepo.sh - release the specified repository by generating the release yaml file and the release commit | ||||||
releaseRepoImages.sh | releaseRepoImages.sh - release the docker images for the specified repository by generating the release yaml file and | ||||||
updateOomImages.sh | updateOomImages.sh - generate an OOM commit to update the versions of Policy Framework images in values.yaml files | ||||||
updateParentRef.sh | updateParentRef.sh - update the parent reference in a POM file usage: updateParentRef.sh [-options] options | ||||||
updateRefs.sh | updateRefs.sh - updates the inter-repo references in Policy Framework POM files |
...