Oracle OAC projects can either source catalog objects from either a source code repository or Development development OAC instances. In your OAC project, which is used to build and deploy WebCatalog objects, you will either have the option to Populate to Discover from Git (or other another SCM type) or Populate from OAC Web Catalog on the files tab based on your configuration Discover from Oracle Analytics Cloud within the File Catalog. Similar to other technologies, FlexDeploy can sync synchronize files from between a development server to and a source code repository. This helps implement , promoting the implementation of DevOps best practices to for source control -controlling developer code.
Tip |
---|
The OAC plugin manipulates modifies the file extensions and paths of exported /or downloaded objects in order to establish metadata about for each object. For this reasonitem. As a result, you cannot simply download the .catalog files from the OAC catalog manager and place them in directly into source control. This would not be compatible , as this would be incompatible with the build and deploy deployment operations of the OAC plugin. To simplify this process, FlexDeploy provides offers OAC export and download operations to simplify so that you do not need to manipulate the files manually with the required , eliminating the need for manual manipulation of files, ensuring the correct structure and extensions are maintained. |
exportWebCatalog (OAC)
This operation is useful when you want need to export specific files from OAC. This an Analytics Cloud instance using a package. It is managed through a package within a package-based deployment project (project with the SCM type set to "None," which is separate from the project that is used for build and deploy. The build/deploy ).Ensure project classification is Packageis configured with the SCM type set to "Git" or some other SCM type.
Ensure project classification is Package-Based Deployments and project type is Oracle Analytics Cloud. Your project for this purpose may look something like this.
...
Similar to other projects, you will set up configure project properties to indicate specify the folder that you will be 're working with from the catalog. Our purpose The goal is to extract files from a development server and commit them to Git with , making necessary changes in to file and/names or extension names. Note that you are using this as extensions. This process is part of the build workflow. You can implement one of two options - 1) standard build/deploy from the 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 the SCM of your choice.Now let's talk about Now, let's go through the Extract WebCatalog workflow. This workflow will execute 6 steps as shown below.consists of following steps:
Clone the git Git repository where the objects are stored.
Extract WebCatalog files into the local git Git repository folder. Extract will be generally done Extraction typically occurs from the development environment. Number The number of objects extracted will depend depends on whether an "All Files" or "Package" build is executingexecuted.
Add any new files to the local git Git repository.
Commit any changes to the local git Git repository. It is possible that nothing is found to commit if there were If no changes are found on the development server, nothing will be committed.
Push changes to the remote repository.
...
Here is the source code for the build workflow. You will need to update the steps in the workflow according to your Git configuration (e.g. Git Instance, sparse checkout folder, etc.). Also, keep in mind that we are running this build against the master branch (stream), if you want to commit on a different branch then create the stream on the project as appropriate.
...
title | Sample Workflow |
---|
main branch (stream), if you want to commit on a different branch then create the stream on the project as appropriate.
Tip |
---|
We are referencing Git in the example above, but plugins exist for many other popular source control management systems as well and a similar workflow can be created to accomplish the same task. |
Code Block | ||
---|---|---|
| ||
name: Extract OAC WebCatalog
description: ''
steps:
- id: '1'
name: Git Clone
type: INVOKE_PLUGIN
data:
pluginName: FlexagonGITPlugin
pluginOperation: clone
inputs:
- name: FDGIT_INP_INSTANCE_CODE
value:
value: FLEXTEST
isExpression: false
isEncrypted: false
- name: FDGIT_INP_DEST_SUBFOLDER
value:
value: ../oacfiles
isExpression: false
isEncrypted: false
- name: FDGIT_INP_BRANCH
value:
value: mastermain isExpression: false isEncrypted: false - name: FDGIT_INP_TREELESS_CLONE value: value: 'false' isExpression: false isEncrypted: false - name: FDGIT_INP_DEPTH value: value: '1' isExpression: false isEncrypted: false - name: FDGIT_INP_SPARSE_CHECKOUT_FOLDERS value: value: '' isExpression: false isEncrypted: false endpointInstanceOverride: isExpression: false consumesArtifacts: false producesArtifacts: false endpointSelection: choice: All endpointExecution: choice: Any outputs: [] userInputs: [] userOutputs: [] - id: '2' name: exportWebCatalog type: INVOKE_PLUGIN data: pluginName: FlexagonOACPlugin pluginOperation: exportWebCatalog inputs: - name: FDOAC_INP_EXPORT_FOLDER value: value: ../oacfiles/OACCatalog isExpression: false isEncrypted: false - name: FDOAC_INP_COPY_PERMISSIONS value: value: 'true' isExpression: false isEncrypted: false - name: FDOAC_INP_PRESERVE_TIMESTAMPS value: value: 'false' isExpression: false isEncrypted: false endpointInstanceOverride: isExpression: false consumesArtifacts: false producesArtifacts: false endpointSelection: choice: All endpointExecution: choice: Any outputs: [] userInputs: [] userOutputs: [] - id: '3' name: Add any new Files type: INVOKE_PLUGIN data: pluginName: FlexagonGITPlugin pluginOperation: add inputs: - name: FDGIT_INP_INSTANCE_CODE value: value: FLEXTEST isExpression: false isEncrypted: false - name: FDGIT_INP_DEST_SUBFOLDER value: value: ../oacfiles isExpression: false isEncrypted: false - name: FDGIT_INP_FILELIST value: value: '--all .' isExpression: false isEncrypted: false endpointInstanceOverride: isExpression: false consumesArtifacts: false producesArtifacts: false endpointSelection: choice: All endpointExecution: choice: Any outputs: [] userInputs: [] userOutputs: [] - id: '4' name: Commit to Git type: INVOKE_PLUGIN data: pluginName: FlexagonGITPlugin pluginOperation: commit inputs: - name: FDGIT_INP_INSTANCE_CODE value: value: FLEXTEST isExpression: false isEncrypted: false - name: FDGIT_INP_DEST_SUBFOLDER value: value: ../oacfiles isExpression: false isEncrypted: false - name: FDGIT_INP_NAME value: value: FD_WF_USER isExpression: true isEncrypted: false - name: FDGIT_INP_EMAIL value: value: FD_WF_USER_EMAIL isExpression: true isEncrypted: false - name: FDGIT_INP_REVISION_MESSAGE value: value: OAC files added from flexdeploy workflow. isExpression: false isEncrypted: false endpointInstanceOverride: isExpression: false consumesArtifacts: false producesArtifacts: false endpointSelection: choice: All endpointExecution: choice: Any outputs: [] userInputs: [] userOutputs: [] - id: '5' name: Push to Central Repository type: INVOKE_PLUGIN data: pluginName: FlexagonGITPlugin pluginOperation: push inputs: - name: FDGIT_INP_INSTANCE_CODE value: value: FLEXTEST isExpression: false isEncrypted: false - name: FDGIT_INP_DEST_SUBFOLDER value: value: ../oacfiles isExpression: false isEncrypted: false - name: FDGIT_INP_BRANCH value: value:master main isExpression: false isEncrypted: false - name: FDGIT_INP_FOLLOW_TAGS value: value: 'false' isExpression: false isEncrypted: false endpointInstanceOverride: isExpression: false consumesArtifacts: false producesArtifacts: false endpointSelection: choice: All endpointExecution: choice: Any outputs: [] userInputs: [] userOutputs:[] Tip | []
|
downloadWebCatalog (OAC)
This operation will also export/download also exports or downloads objects from the OAC WebCatalog. The key difference is that this operation it does not require a packagePackage-based deployment project and can be called from executed directly within a utility workflow.
Ensure project classification is Utility. Your project for this purpose may look something like this:
...
Now, let's talk about discuss the Download WebCatalog workflow. This workflow will execute 6 consists of steps as shown outlined below.:
Clone the git Git repository where the objects are stored.
Download WebCatalog files into the local git Git repository folder. The download will be generally from a development environment. All typically occurs from the development environment, and all files from the specified path will be downloaded.
Add any new files to the local git Git repository.
Commit any changes to the local git Git repository. It is possible that nothing is found to commit if there were If there are no changes found on the development server, no files will be committed.
Push changes to the remote repository.
...
Here is the source code for the utility workflow. You will need to update this workflow to indicate project Git instance code and sparse checkout folder for catalog objects:
Expand | title | Sample Workflow
---|
Tip |
We are referencing Git in the example above, but plugins exist for many other popular source control management systems as well, and a similar workflow can be created to accomplish the same task. |
Code Block | ||
---|---|---|
| ||
name: Download OAC WebCatalogs
description: ''
steps:
- id: '1'
name: Git Clone
type: INVOKE_PLUGIN
data:
pluginName: FlexagonGITPlugin
pluginOperation: clone
inputs:
- name: FDGIT_INP_INSTANCE_CODE
value:
value: FLEXTEST
isExpression: false
isEncrypted: false
- name: FDGIT_INP_DEST_SUBFOLDER
value:
value: ../oacfiles
isExpression: false
isEncrypted: false
- name: FDGIT_INP_BRANCH
value:
value: main
isExpression: false
isEncrypted: false
- name: FDGIT_INP_TREELESS_CLONE
value:
value: 'false'
isExpression: false
isEncrypted: false
- name: FDGIT_INP_DEPTH
value:
value: '1'
isExpression: false
isEncrypted: false
- name: FDGIT_INP_SPARSE_CHECKOUT_FOLDERS
value:
value: ''
isExpression: false
isEncrypted: false
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
outputs: []
userInputs: []
userOutputs: []
- id: '2'
name: downloadWebCatalog
type: INVOKE_PLUGIN
data:
pluginName: FlexagonOACPlugin
pluginOperation: downloadWebCatalog
inputs:
- name: FDOAC_INP_OBJECT_PATH
value:
value: /shared/Custom
isExpression: false
isEncrypted: false
- name: FDOAC_INP_DOWNLOAD_FOLDER
value:
value: ../oacfiles/OACCatalog
isExpression: false
isEncrypted: false
- name: FDOAC_INP_COPY_PERMISSIONS
value:
value: 'true'
isExpression: false
isEncrypted: false
- name: FDOAC_INP_PRESERVE_TIMESTAMPS
value:
value: 'false'
isExpression: false
isEncrypted: false
- name: FDOAC_INP_DISCOVER_SUB_ITEMS
value:
value: Scorecard,Dashboard Group
isExpression: false
isEncrypted: false
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
outputs: []
userInputs: []
userOutputs: []
- id: '3'
name: Add any new Files
type: INVOKE_PLUGIN
data:
pluginName: FlexagonGITPlugin
pluginOperation: add
inputs:
- name: FDGIT_INP_INSTANCE_CODE
value:
value: FLEXTEST
isExpression: false
isEncrypted: false
- name: FDGIT_INP_DEST_SUBFOLDER
value:
value: ../oacfiles
isExpression: false
isEncrypted: false
- name: FDGIT_INP_FILELIST
value:
value: '--all .'
isExpression: false
isEncrypted: false
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
outputs: []
userInputs: []
userOutputs: []
- id: '4'
name: Commit to Git
type: INVOKE_PLUGIN
data:
pluginName: FlexagonGITPlugin
pluginOperation: commit
inputs:
- name: FDGIT_INP_INSTANCE_CODE
value:
value: FLEXTEST
isExpression: false
isEncrypted: false
- name: FDGIT_INP_DEST_SUBFOLDER
value:
value: ../oacfiles
isExpression: false
isEncrypted: false
- name: FDGIT_INP_NAME
value:
value: FD_WF_USER
isExpression: true
isEncrypted: false
- name: FDGIT_INP_EMAIL
value:
value: FD_WF_USER_EMAIL
isExpression: true
isEncrypted: false
- name: FDGIT_INP_REVISION_MESSAGE
value:
value: OAC files added from flexdeploy workflow.
isExpression: false
isEncrypted: false
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
outputs: []
userInputs: []
userOutputs: []
- id: '5'
name: Push to Central Repository
type: INVOKE_PLUGIN
data:
pluginName: FlexagonGITPlugin
pluginOperation: push
inputs:
- name: FDGIT_INP_INSTANCE_CODE
value:
value: FLEXTEST
isExpression: false
isEncrypted: false
- name: FDGIT_INP_DEST_SUBFOLDER
value:
value: ../oacfiles
isExpression: false
isEncrypted: false
- name: FDGIT_INP_BRANCH
value:
value: main
isExpression: false
isEncrypted: false
- name: FDGIT_INP_FOLLOW_TAGS
value:
value: 'false'
isExpression: false
isEncrypted: false
endpointInstanceOverride:
isExpression: false
consumesArtifacts: false
producesArtifacts: false
endpointSelection:
choice: All
endpointExecution:
choice: Any
outputs: []
userInputs: []
userOutputs: []
Tip | |
Tip |
---|
For Git, if you want the files placed in a sub-directory rather than the root of the repository, be sure to set the following on your workflow:
|
...