Automate check-in of development catalog items to SCM
Oracle OBIEE projects can either source catalog objects from a source code repository or Development OBIEE instances. In your OBIEE project used to build and deploy WebCatalog objects you will either have the option to Populate from Git (or other SCM type) or Populate from OBIEE Web Catalog on files tab of your project. Similar to other technologies, FlexDeploy can sync files from a development server to a source code repository. This helps implement DevOps best practices to source control developer code.
The OBIEE plugin manipulates the file extensions and paths of exported/downloaded objects in order to establish metadata about each object. For this reason, you cannot simply download the .catalog files from the OBIEE catalog manager and place them in source control. This would not be compatible with the build and deploy operations of the OBIEE plugin. FlexDeploy provides OBIEE export and download (new in 5.6.0.6) operations to simplify so that you do not need to manipulate the files manually with the required structure and extensions.
obiExtractForSCM
This operation is useful when you want export specific files from OBIEE. This is managed through a package within a partial deployment project (separate from the project that is used for build/deploy).
Ensure project classification is Partial Deployments and project type is Oracle Transactional BI. Your project for this purpose may look something like this.
Similar to other projects, you will setup project properties to indicate folder that you will be working with from catalog. Our purpose is to extract files from development server and commit to Git with necessary changes in file and/or extension names. Note that you are using this as part of build workflow. You can implement one of two options - 1) standard build/deploy from development server with check-in to SCM for historical reference. or 2) standard build/deploy from SCM with this project executing extract from Development and check-in to SCM. With either option, you end up with code being managed in SCM of your choice.
Now let's talk about Extract WebCatalog workflow. This workflow will execute 6 steps as shown below.
- Clone git repository where objects are stored.
- Extract WebCatalog files in to local git repository folder. Extract will be generally done from development environment. Number of objects extracted will depend on whether All Files or Package build is executing.
- Add any new files in local git repository.
- Commit any changes to local git repository. It is possible that nothing is found to commit if there were no changes on development server.
- Push changes to remote repository.
Here is source code for the workflow. You will need to update this workflow to indicate project Git instance code and sparse checkout folder for catalog objects. Also, keep in mind that we are running this build against master branch(stream), if you want to commit on different branch then create stream on project appropriately.