forked from collabnix/dockerlabs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7019cc6
commit d2d28ae
Showing
1,346 changed files
with
85,936 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git* | ||
tmp | ||
vagrant | ||
packaging | ||
log/* | ||
.DS_Store |
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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,18 @@ | ||
attributes: | ||
- content | ||
- primary_keys | ||
- foreign_key | ||
- inheritance | ||
- timestamps | ||
disconnected: true | ||
filename: doc/database | ||
filetype: png | ||
indirect: true | ||
inheritance: true | ||
markup: true | ||
notation: simple | ||
orientation: vertical | ||
polymorphism: false | ||
sort: false | ||
warn: true | ||
title: Portus |
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 @@ | ||
/builds/ | ||
/coverage/ | ||
/coverage-javascript/ | ||
/node_modules/ | ||
/public/ | ||
/tmp/ | ||
/vendor/ |
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,34 @@ | ||
{ | ||
"env": { | ||
"jquery": true, | ||
"browser": true | ||
}, | ||
"extends": "airbnb-base", | ||
"globals": { | ||
"Bloodhound": false, | ||
"layout_resizer": false, | ||
"set_typeahead": false, | ||
"open_close_icon": false | ||
}, | ||
"plugins": [ | ||
"import" | ||
], | ||
"settings": { | ||
"import/resolver": { | ||
"webpack": { | ||
"config": "./config/webpack.js" | ||
} | ||
} | ||
}, | ||
"rules": { | ||
"camelcase": 0, | ||
"func-names": 0, | ||
"prefer-arrow-callback": 0, | ||
"no-var": 0, | ||
"prefer-template": 0, | ||
"no-unused-vars": [2, {"args": "all", "argsIgnorePattern": "^_"}], | ||
"object-shorthand": 0, | ||
"no-plusplus": 0, | ||
"no-void": 0 | ||
} | ||
} |
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 @@ | ||
--color |
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,41 @@ | ||
|
||
inherit_from: | ||
- ./config/rubocop-suse.yml | ||
|
||
# TODO: (mssola) only the LDAP class and portusctl require this. | ||
Metrics/ClassLength: | ||
Max: 200 | ||
|
||
# TODO: (mssola) Some methods are offending this cop. In the SUSE's style guide | ||
# the approach is to use Rubocop's default value. In the near future I will | ||
# fix this. | ||
Metrics/MethodLength: | ||
Max: 252 | ||
|
||
# It's convenient to mix both. This is something that SUSE's style guide does | ||
# not specify, so we take the approach that we were following already. | ||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
|
||
# NOTE: (mssola) This would be nice, but there are too many errors on this for | ||
# now and it's not urgent. I will fix this in the near future. | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
# NOTE: (mssola) In versions of Ruby higher than 2.1.x, we get | ||
# Lint/ShadowedException in some cases where in 2.1.x it complains if we remove | ||
# such guards. Therefore, we have to disable this cop until we update the | ||
# version of Ruby to be officially supported. | ||
Lint/UnneededDisable: | ||
Enabled: false | ||
|
||
Rails: | ||
Enabled: true | ||
|
||
AllCops: | ||
Exclude: | ||
# Files that are out of our control and that are not excluded in the | ||
# default config of rubocop. | ||
- db/schema.rb | ||
- db/migrate/* | ||
- vendor/**/* |
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 @@ | ||
2.1.2 |
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,66 @@ | ||
language: ruby | ||
rvm: | ||
# The version used at SLE12 | ||
- 2.1.2 | ||
|
||
# Stable versions | ||
- 2.1.10 | ||
- 2.2.6 | ||
- 2.3.3 | ||
- 2.4.0 | ||
|
||
# Future versions | ||
- ruby-head | ||
matrix: | ||
allow_failures: | ||
- rvm: ruby-head | ||
|
||
before_install: | ||
- gem update --system | ||
|
||
# Use the latest stable Node.js | ||
- nvm install stable | ||
- nvm use stable | ||
|
||
# Install Yarn | ||
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | ||
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | ||
- sudo apt-get update | ||
- sudo apt-get install yarn | ||
- yarn install | ||
|
||
before_script: | ||
- mysql -e 'create database portus_test;' | ||
|
||
script: | ||
# Compile assets | ||
- bundle exec rake portus:assets:compile | ||
|
||
# Ruby tests | ||
- bundle exec rspec spec packaging/suse/portusctl/spec | ||
|
||
# Style and security checks | ||
- bundle exec rubocop -V | ||
- bundle exec rubocop -F | ||
- bundle exec brakeman -z -A -x CheckUnscopedFind,CheckRender | ||
|
||
# Javascript style | ||
- yarn run eslint | ||
|
||
env: | ||
global: | ||
# OSC_CREDENTIALS are kept secret | ||
# In order to update them, run: | ||
# travis encrypt OSC_CREDENTIALS=user:password | ||
# more info at: http://docs.travis-ci.com/user/environment-variables/#Secure-Variables | ||
- OBS_REPO=Virtualization:containers:Portus | ||
- OBS_BRANCH=master | ||
- secure: "Umlxpe6wARqVCB4MmQj9MpjGy7Q8odYEohwi4kxOj2hp/uCrqrl1HIoAd7mgB0ylpcbri5HVuBg4EpBoT5VC4NYILnSRPxr3dvHcsK8K7ZO3fuxHnQ666s8P19NSVmDf+K0mlHKv5J6dKIPTFIO1e1Ynbbj97CPo4b2mUJjPq/g=" | ||
|
||
after_success: | ||
- packaging/suse/package_and_push_to_obs.sh | ||
|
||
addons: | ||
code_climate: | ||
repo_token: 18a0cf6c35e0c801678f12f444051c33e0390ce0efa91ec06a2aa5068b10c19e | ||
mariadb: '10.0' |
Large diffs are not rendered by default.
Oops, something went wrong.
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,148 @@ | ||
# Contributing to Portus | ||
|
||
## Reporting issues | ||
|
||
Before reporting an issue, please check the | ||
[documentation](http://port.us.org/documentation.html) and our [mailing | ||
list](https://groups.google.com/forum/#!forum/portus-dev). It might contain all | ||
the information you need for your specific problem. | ||
|
||
Moreover, check whether it has already been reported | ||
[here](https://github.com/SUSE/Portus/issues). If this is the case, please: | ||
|
||
- Read all the comments to confirm that it's the same issue you're having. | ||
- Refrain from adding "same thing here" or "+1" comments. Just hit the | ||
"subscribe" button to get notifications for this issue. | ||
- Add a comment only if you can provide helpful information that has not been | ||
provided in the discussion yet. | ||
|
||
If you want to report a **new issue**, please try to follow the following | ||
points if your issue is about Portus behaving in an unexpected manner: | ||
|
||
- Tell us the setup you're using. It can be as simple as: | ||
- The docker-compose setup. | ||
- The vagrant setup. | ||
- The NGinx setup as described [here](http://port.us.org/docs/setups/3_nginx_bare_metal.html). | ||
That being said, if you are using a custom setup explain to us how all the | ||
pieces are glued together (you don't have to be too verbose, just specify the | ||
most important stuff like configurations, etc.). | ||
- Paste the output of `rake portus:info` (or `portusctl rake portus:info` if | ||
you are using the RPM). | ||
- If relevant, provide the related logs. If you are using the provided RPM, | ||
this is as simple as just calling `portusctl logs`. Otherwise, provide the | ||
contents of your `log/$environment.log` file, and the contents of the logs of | ||
Apache/NGinx/etc. You don't have to provide *all* the contents, only the | ||
relevant lines. | ||
- If possible, try to reproduce the same issue with logging set to `:debug`. You | ||
can set this by modifying `config/environment/production.rb` (or whatever | ||
environment you are in) and setting `config.log_level` to `:debug`. This will | ||
give us more detailed logs. Remember to restart Portus when doing this. | ||
And remember to set that value to `:info` back again once you're done, | ||
otherwise your logs will grow quite rapidly! | ||
|
||
## Check for assigned people | ||
|
||
We are using Github Issues for submitting known issues (e.g. bugs, features, | ||
etc.). Some issues will have someone assigned, meaning that there's already | ||
someone that takes responsability for fixing said issue. This is not done to | ||
discourage contributions, rather to not step in the work that has already been | ||
done by the assignee. If you want to work on a known issue with someone already | ||
assigned to it, please consider contacting the assignee first (e.g. by | ||
mentioning the assignee in a new comment on the specific issue). This way you | ||
can contribute with ideas, or even with code if the assignee decides that you | ||
can step in. | ||
|
||
If you plan to work on a non assigned issue, please add a comment on the issue | ||
to prevent duplicated work. | ||
|
||
## Provide tests | ||
|
||
In Portus we are *really* committed to keep a thorough test suite. For this | ||
reason, any new Pull Request *always* has to provide tests for the change | ||
that is being made. The `spec` directory is full of tests that might serve | ||
as an example if you are not sure how to implement tests for your Pull Request. | ||
Moreover, we make use of [Travis-CI](https://travis-ci.org/SUSE/Portus), so we | ||
will only merge your Pull Request once we get a green light from Travis. | ||
|
||
You might want to take a look at | ||
[this](https://github.com/SUSE/Portus/wiki/How-we-test-Portus) section from the | ||
wiki where our test infrastructure is more thoroughly explained. | ||
|
||
## Mind the Style | ||
|
||
We believe that in order to have a healthy codebase we need to abide to a | ||
certain code style. We use [rubocop](https://github.com/bbatsov/rubocop) for | ||
this matter, which is a tool that has proved to be useful. So, before | ||
submitting your Pull Request, make sure that `rubocop` is passing for you. | ||
If you want to know the style we are enforcing, note the following: | ||
|
||
- We mainly use the default configuration as stated | ||
[here](https://github.com/bbatsov/rubocop#defaults). | ||
- We've made some small changes to the defaults, as you can see | ||
[here](https://github.com/SUSE/Portus/blob/master/.rubocop.yml). Moreover, note | ||
that all these changes have a comment explaining the reasoning behind it. | ||
|
||
Finally, note that `rubocop` is called on Travis-CI. This means that your Pull | ||
Request will not be merged until `rubocop` approves your changes. | ||
|
||
## Update the Changelog | ||
|
||
We keep a changelog in the `CHANGELOG.md` file. This is useful to understand | ||
what has changed between each version. When you implement a new feature, or a | ||
fix for an issue, please also update the `CHANGELOG.md` file accordingly. We | ||
don't follow a strict style for the changelog, just try to be consistent with | ||
the rest of the file. | ||
|
||
## Sign your work | ||
|
||
The sign-off is a simple line at the end of the explanation for the patch. Your | ||
signature certifies that you wrote the patch or otherwise have the right to pass | ||
it on as an open-source patch. The rules are pretty simple: if you can certify | ||
the below (from [developercertificate.org](http://developercertificate.org/)): | ||
|
||
``` | ||
Developer Certificate of Origin | ||
Version 1.1 | ||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors. | ||
660 York Street, Suite 102, | ||
San Francisco, CA 94110 USA | ||
Everyone is permitted to copy and distribute verbatim copies of this | ||
license document, but changing it is not allowed. | ||
Developer's Certificate of Origin 1.1 | ||
By making a contribution to this project, I certify that: | ||
(a) The contribution was created in whole or in part by me and I | ||
have the right to submit it under the open source license | ||
indicated in the file; or | ||
(b) The contribution is based upon previous work that, to the best | ||
of my knowledge, is covered under an appropriate open source | ||
license and I have the right under that license to submit that | ||
work with modifications, whether created in whole or in part | ||
by me, under the same open source license (unless I am | ||
permitted to submit under a different license), as indicated | ||
in the file; or | ||
(c) The contribution was provided directly to me by some other | ||
person who certified (a), (b) or (c) and I have not modified | ||
it. | ||
(d) I understand and agree that this project and the contribution | ||
are public and that a record of the contribution (including all | ||
personal information I submit with it, including my sign-off) is | ||
maintained indefinitely and may be redistributed consistent with | ||
this project or the open source license(s) involved. | ||
``` | ||
|
||
Then you just add a line to every git commit message: | ||
|
||
Signed-off-by: Joe Smith <joe.smith@email.com> | ||
|
||
Use your real name (sorry, no pseudonyms or anonymous contributions.) | ||
|
||
If you set your `user.name` and `user.email` git configs, you can sign your | ||
commit automatically with `git commit -s`. |
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,13 @@ | ||
FROM library/ruby:2.3.1 | ||
MAINTAINER Flavio Castelli <fcastelli@suse.com> | ||
|
||
ENV COMPOSE=1 | ||
EXPOSE 3000 | ||
|
||
WORKDIR /portus | ||
COPY Gemfile* ./ | ||
RUN bundle install --retry=3 && bundle binstubs phantomjs | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends nodejs | ||
|
||
ADD . . |
Oops, something went wrong.