netdata/packaging: Fine tune documentation on how to test docker images (#6024)
Paul Emm. Katsoulakis committed
May 17, 2019 at 13:48 UTC
5af97b16a85778ee6c384af3eb07b2d736da67ae
1 file changed
+29
-1
packaging/docker/README.md
+29
-1
@@ -125,7 +125,12 @@ You can restrict access by following [official caddy guide](https://caddyserver.
125
126
[]()
127
128
-### Publish a test image to your own repository
128
+## Publish a test image to your own repository
129
+
130
+At netdata we provide multiple ways of testing your docker images using your own repositories.
131
+You may either use the command line tools available or take advantage of our Travis CI infrastructure.
132
+
133
+### Using tools manually from the command line
134
135
The script `packaging/docker/build-test.sh` can be used to create an image and upload it to a repository of your choosing.
136
@@ -156,3 +161,26 @@ We check out PR5576 and run the following:
161
Then we can run `helm install [path to our helmchart clone]`.
162
163
If we make changes to the code, we execute the same `build-test.sh` command, followed by `helm upgrade [name] [path to our helmchart clone]`
164
+
165
+### Inside netdata organization, using Travis CI
166
+
167
+To enable Travis CI integration on your own repositories (Docker and Github), you need to be part of the Netdata organization.
168
+Once you have contacted the netdata owners to setup you up on Github and Travis, execute the following steps
169
+
170
+- Preparation
171
+ - Have netdata forked on your personal GITHUB account
172
+ - Get a GITHUB token: Go to Github settings -> Developer Settings -> Personal access tokens, generate a new token with full access to repo_hook, read only access to admin:org, public_repo, repo_deployment, repo:status and user:email settings enabled. This will be your GITHUB_TOKEN that is described later in the instructions, so keep it somewhere safe until is needed.
173
+ - Contact netdata team and seek for permissions on https://scan.coverity.com should you require Travis to be able to push your forked code to coverity for analysis and report. Once you are setup, you should have your email you used in coverity and a token from them. These will be your COVERITY_SCAN_SUBMIT_EMAIL and COVERITY_SCAN_TOKEN that we will refer to later.
174
+ - Have a valid Docker hub account, the credentials from this account will be your DOCKER_USERNAME and DOCKER_PWD mentioned later
175
+
176
+- Setting up Travis CI for your own fork (Detailed instructions provided by Travis team [here](https://docs.travis-ci.com/user/tutorial/))
177
+ - Login to travis with your own GITHUB credentials (There is Open Auth access)
178
+ - Go to your profile settings, under [repositories](https://travis-ci.com/account/repositories) section and setup your netdata fork to be built by travis
179
+ - Once the repository has been setup, go to repository settings within travis (usually under https://travis-ci.com/NETDATA_DEVELOPER/netdata/settings, where "NETDATA_DEVELOPER" is your github handle) and select your desired settings.
180
+- While in Travis settings, under netdata repository settings in the Environment Variables section, you need to add the following:
181
+ - DOCKER_USERNAME and DOCKER_PWD variables so that Travis can login to your docker hub account and publish docker images there.
182
+ - REPOSITORY variable to "NETDATA_DEVELOPER/netdata" where NETDATA_DEVELOPER is your github handle again.
183
+ - GITHUB_TOKEN variable with the token generated on the preparation step, for travis workflows to function properly
184
+ - COVERITY_SCAN_SUBMIT_EMAIL and COVERITY_SCAN_TOKEN variables to enable Travis to submit your code for analysis to Coverity.
185
+
186
+Having followed these instructions, your forked repository should be all set up for Travis Integration, happy testing!