We use custom Git hooks to test the format of our commit messages to ensure that they meet the required standard. These custom hooks are stored in the folder .custom-hooks so that they can be maintained on BitBucket.
Use git config core.hooksPath .custom-hooks to configure Git to use the custom hooks directory instead of the default hooks.
Note: if you're using a GUI Git client, such as GitKraken, you'll need to manually copy the .custom-hooks files to .git/hooks/ as these clients might not support core.hooksPath.
This project uses the Maven Cargo plugin to run Essentials, the CMS and site locally in Tomcat. From the project root folder, execute:
mvn clean verify
mvn -P cargo.run
Alternatively, developers might prefer to run a quicker version were UI packages are not built. Please, note that the full run is advised every time the branch is changed or when front end changes are expected.
Unix Based Console
mvn clean verify -P \!fed-build -DskipTests && mvn -P cargo.run
or
mvn clean verify -P !fed-build -DskipTests && mvn -P cargo.run
To define the configuration follow the next steps:
- Create a new running configuration by clicking Edit Configuration... in the drop down next to the Run Button
- Click on Add new Configuration ("+" Button)
- Select the type Remote JVM Debug
- Change the port to 8000
- Apply Changes
- Click the Debug button next to the Run button in the bar.(The CMS needs to be running for this configuration to work)
Run the debugger in a different port:
mvn -P cargo.run -Dcargo.debug.address=9000
The database actuator can be activated by adding the variable cliOptions=dbActuator
mvn clean verify -P!fed-build -DskipTests -DcliOptions=dbActuator && mvn -Pcargo.run
This is a bunch of useful URLs for local development
- http://localhost:8080/site: Display the site that would be presented to the final Internet User. Unpublished documents will not be available.
- http://localhost:8080/cms: CMS (Content Management System) tool for managing the content
- http://localhost:8080/cms/console: JCR Console that contains the configuration and the data of the CMS
- http://localhost:8080/cms/repository: Query tool for the JCR Console. It can be queried through xPath or JCR
- http://localhost:8080/essentials: Out-of-the-box set of tools that add some extra capabilities to the CMS
- http://localhost:8080/actuator: Actuators functionality that exposes information about the architecture of the application
- Username: admin
- Password: admin (Do not share it. It is a secret)
Windows Based Console
mvn clean verify -P !fed-build -DskipTests
mvn -P cargo.run
or
mvn clean verify -P !fed-build -DskipTests &&mvn -P cargo.run
Before merging any changes, it’s important to validate them in an integrated environment. The steps differ slightly depending on whether you are introducing new data or modifying existing functionality.
If your change introduces new data (i.e. new field or module for the front end to consume), it must first be validated through the Resource API. This ensures the data is correctly structured, accessible, and behaves as expected before UI or workflow testing begins.
If your change may affect the existing UI, you can validate it using a temporary environment generated by Jenkins.
Follow these steps:
- Navigate to the Jenkins instance: https://jenkinssb.visitscotland.com/job/wvc/job/feature.visitscotland.com-delivery-api
- Locate the Relevant Job: Go to the Pull Requests tab and Find the job whose name matches your GitHub PR number.
- Open the Environment Details: In the job sidebar, click VS Environment Details. Alternatively this information can be found at the bottom of the Console log.
- Access the Integrated Environment: On the Environment Details page, the first link provides access to the temporary environment created for your PR. Open it to validate your UI changes end‑to‑end. After clicking on the first link you can use the rest of the links on that page to access to the different tools of the environment (i.e. CMS, Logs, etc.)
The commands to start and complete the release are the following
ci/start-release.sh
ci/finish-release.sh
You can check more in depth documentation in this page
I get the following error when I try to clone the message: fatal: cannot create directory at '{some big path}': Filename too long
Git has a limit of 260 characters for a filename in Windows when Git is compiled with msys. You can circumvent the issue by executing the following command:
git config --system core.longpaths true
The front-end build doesn't finish or finish with an exception
To be documented
QuickFix: Install NPM and Yarn manually with the versions specified in ui-integration/pom.xml
The Bloomreach Experience Manager Configuration Verifier, brXM CV or just CV in short, is a tool to support projects and developers during the upgrade between major Bloomreach Experience Manager releases, and is available to Bloomreach Experience Manager customers and partners.
-
Execute the following commands:
mvn -P create-configuration-verifier-config mvn -P cargo.run,verify-configuration