...
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.
Release Phases
In each phase run getReleaseData.sh followed by releasePhase.sh.
Code Block |
---|
|
% 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 |
Phase | Actions Performed |
---|
1 | Update 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 |
5 | Update snapshots in policy/common Update snapshots in policy/docker Update policy/parent and policy/common references in policy/models |
6 | Stage release on policy/models in Gerrit Release policy/models Maven artifacts |
7 | Release policy/models Docker images |
8 | Update 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 | Stage 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 Gerrit Stage release on policy/apex-pdp in Gerrit Stage release on policy/drools-pdp in Gerrit Stage release on policy/xacml-pdp in Gerrit Release policy/api Maven artifacts Release policy/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 |
11 | Update 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 |
15 | Store the updated pf_release_data.sh file in policy/parent |
Branching the Repositories
Branching 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.
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.
...
Subsequent phases proceed in a similar manner with executions of getReleaseData.sh followed by executions of releasePhase.sh.
Branching the Repositories
Branching 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.
Appendix I: Release Script Usage
Script | Description |
---|
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 ... |
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
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 -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 |
...