diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 0000000000000000000000000000000000000000..007dce3ec456d2b7d5340ad0879a76b9a53747ff --- /dev/null +++ b/bitbucket-pipelines.yml @@ -0,0 +1,27 @@ +# Template maven-build + +# This template allows you to test and build your Java project with Maven. +# The workflow allows running tests, code checkstyle and security scans on the default branch. + +# Prerequisites: pom.xml and appropriate project structure should exist in the repository. + +image: maven:3.6.3 + +pipelines: + default: + - parallel: + - step: + name: Build and Test + caches: + - maven + script: + - mvn -B verify --file pom.xml + after-script: + # Collect checkstyle results, if any, and convert to Bitbucket Code Insights. + - pipe: atlassian/checkstyle-report:0.2.0 + - step: + name: Security Scan + script: + # Run a security scan for sensitive data. + # See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security + - pipe: atlassian/git-secrets-scan:0.4.3 \ No newline at end of file diff --git a/goofy-client/package.json b/goofy-client/package.json index 7230ec212b24f992fe1c514cfbdaa4edfc495944..a2dc6a217896b885dca8b3a7bc7ab185dc04a4d0 100644 --- a/goofy-client/package.json +++ b/goofy-client/package.json @@ -9,6 +9,8 @@ "start": "run-s \"ng -- serve --port 4300 --disable-host-check --proxy-config proxy.conf.json\" --", "build": "ng build", "test": "ng test", + "ci-build": "ng build", + "ci-test": "ng test", "lint": "nx workspace-lint && ng lint", "e2e": "ng e2e", "affected:apps": "nx affected:apps", diff --git a/goofy-client/pom.xml b/goofy-client/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..eff5d29fe397f4805c80f007c52e5abc18918a43 --- /dev/null +++ b/goofy-client/pom.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <parent> + <groupId>de.itvsh.ozg</groupId> + <artifactId>goofy</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>goofy-client</artifactId> + <packaging>pom</packaging> + + <build> + <plugins> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <filesets> + <fileset> + <directory>dist</directory> + <includes> + <include>*</include> + <include>**/*</include> + </includes> + </fileset> + </filesets> + </configuration> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>3.0.0</version> + <executions> + + <execution> + <id>test-application</id> + <phase>test</phase> + <configuration> + <workingDirectory>./</workingDirectory> + <executable>npm</executable> + <arguments> + <argument>run</argument> + <argument>ci-test</argument> + </arguments> + </configuration> + <goals> + <goal>exec</goal> + </goals> + </execution> + + <execution> + <id>build-application</id> + <phase>compile</phase> + <configuration> + <workingDirectory>./</workingDirectory> + <executable>npm</executable> + <arguments> + <argument>run</argument> + <argument>ci-build</argument> + </arguments> + </configuration> + <goals> + <goal>exec</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <activation> + <property> + <name>!skipNpmInstall</name> + </property> + </activation> + <id>npmInstall</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>install-dependencies</id> + <phase>generate-sources</phase> + <configuration> + <workingDirectory>./</workingDirectory> + <executable>npm</executable> + <arguments> + <argument>install</argument> + </arguments> + </configuration> + <goals> + <goal>exec</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/pom.xml b/pom.xml index 23128e2f238fabba1833e440187d3313f5c8d99a..04146c088f9b509b45c682a1048f1c9cedb14825 100644 --- a/pom.xml +++ b/pom.xml @@ -10,6 +10,7 @@ <packaging>pom</packaging> <modules> + <module>goofy-client</module> <module>goofy-server</module> <module>goofy-api</module> <module>goofy-service</module>