Commit Graph

130 Commits

Author SHA1 Message Date
Jacob Vosmaer (GitLab) 5c2fe2d3d7 Decouple more of Repository from Rugged 2018-01-30 16:21:55 +00:00
Rémy Coutable 33ed96229b
Don't run scripts/lint-changelog-yaml in scripts/static-analysis but only in the 'docs lint' job
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-01-30 11:08:32 +01:00
Lin Jen-Shin a2618310ae Use Process::Status rather than an integer
However keep backward compatibility
2018-01-26 19:42:48 +08:00
Lin Jen-Shin df2c47b9ff Don't print stdout in case we're just printing warnings
Otherwise it could be confusing
2018-01-26 19:42:48 +08:00
Lin Jen-Shin 54ca8d0d6c Fail static-analysis if there's output to stderr
TODO: fix offenders
2018-01-26 19:42:48 +08:00
Jacob Vosmaer 6d6f7536bd Look for rugged with static analysis 2018-01-25 14:05:11 +01:00
Rémy Coutable fca2a75266 Ensure Gitaly Ruby gems are installed using the correct Gemfile and at the correct location
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-01-23 15:29:20 +01:00
Tim Zallmann d7eb369218 Merge branch 'revert-c8ddf067' into 'master'
Revert "Merge branch 'pre-commit-prettier' into 'master'"

See merge request gitlab-org/gitlab-ce!16217
2018-01-17 13:31:16 +00:00
Lin Jen-Shin cfd75101d1 Merge remote-tracking branch 'upstream/master' into 1819-override-ce
* upstream/master: (621 commits)
  Add a note about GitLab QA page objects validator to docs
  Refactor dispatcher projects blame and blob path
  Update export message to mention we can download the file from the UI
  Fix Ctrl+Enter keyboard shortcut saving comment/note edit
  fix case where tooltip messes up :last-child selector
  Add reason to keep postgresql 9.2 for CI
  Remove warning noise in ProjectImportOptions
  Add changelog entry
  Add RedirectRoute factory
  Update Ingress extra cost note to be more generic
  Fix Rubocop offense
  Refactor dispatcher project branches path
  Revert "Revert "Fix Route validation for unchanged path""
  Document that we need rsync for backing up
  Docs: move article "Laravel and Envoy w/ CI/CD"
  Recommend against the use of EFS
  Adds Rubocop rule for line break around conditionals
  Update CHANGELOG.md for 10.1.6
  Filter out build traces from logged parameters
  Refactored project:n* imports in dispatcher.js
  ...
2018-01-12 19:43:38 +08:00
Filipa Lacerda ecf6f1f872 Revert "Merge branch 'pre-commit-prettier' into 'master'"
This reverts merge request !16061
2018-01-04 09:13:26 +00:00
Robert Speicher c8ddf067ed Merge branch 'pre-commit-prettier' into 'master'
Pre commit prettier

See merge request gitlab-org/gitlab-ce!16061
2018-01-03 19:52:26 +00:00
Jacob Schatz 2abf63899d Add check if run from gitlab development kit root directory. 2018-01-02 16:01:45 -05:00
Jacob Schatz f6e5772dfc Check for symlink instead of file before install. 2018-01-02 15:57:45 -05:00
Jacob Schatz 981aac02f5 Update script to work only when run in the gitlab directory. 2018-01-02 15:49:39 -05:00
Stan Hu ad88e3f88d Fix `rake db:seed_fu` not doing anything in CI
The default behavior of seed_fu is to load the fixtures using the RAILS_ENV
environment.  In CI, since we set RAILS_ENV=test, nothing is ever
loaded. Instead of `rake db:seed_fu`, use `rake gitlab:setup`, which sets up
MySQL properly with limits.

Closes #41517
2018-01-02 12:44:51 -08:00
Lin Jen-Shin 8139895b43 Use `Gitlab::Utils::Override` over defined?(super) 2017-12-26 17:18:10 +08:00
Rémy Coutable 7fdb77625e Merge branch 'dz-add-sast' into 'master'
Remove security checks from static analysis and add sast job

See merge request gitlab-org/gitlab-ce!16113
2017-12-23 14:19:51 +00:00
Dmitriy Zaporozhets ef82cbef90 Remove security checks from static analysis and add sast job 2017-12-23 14:18:39 +00:00
blackst0ne f20581773a Return exception messages in scripts/lint-changelog-yaml 2017-12-23 12:53:13 +11:00
Jacob Schatz 060bceeacb Remove `-f` to not ruin other people's existing pre-commit files. 2017-12-20 15:54:21 -05:00
Jacob Schatz b3b7d12496 Add changelog and newlines 2017-12-20 15:48:45 -05:00
Jacob Schatz 6f45cbd197 Add script to enable code formatters 2017-12-20 15:29:27 -05:00
Jacob Schatz 39efc5c80c Remove JSX since we don't use it. 2017-12-20 15:19:09 -05:00
Jacob Schatz 1d78753860 Initial install 2017-12-20 12:09:22 -05:00
Lin Jen-Shin 873bc3a685 Preserve gem path so that we use the same gems
Without this patch, I would end up with:

