Build a Delivery¶
To install a service update, as well as customizations, is through deliveries.
The creation of deliveries is handled in the build place Lifecycle Experience, and that is the normal approach.
For customers that has been granted to build manually, the script create_build_structure should be used.
Make sure to read the install notes before you start. In some cases there are additional steps necessary before and/or after the installation.
In agreement with IFS, customers will be given the needed credentials to be able to download the binary artifacts using the ifs_fetch.cmd
Copy source to delivery¶
The changed source files that should be included in the delivery should be at hand. This can be done in two ways.
Get delivery code from one Git repository.¶
Using one git repo with both RnD released code merged with all customized code with git tags or known commit hashes.
- Makes sure to have cloned your customer solution Git repository locally.
- Generate a list of changed source files from the customer solution Git repository using ifs_git_diff script.
- Use ifs_create_build_structure script to create a delivery using the diff file list from the customer solution repo. e.g. all files that has changed between SU3 and SU4 and all customized files that has been modified to handle any change between SU3 and SU4..
Get delivery code from two Git repositories.¶
One git repo will hold the RnD released code tagged with releases and service updates. A second git repo will only hold the customized code also with git tags or known commit hashes.
- Makes sure to have cloned your customer solution Git repository locally.
- Makes sure to have cloned the RnD Git repository locally.
- Generate a list of changed source files from the RnD Git repository using ifs_git_diff script.
- Generate a list of changed source files from the customer solution Git repository using ifs_git_diff script.
- Use ifs_create_build_structure script to create a delivery using the diff file list from the RnD repo. e.g. all files that has changed between SU3 and SU4. Note! If the customer solution repo is additionally defined (parameter --custcomponents) when running this step, files listed to be copied from RnD repo that also exist in the customer solution repo (files are overtaken) will be ignored.
- Next use ifs_create_build_structure script to append the files in diff file list from the customer solution repo. e.g. all customized files that has been modified to handle any change between SU3 and SU4. (the --overwrite parameter is required to copy customized code on top of an already existing delivery)
You need to have full access to the build_home folder containing all source code.
Preparing a Delivery¶
Create a delivery structure of the component files by running the script ifs_create_build_structure from the build_home.
Example one repo:
C:\Work\build_home\build> .\ifs_git_diff.cmd --gitcheckout "C:\customer1\workspace" --fromtag "delvery1" --totag "delivery2" --filelistname "c:\temp\diff_file_list.txt"
C:\Work\build_home\build> ifs_create_build_structure.cmd --components C:\customer1\workspace --filelistname C:\temp\diff_file_list.txt --delivery C:\Work\delivery_001
Example with two repos:
C:\Work\build_home\build> .\ifs_git_diff.cmd --gitcheckout "C:\RnD_releases\workspace" --fromtag "release/22.1.3" --totag "release/22.1.4" --filelistname "C:\temp\rnd_diff_file_list.txt"
1) C:\Work\build_home\build> ifs_create_build_structure.cmd --components C:\RnD_releases\workspace --filelistname C:\temp\rnd_diff_file_list.txt --delivery C:\Work\delivery_001
or
2) C:\Work\build_home\build> ifs_create_build_structure.cmd --components C:\RnD_releases\workspace --custcomponents C:\customer1\workspace --filelistname C:\temp\rnd_diff_file_list.txt --delivery C:\Work\delivery_001
C:\Work\build_home\build> .\ifs_git_diff.cmd --gitcheckout "C:\customer1\workspace" --fromtag "delvery1" --totag "delivery2" --filelistname "C:\temp\cust_diff_file_list.txt"
C:\Work\build_home\build> ifs_create_build_structure.cmd --components C:\customer1\workspace --filelistname C:\temp\cust_diff_file_list.txt --delivery C:\Work\delivery_001 --overwrite
Note: The git repos must be checked out on the totag commit hash when copying the actual files with ifs_create_build_structure.
Run the script ifs_fetch.cmd with the arguments "user" "password" ifs_fetch.cmd/sh
Example:
C:\Work\build_home\build>ifs_fetch.cmd --user read_user --password DeYsdfIZxjl64th7eGhfd4qKu1 --delivery "C:\Work\delivery_001"
Define the parameter delivery and run the script ifs_build.cmd and accept the default values to compile all source code. (This will also generate database files to be deployed)
Example:
Open a command window in C:\Work\build_home\build
C:\Work\build_home\build>set DELIVERY=C:\Work\delivery_001
C:\Work\build_home\build>ifs_build.cmd
The delivery is now ready to be installed where all components are set to VersionUpToDate, which means that no *.cre or *.upg files will be executed with content.
Note! If the delivery contains new components or components that should be upgraded from earlier releases, the run the ifs_build.cmd with connection credentials instead to align the install.tem with the component status in the database
Example:
Open a command window in C:\Work\build_home\build
C:\Work\build_home\build>ifs_build.cmd --userName="ifsapp" --password="password"
--connectString="jdbc:oracle:thin:@(description=(address=(host=1.2.3.4)(protocol=tcp)(port=1521))(connect_data=(UR=A)(service_name=ifscloud)))"
Create build_home in Linux¶
All examples above are applicable for the Linux bash ( .sh ) scripts as well. To avoid execute privilege's issues start the script with a bash command
Example
$ bash ifs_build.sh