Government of Alberta - Nx plugin for OpenShift.


License
Apache-2.0
Install
npm install @abgov/nx-oc@1.3.1

Documentation

About the project

This is a monorepo of the Government of Alberta's custom plugins for Nx

Plugins

Nx OpenShift Plugin - includes generators for setting up OpenShift pipeline and application yaml files, and executors for oc cli commands.

Nx Dotnet Plugin - includes generators for setting up dotnet workspace configuration, and executors for dotnet cli commands.

Nx Release Plugin - includes generators for adding semantic-release based release targets.

Nx ADSP Plugin - includes generators for application, service, and fullstack solution quick starts.

Quick start

  1. Create workspace and install plugins.

    npx create-nx-workspace my-project --preset empty --nx-cloud false
    
    cd my-project
    
    # Install @abgov plugins.
    npm i -D @abgov/nx-oc @abgov/nx-dotnet @abgov/nx-adsp
    
    # Install peer dependencies depending on desired frameworks.
    npm i -D @nrwl/angular@^11.5.2  
  2. Generate oc pipeline manifests and resources. Apply the pipeline to OpenShift requires oc cli to be installed and already logged in.

    npx nx g @abgov/nx-oc:pipeline
    ? What should be the name of the oc pipeline? my-project-ci
    ? What project should be used for build infrastructure? my-project-build
    ? Generate a Jenkins (jenkins) based pipeline or a GitHub Actions (actions) pipeline? actions
    ? What projects should be used for environments (dev test staging prod)? my-project-dev my-project-test ...
    ? Apply the pipeline to OpenShift? No
  3. Generate dotnet workspace.

    npx nx g @abgov/nx-dotnet:workspace
  4. List the available application generators.

    npx nx list @abgov/nx-adsp
  5. Generate an application.

    npx nx g @abgov/nx-adsp:angular-app my-angular-app
  6. Generate a backend service.

    npx nx g @abgov/nx-adsp:dotnet-service my-dotnet-service