```
An error occurred in a `before(:suite)` hook.
Failure/Error: raise "could not connect to gitaly at #{socket.inspect} after #{sleep_time} seconds"

RuntimeError:
  could not connect to gitaly at "tmp/tests/gitaly/gitaly.socket" after 10 seconds
```

Digging into it, it's because `scripts/gitaly-test-spawn` could not
spawn the process, because it cannot find the installed gems.

I personally installed all my gems under $HOME, namely with:

* `gem install rake --user-install` or:
* `bundle install --path ~/.gem`

The gems would be installed to `~/.gem/ruby/2.4.0/gems`, where
the version is Ruby ABI version.

Now we're changing $HOME, making RubyGems think that the gems
would be installed to `tmp/tests/ruby/2.4.0/gems` which is
apparently not the case.

In order to workaround this, we could preserve $GEM_PATH
populated by RubyGems, ignoring the default path based on $HOME.
2017-12-19 17:41:59 +08:00
Balasankar "Balu" C 3bbdb8b230 Make rubocop happy 2017-12-15 11:29:52 +05:30
Balasankar "Balu" C fe95db625d Use guard clause 2017-12-15 11:29:52 +05:30
Balasankar "Balu" C f4030dc351 Improve language 2017-12-15 11:29:52 +05:30
Balasankar "Balu" C ab78b570f4 Prettify 2017-12-15 11:29:52 +05:30
Balasankar "Balu" C 963b007b01 Use temp branch 2017-12-15 11:29:52 +05:30
Balasankar "Balu" C bf8289ab54 Pass info about who started the job and which job triggered it 2017-12-15 11:29:52 +05:30
Grzegorz Bizon 90569a175d Do not raise when downstream pipeline is created 2017-12-11 09:43:56 +01:00
Balasankar C c9fd438080 Set EE variable 2017-12-01 10:57:12 +05:30
Jacob Vosmaer (GitLab) a14bd24a02 Set an artificial $HOME for gitaly in test 2017-11-30 12:58:51 +00:00
Grzegorz Bizon 2998b88603 Add a feedback mechanism to `package-qa` manual action 2017-11-24 15:54:35 +00:00
Lin Jen-Shin d6fcdec52f Make sure we're using git installed in gitlab-build-images 2017-11-23 18:26:41 +08:00
Achilleas Pipinellis 4756720923
Use slug as the prefix for the docs CI job preview URL 2017-11-17 14:07:06 +01:00
Achilleas Pipinellis e1fb8b35e7
Change logic of repo name and slugs in docs review script
We need to make room for Runner and Omnibus docs.
This change makes sure the correct values are defined
based on CI_PROJECT_NAME.
2017-11-16 08:05:32 +01:00
Stan Hu 8efdf75bcb Use a non-superuser user to access GitLab to ensure permissions are proper
We have run into permission issues with MySQL triggers in #36633 that
would have been caught earlier either if our migration tests or GitLab QA
tests had been testing against non-superuser users. This change creates
a non-superuser that has access to the GitLab test database and uses that.

Closes #39932
2017-11-09 22:14:03 -08:00
Rémy Coutable d048c8fe43
Use the --parallel Rubocop flag in the static-analysis and improve the job
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-03 17:00:49 +01:00
bogdanvlviv c17570d3b3
Update scripts/prepare_build.sh 2017-10-17 21:15:19 +03:00
Sean McGivern e73c9ddc9e Extend changelog checker to test file extensions
Changelogs without a .yml extension won't be picked up, and will be ignored
completely, so fail the pipeline when one of those is found.
2017-09-29 15:24:16 +01:00
Sean McGivern 3fba557d5c Add static analysis job to find invalid YAML in changelogs
When a changelog has invalid YAML (typically, there is an unquoted @ at the
start of the author field), then the entry will be discarded. This script checks
all unreleased changelogs for validity, and runs as part of the static-analysis
step, so the pipeline will fail if this happens in future.
2017-09-27 09:52:03 +01:00
Achilleas Pipinellis 0741b86b27
Check for exec permissions also in app/ 2017-09-25 10:59:25 +02:00
Achilleas Pipinellis 6532c137a7
Add check for exec permissions and refactor lint doc script 2017-09-25 10:50:06 +02:00
Rémy Coutable 02b398d3e9 Merge branch 'dz-check-schema' into 'master'
Add rake task to check db schema is valid

Closes #37568

See merge request gitlab-org/gitlab-ce!14365
2017-09-19 16:11:08 +00:00
Dmitriy Zaporozhets 9cd0d68fe9
Add rake task to check db schema is valid
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-09-19 16:42:44 +03:00
Achilleas Pipinellis fb9fec005a Refine docs trigger script and use a really long branch name to test it 2017-09-19 11:30:44 +00:00
Robert Speicher a501feb4fb Resolve RuboCop violations in scripts/trigger-build-docs 2017-09-07 13:21:47 -04:00
Achilleas Pipinellis ecdab9f96f Add script and job to trigger a docs build 2017-09-07 15:43:20 +00:00