Skip to content

Commit 5372fea

Browse files
committed
release 1.3.0
1 parent de462eb commit 5372fea

File tree

556 files changed

+46931
-26362
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

556 files changed

+46931
-26362
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
RDEPOT_PORT=80
1+
RDEPOT_PORT=8016
22
RDEPOT_PORT_SECURE=443
3-
JAVA_OPTS=
3+
JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8001"

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.tar.gz filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
1-
/bin/
1+
bin
22
.gradle
33
.settings
4-
.project
4+
.project*
55
.classpath
66
*.jar
77
*.war
8-
/build/
9-
/docker/proxy/logs
10-
/repo/build/
11-
/repo/bin/
12-
/docker/app/repository
13-
.vscode/
8+
.attach_pid*
9+
build/tmp
10+
build/publications
11+
app/build
12+
app/bin
13+
docker/proxy/logs
14+
repo/build
15+
repo/bin
16+
docker/app/repository
17+
docker/app/new
18+
.vscode
19+
.idea
20+
*.iml
21+
*.class
22+
.sts4-cache
23+
src/integration-test/resources/itestGenerated
24+
src/integration-test/resources/itestNewFiles
25+
src/integration-test/resources/itestPackages
26+
src/integration-test/resources/itestServer
27+
src/integration-test/resources/itestSourceFiles
28+
src/integration-test/resources/itestPdf

Jenkinsfile

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
pipeline {
2+
agent {
3+
kubernetes {
4+
yamlFile 'kubernetesPod.yaml'
5+
defaultContainer 'rdepot-build'
6+
}
7+
}
8+
9+
options {
10+
buildDiscarder(logRotator(numToKeepStr: '3'))
11+
}
12+
13+
environment {
14+
VERSION = sh(returnStdout: true, script: 'gradle properties -q | grep "baseVersion:" | sed -E "s/baseVersion: (.*)/\\1/g"').trim()
15+
NS = 'openanalytics'
16+
REG = '196229073436.dkr.ecr.eu-west-1.amazonaws.com'
17+
TAG = 'develop'
18+
DOCKER_BUILDKIT = '1'
19+
}
20+
21+
stages {
22+
stage('build integration test images') {
23+
matrix {
24+
axes {
25+
axis {
26+
name 'MODULE'
27+
values 'app', 'repo', 'ldap'
28+
}
29+
}
30+
stages {
31+
stage('Docker build') {
32+
steps {
33+
withOARegistry {
34+
sh """
35+
docker build --build-arg BUILDKIT_INLINE_CACHE=1 \
36+
--cache-from ${env.REG}/${env.NS}/rdepot-${MODULE}-it:${env.TAG} \
37+
-t ${env.NS}/rdepot-${MODULE}-it:${env.TAG} \
38+
./src/integration-test/resources/docker/${MODULE}
39+
"""
40+
ecrPush "${env.REG}", "${env.NS}/rdepot-${MODULE}-it", "${env.TAG}", '', 'eu-west-1'
41+
}
42+
}
43+
}
44+
}
45+
}
46+
}
47+
48+
stage('build and test') {
49+
steps {
50+
sh "gradle build"
51+
}
52+
post {
53+
success {
54+
archiveArtifacts 'app/build/libs/rdepot-app-*.war,repo/build/libs/rdepot-repo-*.jar'
55+
withCredentials([usernamePassword(credentialsId: 'oa-jenkins', usernameVariable: 'OA_NEXUS_USER', passwordVariable: 'OA_NEXUS_PWD')]) {
56+
sh "gradle publish"
57+
}
58+
}
59+
always {
60+
publishHTML([
61+
reportDir: 'build/reports/tests/integrationTest', reportFiles: 'index.html',
62+
reportName: 'Integration Test Report',
63+
allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true])
64+
publishHTML([
65+
reportDir: 'app/build/reports/tests/test', reportFiles: 'index.html',
66+
reportName: 'App Test Report',
67+
allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true])
68+
publishHTML([
69+
reportDir: 'repo/build/reports/tests/test', reportFiles: 'index.html',
70+
reportName: 'Repo Test Report',
71+
allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true])
72+
}
73+
}
74+
}
75+
76+
stage('build Docker images and publish') {
77+
matrix {
78+
axes {
79+
axis {
80+
name 'MODULE'
81+
values 'app', 'repo'
82+
}
83+
}
84+
stages {
85+
stage('build Docker images') {
86+
steps {
87+
withOARegistry {
88+
sh """
89+
docker build --build-arg BUILDKIT_INLINE_CACHE=1 \
90+
--cache-from ${env.REG}/${env.NS}/rdepot-${MODULE}:${env.VERSION} \
91+
-t ${env.NS}/rdepot-${MODULE}:${env.VERSION} \
92+
-t ${env.NS}/rdepot-${MODULE}:latest \
93+
-f ./docker/build/${MODULE}-standalone/Dockerfile \
94+
./${MODULE}/build/libs
95+
"""
96+
ecrPush "${env.REG}", "${env.NS}/rdepot-${MODULE}", "${env.VERSION}", '', 'eu-west-1'
97+
ecrPush "${env.REG}", "${env.NS}/rdepot-${MODULE}", "latest", '', 'eu-west-1'
98+
}
99+
}
100+
}
101+
stage('publish') {
102+
steps {
103+
withDockerRegistry([
104+
credentialsId: "openanalytics-dockerhub",
105+
url: ""]) {
106+
107+
sh "docker push ${env.NS}/rdepot-${MODULE}:${env.VERSION}"
108+
sh "docker push ${env.NS}/rdepot-${MODULE}:latest"
109+
}
110+
}
111+
}
112+
}
113+
}
114+
}
115+
}
116+
}

