Skip to content

Commit

Permalink
Frontend modules now use github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dcrossleyau committed Mar 12, 2024
1 parent 9b6c6e0 commit 9dcf3e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 54 deletions.
4 changes: 3 additions & 1 deletion guidelines/create-new-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Add a concise "About" description to the GitHub repository. Consider that this w
(If the "Edit" button is not available to you, then see the "support" advice above.)

Note: The configuration of "branch protection" and its "required checks" can only be done after there has been an initial pull-request (and must be done within one week of its opening).
Also, for [front-end](#add-specific-configuration-files) repositories, the GitHub Actions Workflows need to be operational.

## Add initial files

Expand Down Expand Up @@ -105,7 +106,8 @@ For front-end modules: package.json, .eslintrc, GitHub Workflows, etc.

Get the initial basic source files and other configuration files added first.

New front-end repositories will use GitHub Actions Workflows (see our [document](/guidelines/github-actions-frontend/)).
New front-end repositories will use GitHub Actions Workflows (see our [document](/guidelines/github-actions-frontend/)
or follow an existing similar repository).

When the code and configuration is in place, then this new repository needs to be manually added to Sonarcloud.
Seek FOLIO DevOps [assistance](/faqs/how-to-raise-devops-ticket/).
Expand Down
7 changes: 1 addition & 6 deletions guides/commence-a-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ The `CHANGELOG.md` lists the main changes for each release. Follow how the other
This is a typical directory layout, excluding the general boilerplate files and the usual JavaScript and CSS files:

```
├── Jenkinsfile
├── .github/workflows/
├── data/
│   ├── various
├── doc/
Expand All @@ -205,11 +205,6 @@ This is a typical directory layout, excluding the general boilerplate files and
   ├── en.json
```

### Jenkinsfile {#front-end-jenkinsfile}

The `Jenkinsfile` declares specific build steps for the continuous integration [process](/guides/automation/#jenkins).
See [explanation](/guides/jenkinsfile).

### package.json {#front-end-packagejson}

See the "[Stripes application metadata bundles](https://github.com/folio-org/stripes-core/blob/master/doc/app-metadata.md)"
Expand Down
49 changes: 2 additions & 47 deletions guides/jenkinsfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The library primarily supports two types
of development environments at this time -- Java-based Maven projects and Nodejs-based projects.

The files and main parameters are explained below for
[back-end](#back-end-modules) and [front-end](#front-end-modules) modules.
[back-end](#back-end-modules).

Each parameter can be omitted to accept the default.

Expand Down Expand Up @@ -81,52 +81,7 @@ multi-call binary that contains `wget` with reduced number of options.

## Front-end modules

A typical Stripes or UI module Jenkinsfile configuration might look like the following.
See an example at
[ui-orders/Jenkinsfile](https://github.com/folio-org/ui-orders/blob/master/Jenkinsfile).

(**Note**: Front-end modules are gradually being migrated to use GitHub Actions Workflows. So for those, Jenkinsfile is not relevant.)

```
buildNPM {
buildNode = 'jenkins-agent-java11'
publishModDescriptor = true
runLint = true
runTest = true
runTestOptions = '--karma.singleRun --karma.browsers=ChromeDocker'
runRegression = 'partial'
}
```

* `buildNode` -- The Jenkins node to run the CI build.
The default is `'jenkins-agent-java11'` if not specified (this utlises Node.js v14).
The other available option is `'jenkins-agent-java17'` (this utlises Node.js LTS v16).
Of course the CI does not use Java for front-end modules, but that is the naming convention for the build nodes.
* `publishModDescriptor` -- If a FOLIO Module Descriptor is defined in its [package.json](/guides/commence-a-module/#front-end-packagejson)
then the ModuleDescriptor.json will be generated and published to the FOLIO Module Descriptor registry.
(Default: false)

* `runLint` -- Execute 'yarn lint' as part of the build. Ensure a 'lint' run script is
defined in package.json before enabling this option.
(Default: false)

* `runTest` -- Execute 'yarn test' as part of the build. Ensure a 'test' run script is
defined in package.json. 'test' is typically used for unit tests.
(Default: false)

* `runTestOptions` -- Provide 'yarn test' with additional options.
The example shows options for karma-based testing.

* `sonarScanDirs` -- List of directories (comma-separated string) that the Sonarqube scanner should scan.
(Default: './src')

* `runRegression` -- Execute the UI regression test suite from 'ui-testing' against a real
FOLIO backend. Option 'full' will execute the full test suite. Option 'partial' will execute only tests
specific to the UI module. Option 'none' will disable regression testing.
(Default: 'none')

* `stripesPlatform` -- Specify which Stripes platform.
(Default: 'none', so build in "app" context.)
**Note**: Front-end modules are being migrated to use GitHub Actions Workflows. So for those, Jenkinsfile is not relevant.

## Further information

Expand Down

0 comments on commit 9dcf3e9

Please sign in to comment.