...
The scripts make the following assumptions:
- 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
- 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
During a normal release, the most important scripts are the getReleaseData.sh script and the releasePhase.sh script.
getReleaseData.sh creates the file pf_release_data.csv for a specified branch. This file is used by the release process to keep track of where it is. It has the following 5 columns:
- Repo: The repository to which this row of the file refers
- Last Tag Version: The last hard release version of this repository on this branch
- Snapshot Version: The current snapshot version of this repository on this branch
- Changed Files: The number of files that are changed between the Last Tag Version and the Snapshot Version
- Docker Images: A list of the Docker images generated on this repository, which can be none
getReleaseData.sh recreates the pf_release_data.sh each time it is executed so as the release proceeds through its phases, the content of the file changes. The script has a list of the 13 Policy Framework repositories, and for each repository it:
- Checks out the specified branch, pulls the latest changes, and rebases the repository
- Runs a "mvn clean" command on the repository to determine its current snapshot
- Reads the tags on the repository and determines what the latest tag on this branch of the repository is
- Runs a "git diff" command to detemine the number of changed files between the latest tag and the current snapshot
- Reads the releases/x.x.x-container.yaml file to find the docker images generated by the repository
Performing an Interim Release
...