Makefile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
app:
22
rm -rf ./build
3-
./gradlew build
4-
cp -f ./build/libs/rdepot*.war ./docker/app/rdepot.war
5-
repo:
6-
rm -rf ./repo/build
7-
cd ./repo && ./gradlew build && cp -f ./build/libs/oa-rdepot-repo*.jar ./../docker/repo/oa-rdepot-repo.jar
3+
./gradlew build -x test -x integrationTest testClasses #temporary change
4+
cp -f ./app/build/libs/rdepot-app*application.war ./docker/app/rdepot.war
5+
cp -f ./app/build/libs/rdepot-app*application.war ./src/integration-test/resources/docker/app/rdepot.war
6+
repo:
7+
cp -f ./repo/build/libs/rdepot-repo*application.jar ./docker/repo/rdepot-repo.jar
8+
cp -f ./repo/build/libs/rdepot-repo*application.jar ./src/integration-test/resources/docker/repo/rdepot-repo.jar
89
download:
910
curl https://s3-eu-west-1.amazonaws.com/oa-rdepot-build-artifacts/rdepot.war --output ./docker/app/rdepot.war
10-
curl https://s3-eu-west-1.amazonaws.com/oa-rdepot-build-artifacts/oa-rdepot-repo.jar --output ./docker/repo/oa-rdepot-repo.jar
11+
curl https://s3-eu-west-1.amazonaws.com/oa-rdepot-build-artifacts/rdepot-repo.jar --output ./docker/repo/rdepot-repo.jar
12+
rm-app:
13+
docker-compose stop app
14+
docker-compose rm -f app
15+
start-app:
16+
docker-compose up -d app
1117
all: app repo
12-
.PHONY: all test clean repo app download
18+
.PHONY: all test clean repo app download rm-app start-app

README.md

Lines changed: 4 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,10 @@
77
88
```
99

10+
# RDepot
1011

11-
# R Depot User Guide
12+
Open Source Enterprise Management of R Repositories
1213

13-
Currently, R Depot consists of three core components:
14+
Learn more at https://rdepot.io
1415

15-
- the RDepot R repository management application (rdepot.war)
16-
- a database component, preferably Postgres
17-
- one or more R repositories (instances of oa-rdepot-repo.jar)
18-
19-
The quickest way to set up a working environment, is by using Docker (preferably on Linux).
20-
The following prerequisites are needed:
21-
22-
- docker
23-
- docker-compose (i.e. by issuing "pip install docker-compose")
24-
- port 80 is not used (localhost, check for nginx or apache service)
25-
26-
Please make sure the following files are available:
27-
28-
- ./docker/app/rdepot.war: downloaded from https://s3-eu-west-1.amazonaws.com/oa-rdepot-build-artifacts/rdepot.war (latest development build)
29-
- ./docker/repo/oa-rdepot-repo.jar: downloaded from https://s3-eu-west-1.amazonaws.com/oa-rdepot-build-artifacts/oa-rdepot-repo.jar (latest development build)
30-
31-
The final step is to launch the Docker containers using docker-compose:
32-
33-
- docker-compose up -d
34-
35-
One can then go to http://localhost to log in.
36-
37-
Regarding users and passwords: all passwords are "password" (without ""), because the application is connected by default to "scientists" group of the ForumSys LDAP server (http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/).
38-
39-
- user "einstein" is an administrator
40-
- user "tesla" is a repository maintainer (but not linked to a repository, an administrator has to do that manually)
41-
- user "galieleo" is a package maintainer (but not linked to a package, a repository maintainer or administrator has to do that manually)
42-
- user "newton" is a regular user
43-
44-
To complete an end-to-end flow: R package to R Depot to Repository Server to R client, the following steps are needed:
45-
46-
- create a repository with (or edit)
47-
* a repository's publication URI: http://localhost/repo/repositoryName and
48-
* a server address: http://oa-rdepot-repo:8080/repositoryName
49-
- submit one or more packages to that repository via the R Depot web interface
50-
- publish the repository using the green button in the repositories view (if needed)
51-
- go to the published package page (repositories view, click repository name, click package name)
52-
- use the install URL shown on the published package page to install the package in R (install.packages("somePackage", repos = c("http://localhost/repo/repositoryName", getOption())))
53-
54-
To (re)start with fresh database:
55-
56-
- remove the containers via "docker-compose down -v"
57-
- start up again using "docker-compose up -d"
58-
59-
Browse the [RDepot Documentation](https://www.rdepot.io/).
60-
61-
#### Copyright (c) Copyright of Open Analytics NV, 2010-2018 - Apache 2.0 License
16+
#### (c) Copyright Open Analytics NV, 2012-2020 - Apache License 2.0

WEB-INF/web.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID">
3+
<display-name>rdepot</display-name>
4+
<welcome-file-list>
5+
<welcome-file>index.html</welcome-file>
6+
<welcome-file>index.htm</welcome-file>
7+
<welcome-file>index.jsp</welcome-file>
8+
<welcome-file>default.html</welcome-file>
9+
<welcome-file>default.htm</welcome-file>
10+
<welcome-file>default.jsp</welcome-file>
11+
</welcome-file-list>
12+
</web-app>

WebContent/META-INF/MANIFEST.MF

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Class-Path:
3+

app/WEB-INF/web.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID">
3+
<display-name>rdepot-app</display-name>
4+
<welcome-file-list>
5+
<welcome-file>index.html</welcome-file>
6+
<welcome-file>index.htm</welcome-file>
7+
<welcome-file>index.jsp</welcome-file>
8+
<welcome-file>default.html</welcome-file>
9+
<welcome-file>default.htm</welcome-file>
10+
<welcome-file>default.jsp</welcome-file>
11+
</welcome-file-list>
12+
</web-app>

0 commit comments

Comments
 (0)