Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

Commit

Permalink
Feature/update pomxml (#221)
Browse files Browse the repository at this point in the history
* feat: update plugin deps tree

* feat: remove min java 11 check

* feat: improve build scripts

* feat: bump docker used in casc

* feat: add useful docs
  • Loading branch information
DuMaM authored Oct 18, 2023
1 parent a5c1420 commit 9f7cdb9
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 212 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ Crowd login credentials are:
Application:
* application: jenkins
* pass: jenkins

## Other docs

Apart of jenkins plugin developer documentation it's recommended to also read this one.
https://docs.google.com/document/d/1PKYIpPlRVGsBqrz0Ob1Cv3cefOZ5j2xtGZdWs27kLuw/edit?usp=sharing
14 changes: 9 additions & 5 deletions _start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -x
CROWD_SNAPSHOT_FILE_PATH='target/crowd2.hpi'

export GITPOD_SITE="${HOSTNAME}.${GITPOD_WORKSPACE_CLUSTER_HOST}"
Expand All @@ -11,21 +11,25 @@ export CROWD_BACKUP_FILE="casc/crowd_backup.xml"
if [[ ! -f "$CROWD_SNAPSHOT_FILE_PATH" ]]; then
echo "--- No builds found - building plugin ---"
mvn -ntp clean verify
else
echo "--- Build found - using it ---"
mvn -ntp clean verify -DskipTests
fi

export JAVA_VERSION="${1:-11}"

# create new img with crowd2-snapshot file installed
# if there is args passed use java8
if [[ $# -gt 0 ]] || ! docker image inspect casc_jenkins:latest &> /dev/null; then
echo "--- Build Docker img ---"
export JAVA_VERSION="${1:-11}"
docker-compose -f casc/docker-compose.yml build
docker compose -f casc/docker-compose.yml build
fi

# fetch all needed images (crowd and jenkins one)
docker-compose -f casc/docker-compose.yml pull
docker compose -f casc/docker-compose.yml pull

echo '--- Start docker services ---'
docker-compose -f casc/docker-compose.yml up -d --remove-orphans
docker compose -f casc/docker-compose.yml up -d --remove-orphans

# TODO: Remove those comments after confirmation that this setup is also working localy
# replace crowd address to current one
Expand Down
2 changes: 1 addition & 1 deletion _stop.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker-compose -f casc/docker-compose.yml down -v
docker compose -f casc/docker-compose.yml down -v
2 changes: 1 addition & 1 deletion casc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock

crowd:
image: atlassian/crowd:5.1.0-jdk11
image: atlassian/crowd:5.1.5-jdk11
container_name: crowd
networks:
- crowd_net
Expand Down
96 changes: 42 additions & 54 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +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/maven-v4_0_0.xsd">
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -54,7 +55,7 @@
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/crowd2-plugin</gitHubRepo>
<jenkins.version>2.387.3</jenkins.version>
<crowd-integration-client-rest.version>5.1.3</crowd-integration-client-rest.version>
<crowd-integration-client-rest.version>5.1.5</crowd-integration-client-rest.version>
<findbugs.failOnError>false</findbugs.failOnError>
<spotbugs.effort>Max</spotbugs.effort>
<spotbugs.failOnError>true</spotbugs.failOnError>
Expand All @@ -75,6 +76,10 @@
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
<repository>
<id>maven.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/releases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand All @@ -84,9 +89,42 @@
</pluginRepositories>

<dependencies>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-lang3-api</artifactId>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>jaxb</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>apache-httpcomponents-client-4-api</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<exclusions>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</exclusion>
</exclusions>
</dependency>


<dependency>
<groupId>com.atlassian.crowd</groupId>
<artifactId>crowd-integration-client-rest</artifactId>
<artifactId>crowd-integration-client-common</artifactId>
<version>${crowd-integration-client-rest.version}</version>
<exclusions>
<exclusion>
Expand All @@ -97,14 +135,6 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
</exclusion>
<!-- <exclusion>
<groupId>com.atlassian.crowd</groupId>
<artifactId>atlassian-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.atlassian.crowd</groupId>
<artifactId>atlassian-collectors-util</artifactId>
</exclusion> -->
</exclusions>
</dependency>
<dependency>
Expand All @@ -114,41 +144,14 @@
</dependency>
<dependency>
<groupId>com.atlassian.crowd</groupId>
<artifactId>crowd-integration-client-common</artifactId>
<artifactId>crowd-integration-client-rest</artifactId>
<version>${crowd-integration-client-rest.version}</version>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>apache-httpcomponents-client-4-api</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>jaxb</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<exclusions>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Tests -->
<dependency>
Expand All @@ -167,26 +170,11 @@
<version>3.24.2</version>
<scope>test</scope>
</dependency>
<!--
Failed while enforcing RequireUpperBoundDeps.
This dependency is needed for mockito and assertj
-->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.14.8</version>
</dependency>
</dependencies>

<dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.13.0</version>
</dependency>

<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.387.x</artifactId>
Expand Down
Loading

0 comments on commit 9f7cdb9

Please sign in to comment.