README.md 2.03 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Building the package locally

![](dev-workflow.png)

## Requirements

  * docker
  * docker-compose

## Building and testing

The script can be used *./ci/build.sh* to build the RPM package.

### Build the RPM

Robert Verkerk's avatar
Robert Verkerk committed
16
Build the B2SAFE package for CentOS 7 and iRODS 4.2.8.
17
```
Robert Verkerk's avatar
Robert Verkerk committed
18
./ci/build.sh centos7_4_2_8
19
20
21
22
23
```

If the build process was successful, the RPM will be copied to the shared target folder:

```
Robert Verkerk's avatar
Robert Verkerk committed
24
ls ci/RPMS/Centos/7/irods-4.2.8/
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
irods-eudat-b2safe-4.3.0-0.noarch.rpm
```

### Configure the functional test

In order to run the tests make sure that you have access to a handle server with a dedicated test prefix.
You should have received a private key and a certificate PEM file
(in this case *308_21.T12995_TRAINING_privkey.pem* and *308_21.T12995_TRAINING_certificate_only.pem*)

Configure the following files:

*ci/secret/epic2_credentials*:
```
{
    "handle_server_url": "https://epic5.storage.surfsara.nl:8003",
    "private_key": "/etc/irods/308_21.T12995_TRAINING_privkey.pem",
    "certificate_only": "/etc/irods/308_21.T12995_TRAINING_certificate_only.pem",
    "prefix": "21.T12995",
    "handleowner": "200:0.NA/21.T12995",
    "reverselookup_username": "21.T12995",
    "reverselookup_password": "<INSERT_PASSWORD_HERE>",
    "HTTPS_verify": "False"
}
```

*ci/secret/install.json*
```
{
  "server_id": "irods://{HOSTNAME}:1247",
  "server_api_reg": "irods://{UUID}:1247",
  "server_api_pub": "irods://{UUID}:1247",
  "handle_server_url": "https://epic5.storage.surfsara.nl:8003",
  "handle_private_key": "/etc/irods/308_21.T12995_TRAINING_privkey.pem",
  "handle_certificate_only": "/etc/irods/308_21.T12995_TRAINING_certificate_only.pem",
  "handle_prefix": "21.T12995",
  "handle_owner": "200:0.NA/21.T12995",
  "handle_reverse_lookup_name": "21.T12995",
  "handle_reverse_lookup_password": "<INSERT_PASSWORD_HERE>",
  "handle_https_verify": "False",
  "handle_users": [ "*" ],
  "handle_groups": []
}
```

### Run the functional test
```
Robert Verkerk's avatar
Robert Verkerk committed
71
./ci/test.sh centos7_4_2_8
72
73
74
75
76
77
78
```

### Automation

The details can be found in the Jenkinsfile in the root of the repository.