Skip to content

Setting Up the IPA Plugins on Your Machine ​

Follow these instructions to set up the IPA Plugins on your local machine:

1. Clone the Repository ​

Clone the repo from the following link: https://dev.azure.com/investec/client-channel-tech/_git/cxt-channel-ipa-plugins

2. Install Dependencies ​

Next, run the following command in your terminal:

shell
 npm install

You are now ready to start working with the IPA Plugins!

3. Optional: Add your own plugin ​

Command to create a new plugin ​

shell
nx g lib my-plugin

for all the questions asked, make sure you select the options that include vite.

Configure the package.json file ​

In the package.json file, change the package name to the following naming standard

json
{
  "name": "@investec/ipa-plugin-my-plugin"
}

and remove the private: true flag.

Configure the plugin pipeline ​

In the root of your plugin folder , add a new .azure-pipelines.yml file. Now copy the following code snippet into the file and replace all instances of my-plugin with your plugin name.

yaml
trigger:
  branches:
    include:
      - main
  paths:
    include:
      - my-plugin/*
pool:
  vmImage: 'ubuntu-latest'

variables:
  - group: cxt-channel-investec-online-apps-cf-config

steps:
  - task: NodeTool@0
    inputs:
      versionSpec: '18.x'
    displayName: 'install node.js 18.x'

  - task: npmAuthenticate@0
    inputs:
      workingFile: '.npmrc'
    displayName: 'npm authenticate'

  - script: |
      echo "npm install.."
      npm install
      echo "Build package"
      npx nx build my-plugin
    displayName: 'Build @investec/ipa-plugin-my-plugin'

  - task: Npm@1
    displayName: Publish Package
    inputs:
      command: 'publish'
      workingDir: './dist/my-plugin'
      publishRegistry: 'useFeed'
      publishFeed: 'af1d0aa9-75bb-4ec8-8c52-a8e3bedde160'

Configure the azure pipelines ​

Create a PR for your new plugin and once approved you need to configure the pipeline in the azure devops portal.

  1. Go to the Azure DevOps portal
  2. Click on the New Pipeline button
  3. Select the Azure Repos Git option
  4. Select the cxt-channel-investec-plugins repo
  5. Select the Existing Azure Pipelines YAML file option
  6. Select the main branch
  7. Select the feature-library/my-plugin/.azure-pipelines.yml file
  8. Click on the Run button
  9. Rename your plugin to add it to the following directory structure: cxt-channel-ipa-plugins/my-plugin