Versions Compared

Key

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

...

  • All 13 Policy Framework repositories are freshly cloned into a directory called policy
    policy/parent

    policy/common
    .........
  • There are no updates or pending commits on any of the cloned repositories
  • You have checked out the scripts and added their location to your PATH
  • All references between Policy Framework Maven modules are in the root POM in each repository
  • All references between Policy Framework Maven modules are controlled by the following properties in root pom.xml files
    • policy.common.version or version.policy.common: policy/common

    • policy.models.version or version.policy.models: policy/models

    • policy-drools-pdp.version or version.policy.drools-pdp: policy/drools-pdp

    • policy-apex-pdp.version or version.policy.apex-pdp: policy/apex-pdp
  • All files that match the regular expression '*Docker*' and have their base image matching the regular expression 'FROM onap\/policy-j[d|r][k|e]-alpine:)[0-9]*.[0-9]*.[0-9].*$' will have their base image changed to the appropriate policy-jre-alpine or policy-jdk-apline version for the phase in question

Getting Release Data and Performing a Release Phase

During a normal release, the most important scripts are the getReleaseData.sh script and the releasePhase.sh script.

...

releasePhase.sh is an orchestration script that runs the 14 phases in the release process. It calls the other scripts in the script set to perform whatever actions are required at each phase in the execution process. It has a function that codifies each phase of the release.

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.

Each phase of the release is executed by calling getReleaseData.sh to update the status of the release phase followed by releasePhase.sh to actually perform the release. Note that it is safe to run getReleaseData.sh multiple times in a single release. This may be necessary if, for example, the merge job for a release commit is slow to run causing a phase to complete slowly. Always keep an eye on the output of getReleaseData.sh to verify that the release is proceeding correctly.

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
languagebash
% 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

We have also created a JIRA called POLICY-112911 to cover the task of performing the release.

Phase 1: Update parent references

Note

Note that the -l parameter is pointing to the location of the checked out Policy Framework repositories (onap/policy/parent, onap/policy/common etc) and -b specifies the branch to sue for the release. If the -b option is not specified, the master branch is used.


Code Block
languagebash
% 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.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'
Code Block
languagebash
% ls onap/policy
apex-pdp	clamp			distribution	drools-applications	gui			pap			xacml-pdp
api			common			docker			drools-pdp		models			parent

Branching the Repositories

...