You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-28Lines changed: 35 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,24 @@ The following platforms are currently supported:
7
7
* RedHat/CentOS/openSUSE RPM: `rpm/`
8
8
* Debian/Ubuntu DEB: `deb/`
9
9
10
-
# Pre-requisites
10
+
## Pre-requisites
11
+
12
+
### Easy Method
13
+
14
+
If you are able to run Docker containers with `docker compose` (usually Docker Desktop is enough),
15
+
then you can use the same environment as the Jenkins infrastructure production:
16
+
17
+
```bash
18
+
# Start the setup (2 containers: one for packaging and another for a webserver)
19
+
docker compose up -d
20
+
21
+
# Spawn an interactive terminal in the packaging environment (with all dependencies)
22
+
docker compose exec packaging bash
23
+
# You can run all the `make` command and even `prep.sh` script - see sections below
24
+
```
25
+
26
+
### Container-less Method (aka "The Hard Way")
27
+
11
28
Running the main package script requires a Linux environment (currently Ubuntu, see [JENKINS-27744](https://issues.jenkins-ci.org/browse/JENKINS-27744).)
12
29
Run `make setup` to install (most of the) necessary tools. Alternatively you can manually install the following onto a base install of Ubuntu:
13
30
* make
@@ -24,21 +41,11 @@ Run `make setup` to install (most of the) necessary tools. Alternatively you ca
24
41
25
42
You also need a Jenkins instance with [dist-fork plugin](https://wiki.jenkins-ci.org/display/JENKINS/DistFork+Plugin)
26
43
installed. URL of this Jenkins can be fed into `make` via the `JENKINS_URL` variable.
27
-
This Jenkins needs to have a Windows build agent that has [WiX Toolset](http://wixtoolset.org/) (currently 3.5), msbuild, [cygwin](https://www.cygwin.com/) and .net 2.0. This build agent is used to build MSI packages, which
28
-
can be only built on Windows.
29
-
30
-
You'll also need a `jenkins.war` file that you are packaging, which comes from the release process.
31
-
The location of this file is set via the `WAR` variable.
32
-
33
-
Remark:
44
+
This Jenkins needs to have a Windows build agent that has [WiX Toolset](http://wixtoolset.org/) (currently 3.5), msbuild, [cygwin](https://www.cygwin.com/) and .net 2.0.
45
+
This build agent is used to build MSI packages, which can be only built on Windows.
34
46
35
-
A docker image is available to run following script
Run `docker-compose run --rm packaging bash` to get a shell in the official Docker image for this repository.
40
-
41
-
# Generating packages
42
49
Run `./prep.sh` to perform the preparatory actions of downloading the WAR and importing the GPG key.
43
50
Run `make package` to build all the native packages.
44
51
At minimum, you have to specify the `WAR` variable that points to the war file to be packaged and the `BRAND` variable that points to the branding file for licensing, artifact names, and package descriptions.
@@ -53,7 +60,7 @@ make package BRAND=./branding/jenkins.mk BUILDENV=./env/test.mk CREDENTIAL=./cre
53
60
Packages will be placed into `target/` directory.
54
61
See the definition of the `package` goal for how to build individual packages selectively.
55
62
56
-
# Running functional tests
63
+
##Running functional tests
57
64
58
65
The functional tests require Python 3 and Docker.
59
66
Having built the packages as described above, run the functional tests with:
@@ -66,26 +73,27 @@ molecule test
66
73
deactivate
67
74
```
68
75
69
-
# Publishing packages
76
+
## Publishing packages
77
+
70
78
This repository contains scripts for copying packages over to a remote web server to publish them.
71
79
Run `make publish` to publish all native packages.
72
80
73
-
See the definition of the `publish` goal for individual package publishment.
81
+
See the definition of the `publish` goal for individual package publication.
74
82
75
83
## Running local tests
84
+
76
85
These tests install packages from a web server where they are published. So if you want to
77
86
run tests prior to publishing them, you need to create a temporary web server that you can mess up.
78
87
79
88
The default branding & environment (`branding/test.mk` and `env/test.mk`) are designed to support
80
89
this scenario. To make local testing work, you also need to have `/etc/hosts` entry that maps
81
-
`test.pkg.jenkins.io` hostname to `127.0.0.1`, and your computer has to be running ssh that
82
-
lets you login as you.
90
+
`test.pkg.jenkins.io` hostname to `127.0.0.1`.
83
91
84
-
Once you verified the above prerequisites, open another terminal and run `make test.local.setup`
85
-
This will run a docker container that acts as your throw-away package web server. When done, Ctrl+C
86
-
to kill it.
92
+
Once you verified the above prerequisites, open another terminal and run `docker compose up -d pkgserver`
93
+
This will run a docker container that acts as your throw-away package web server.
94
+
95
+
## Branding
87
96
88
-
# Branding
89
97
`branding/` directory contains `*.mk` files that control the branding of the generated packages.
90
98
It also include text files which are used for large, branded text blocks (license and descriptions).
91
99
Specify the branding file via the `BRAND` variable.
@@ -95,19 +103,18 @@ See [branding readme](branding/README.md) for more details. In the rest of the p
95
103
these branding parameters are referenced via `@@NAME@@` and get substituted by `bin/branding.py`.
96
104
To escape a string normally like @@VALUE@@, add an additional two @@ symbols as a prefix: @@@@VALUE@@.
97
105
98
-
# Environment
106
+
## Environment
107
+
99
108
`env/` directory contains `*.mk` files that control the environment into which
100
109
you publish packages. Specify the environment file via the `BUILDENV` variable.
101
110
102
111
You can create your own environment definition to customize the package generation process.
103
112
See [environment readme](env/README.md) for more details.
104
113
105
-
# Credentials
114
+
## Credentials
115
+
106
116
`credentials/` directory contains `test.mk` file that controls the locations of code-signing keys,
107
117
their passwords, and certificates. Specify the credentials file via the `CREDENTIAL` variable.
108
118
109
119
For production use, you need to create your own credentials file. See [credentials readme](credentials/README.md)
110
120
for more details.
111
-
112
-
# TODO (mostly note to myself)
113
-
* Split resource templates to enable customization
0 commit comments