forked from baloise/rocket-chat-notifier
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(testing): Implement basic integration test (see #JENKINS-40673)
Basic docker-based integration test infrastructure for RocketChat
- Loading branch information
Showing
10 changed files
with
318 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM mongo:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ports: | ||
- ${mongo.port} | ||
healthChecks: | ||
pings: | ||
- url: http://localhost:${mongo.port}/ | ||
timeout: 60000 | ||
tag: jenkins-plugin/${project.artifactId}-mongo:${project.version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM rocketchat/base:4 | ||
|
||
ENV RC_VERSION latest | ||
|
||
MAINTAINER [email protected] | ||
|
||
VOLUME /app/uploads | ||
|
||
RUN set -x \ | ||
&& curl -SLf "https://rocket.chat/releases/${rocket.version}/download" -o rocket.chat.tgz \ | ||
&& curl -SLf "https://rocket.chat/releases/${rocket.version}/asc" -o rocket.chat.tgz.asc \ | ||
&& gpg --verify rocket.chat.tgz.asc \ | ||
&& tar -zxf rocket.chat.tgz -C /app \ | ||
&& rm rocket.chat.tgz rocket.chat.tgz.asc \ | ||
&& cd /app/bundle/programs/server \ | ||
&& npm install \ | ||
&& npm cache clear | ||
|
||
USER rocketchat | ||
|
||
WORKDIR /app/bundle | ||
|
||
ADD run.sh /app/bundle | ||
|
||
EXPOSE ${rocket.port} | ||
|
||
CMD ["bash", "/app/bundle/run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ports: | ||
- ${rocket.port} | ||
# containers that this should be linked to, started before this one and stopped afterwards | ||
links: | ||
- mongo:mongo | ||
healthChecks: | ||
pings: | ||
- url: http://localhost:${rocket.port}/ | ||
timeout: 60000 | ||
tag: jenkins-plugin/${project.artifactId}-rocket:${project.version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
# needs a mongoinstance - defaults to container linking with alias 'mongo' | ||
|
||
MONGO_HOST=$MONGO_PORT_${mongo.port}_TCP_ADDR":"${mongo.port} | ||
|
||
export MONGO_URL=mongodb://${MONGO_HOST}/rocketchat | ||
export HOME=/tmp | ||
export PORT=${rocket.port} | ||
export ROOT_URL=http://localhost:${rocket.port} | ||
export Accounts_AvatarStorePath=/app/uploads | ||
export ADMIN_USERNAME=admin | ||
export ADMIN_PASS=supersecret | ||
export [email protected] | ||
|
||
node main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.