Skip to content

Commit

Permalink
Merge branch 'feature/v2-development'
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3te committed Mar 6, 2019
2 parents 13ee75c + d8d5e28 commit 0f25121
Show file tree
Hide file tree
Showing 123 changed files with 610 additions and 13,355 deletions.
124 changes: 122 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# JenkinsHue [![Build Status](https://travis-ci.org/adessoAG/JenkinsHue.svg?branch=master)](https://travis-ci.org/adessoAG/JenkinsHue)

This is the implementation of my IHK project (Fiete Wennier, June 2016). It shows the state of multiple jenkins builds using Philips hue lamps. The application can handle multiple lamps und bridges (Philips products).
The application shows the state of multiple jenkins builds using Philips hue lamps. It can handle multiple lamps und bridges (Philips products). Originally this was the implementation of my IHK projekt (Fiete Wennier, June 2016).

![screenshot1](https://github.com/fi3te/JenkinsHue/blob/master/doc/screenshot1.png)
## Version 1.0.0

![screenshot1](https://github.com/adessoAG/JenkinsHue/blob/master/doc/screenshot1.png)

## Version 2.x.x

![screenshot2](https://github.com/adessoAG/JenkinsHue/blob/master/doc/screenshot2.png)


## Getting started
Expand All @@ -23,6 +29,8 @@ docker-compose up
- Visit [http://localhost:8484/](http://localhost:8484/)
- If no ldap connection is specified you can login with username = password (property 'admins')

### Docker setup for version 1.0.0 (discontinued)

1) docker-compose.yml with an in-memory database
```
version: '2'
Expand Down Expand Up @@ -101,6 +109,118 @@ services:

The docker image can be found [here](https://hub.docker.com/r/fi3te/jenkins-hue/).


### Docker setup for version 2.x.x (recommended)

1) docker-compose.yml with an in-memory database
```
version: '3'
services:
jh-backend:
restart: always
image: fi3te/jenkins-hue:version-2.0.0
container_name: jh-backend
environment:
- "TZ=Europe/Berlin"
- jenkins.url=TODO
- jenkins.userName=TODO
- jenkins.password=TODO
- admins=admin1
# OPTIONAL
# - ldap.server.domain=
# - ldap.server.url= e.g. ldaps://xxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxx.de
# - ldap.server.userSearchFilter= e.g. (&(xxxxxxxxxxxxxxxxxxxxx={0})(objectclass=user))
# - ldap.server.userSearchBase=
# - ldap.server.groupSearchBase=
# - ldap.server.userDn= e.g. CN=xxxxxxxxxxxxxxxxxxxxx,OU=xxxxxxxxxxxxxxxxxxxxx,DC=xxxxxxxxxxxxxxxxxxxxx
# - ldap.server.userName=
# - ldap.server.password=
# - trust-store= e.g. filename.ending
# - trust-store-password=
expose:
- "8484"
networks:
- app-network
jh-frontend:
restart: always
image: fi3te/jenkins-hue-ui:version-2.0.0
container_name: jh-frontend
expose:
- "80"
ports:
- "80:80"
depends_on:
- jh-backend
networks:
- app-network
networks:
app-network:
driver: bridge
```

2) docker-compose.yml with a PostgreSQL database
```
version: '3'
services:
postgres:
restart: always
image: postgres:10
container_name: jh-postgres
environment:
POSTGRES_PASSWORD: postgres-password-example
volumes:
- /var/lib/postgresql/data
networks:
- app-network
jh-backend:
restart: always
image: fi3te/jenkins-hue:version-2.0.0
container_name: jh-backend
environment:
- "TZ=Europe/Berlin"
- spring.profiles.active=postgre,live
- spring.datasource.password=postgres-password-example
- jenkins.url=TODO
- jenkins.userName=TODO
- jenkins.password=TODO
- admins=admin1
# OPTIONAL
# - ldap.server.domain=
# - ldap.server.url= e.g. ldaps://xxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxx.de
# - ldap.server.userSearchFilter= e.g. (&(xxxxxxxxxxxxxxxxxxxxx={0})(objectclass=user))
# - ldap.server.userSearchBase=
# - ldap.server.groupSearchBase=
# - ldap.server.userDn= e.g. CN=xxxxxxxxxxxxxxxxxxxxx,OU=xxxxxxxxxxxxxxxxxxxxx,DC=xxxxxxxxxxxxxxxxxxxxx
# - ldap.server.userName=
# - ldap.server.password=
# - trust-store= e.g. filename.ending
# - trust-store-password=
expose:
- "8484"
depends_on:
- postgres
networks:
- app-network
jh-frontend:
restart: always
image: fi3te/jenkins-hue-ui:version-2.0.0
container_name: jh-frontend
expose:
- "80"
ports:
- "80:80"
depends_on:
- jh-backend
networks:
- app-network
networks:
app-network:
driver: bridge
```

The docker images can be found [here](https://hub.docker.com/r/fi3te/jenkins-hue/) and [here](https://hub.docker.com/r/fi3te/jenkins-hue-ui).


### Bridge discovery

The bridge can be discovered automatically via N-UPnP. Therefore it needs an internet connection.
Expand Down
44 changes: 0 additions & 44 deletions USED_LIBRARIES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ Licensed under the MIT License (copy below)
Joda-Time
Licensed under the Apache License, Version 2.0 (copy below)

wro4j (core + maven-plugin)
Licensed under the Apache License, Version 2.0 (copy below)

Commons Lang
Licensed under the Apache License, Version 2.0 (copy below)

Expand Down Expand Up @@ -37,47 +34,6 @@ PostgreSQL JDBC Driver



AngularJS
Licensed under the MIT License (copy below)

Admin-LTE
Licensed under the MIT License (copy below)

Bootstrap
Licensed under the MIT License (copy below)

Font Awesome
Licensed under the MIT License (copy below)

ionicons
Licensed under the MIT License (copy below)

angular-bootstrap-colorpicker
Licensed under the MIT License (copy below)

angular-growl-2
Licensed under the MIT License (copy below)

bootstrap-slider
Licensed under the MIT License (copy below)

ng-sortable
Licensed under the MIT License (copy below)

ui-bootstrap
Licensed under the MIT License (copy below)

ui-bootstrap-timepicker
Licensed under the MIT License (copy below)

ui-select
Licensed under the MIT License (copy below)

jquery
Licensed under the MIT License (copy below)



The MIT License

Copyright <YEAR> <COPYRIGHT HOLDER>
Expand Down
2 changes: 2 additions & 0 deletions common/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
.project
.settings/

generated-dtos.model.ts

target/
45 changes: 44 additions & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>common</artifactId>
Expand All @@ -11,4 +11,47 @@
<version>1.0.0</version>
</parent>

<dependencies>
<dependency>
<groupId>cz.habarta.typescript-generator</groupId>
<artifactId>typescript-generator-maven-plugin</artifactId>
<version>2.10.466</version>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>cz.habarta.typescript-generator</groupId>
<artifactId>typescript-generator-maven-plugin</artifactId>
<version>2.10.466</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<outputFile>generated-dtos.model.ts</outputFile>
<outputFileType>implementationFile</outputFileType>
<outputKind>module</outputKind>
<classPatterns>de.adesso.jenkinshue.common.**DTO</classPatterns>
<excludeClasses>
<class>de.adesso.jenkinshue.common.enumeration.Role</class>
<class>de.adesso.jenkinshue.common.enumeration.Scenario</class>
</excludeClasses>
<jsonLibrary>jackson2</jsonLibrary>
<namespace>DTO</namespace>
<noFileComment>true</noFileComment>
<sortDeclarations>true</sortDeclarations>
<optionalProperties>all</optionalProperties>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ public class BridgeDTO implements Serializable {

private String hueUserName;

private UserDTO user;
private BridgeDTO_UserDTO user;

private String state;

@Data
@NoArgsConstructor
@AllArgsConstructor
public static class UserDTO implements Serializable {
public static class BridgeDTO_UserDTO implements Serializable {

private static final long serialVersionUID = 6103691782171217524L;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public class LampDTO implements LampWithHueUniqueId, Serializable {

private List<ScenarioConfigDTO> scenarioConfigs;

private TeamDTO team;
private LampDTO_TeamDTO team;

@Data
@NoArgsConstructor
@AllArgsConstructor
public static class TeamDTO implements Serializable {
public static class LampDTO_TeamDTO implements Serializable {

private static final long serialVersionUID = 2784384297925830509L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ public class LampGroupedScenariosDTO implements Serializable, LampWithHueUniqueI

private List<ScenarioConfigDTO> successConfigs;

private TeamDTO team;
private LampGroupedScenariosDTO_TeamDTO team;

@Data
@NoArgsConstructor
@AllArgsConstructor
public static class TeamDTO implements Serializable {
public static class LampGroupedScenariosDTO_TeamDTO implements Serializable {

private static final long serialVersionUID = -6453776040086323825L;

Expand All @@ -62,4 +62,4 @@ public static class TeamDTO implements Serializable {

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,18 @@
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LampUpdateDTO implements Serializable {
public class LampUpdateDTO implements Serializable, GroupedScenarioConfigsLamp {

private static final long serialVersionUID = -4851338323894376390L;

private long id;

private String hueUniqueId;

private String name;

private Date workingStart;

private Date workingEnd;

private List<JobDTO> jobs;

private Scenario lastShownScenario;

private List<ScenarioConfigDTO> buildingConfigs;

private List<ScenarioConfigDTO> failureConfigs;
Expand All @@ -45,6 +39,4 @@ public class LampUpdateDTO implements Serializable {

private List<ScenarioConfigDTO> successConfigs;

private long teamId;

}
}
Loading

0 comments on commit 0f25121

Please sign in to comment.