Skip to content
Snippets Groups Projects
Commit e40c13ae authored by Tomasz Maczukin's avatar Tomasz Maczukin
Browse files

Merge branch 'master' into fix/visibility-level-setting-in-forked-projects

* master:
  Add CI permissions and api links to README [ci skip]
  Remove duplicate documentation links
  make migrations reversible
  Add missing stage to builds view
  CI details cleanup
  Allow groups to appear in the search results if the group owner allows it
  Update installation.md
  update example of regex for pytest-cov
parents 3a52662c 193bc5fb
Branches
Tags
1 merge request!1744Fix/visibility level setting in forked projects
class FixBuildTags < ActiveRecord::Migration class FixBuildTags < ActiveRecord::Migration
def change def up
execute("UPDATE taggings SET taggable_type='CommitStatus' WHERE taggable_type='Ci::Build'") execute("UPDATE taggings SET taggable_type='CommitStatus' WHERE taggable_type='Ci::Build'")
end end
def down
execute("UPDATE taggings SET taggable_type='Ci::Build' WHERE taggable_type='CommitStatus'")
end
end end
class FailBuildWithoutNames < ActiveRecord::Migration class FailBuildWithoutNames < ActiveRecord::Migration
def change def up
execute("UPDATE ci_builds SET status='failed' WHERE name IS NULL AND status='pending'") execute("UPDATE ci_builds SET status='failed' WHERE name IS NULL AND status='pending'")
end end
def down
end
end end
class FailBuildWithEmptyName < ActiveRecord::Migration class FailBuildWithEmptyName < ActiveRecord::Migration
def change def up
execute("UPDATE ci_builds SET status='failed' WHERE (name IS NULL OR name='') AND status='pending'") execute("UPDATE ci_builds SET status='failed' WHERE (name IS NULL OR name='') AND status='pending'")
end end
def down
end
end end
class AddPublicToGroup < ActiveRecord::Migration
def change
add_column :namespaces, :public, :boolean, default: false
end
end
Loading
@@ -11,7 +11,7 @@
Loading
@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
   
ActiveRecord::Schema.define(version: 20151026182941) do ActiveRecord::Schema.define(version: 20151103001141) do
   
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
Loading
@@ -501,14 +501,15 @@ ActiveRecord::Schema.define(version: 20151026182941) do
Loading
@@ -501,14 +501,15 @@ ActiveRecord::Schema.define(version: 20151026182941) do
add_index "milestones", ["project_id"], name: "index_milestones_on_project_id", using: :btree add_index "milestones", ["project_id"], name: "index_milestones_on_project_id", using: :btree
   
create_table "namespaces", force: true do |t| create_table "namespaces", force: true do |t|
t.string "name", null: false t.string "name", null: false
t.string "path", null: false t.string "path", null: false
t.integer "owner_id" t.integer "owner_id"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "type" t.string "type"
t.string "description", default: "", null: false t.string "description", default: "", null: false
t.string "avatar" t.string "avatar"
t.boolean "public", default: false
end end
   
add_index "namespaces", ["created_at", "id"], name: "index_namespaces_on_created_at_and_id", using: :btree add_index "namespaces", ["created_at", "id"], name: "index_namespaces_on_created_at_and_id", using: :btree
Loading
Loading
Loading
@@ -17,20 +17,22 @@
Loading
@@ -17,20 +17,22 @@
   
## CI Documentation ## CI Documentation
   
+ [Quick Start](ci/quick_start/README.md) - [Quick Start](ci/quick_start/README.md)
+ [Configuring project (.gitlab-ci.yml)](ci/yaml/README.md) - [Configuring project (.gitlab-ci.yml)](ci/yaml/README.md)
+ [Configuring runner](ci/runners/README.md) - [Configuring runner](ci/runners/README.md)
+ [Configuring deployment](ci/deployment/README.md) - [Configuring deployment](ci/deployment/README.md)
+ [Using Docker Images](ci/docker/using_docker_images.md) - [Using Docker Images](ci/docker/using_docker_images.md)
+ [Using Docker Build](ci/docker/using_docker_build.md) - [Using Docker Build](ci/docker/using_docker_build.md)
+ [Using Variables](ci/variables/README.md) - [Using Variables](ci/variables/README.md)
- [User permissions](ci/permissions/README.md)
- [API](ci/api/README.md)
   
### CI Examples ### CI Examples
   
+ [Test and deploy Ruby applications to Heroku](ci/examples/test-and-deploy-ruby-application-to-heroku.md) - [Test and deploy Ruby applications to Heroku](ci/examples/test-and-deploy-ruby-application-to-heroku.md)
+ [Test and deploy Python applications to Heroku](ci/examples/test-and-deploy-python-application-to-heroku.md) - [Test and deploy Python applications to Heroku](ci/examples/test-and-deploy-python-application-to-heroku.md)
+ [Test Clojure applications](ci/examples/test-clojure-application.md) - [Test Clojure applications](ci/examples/test-clojure-application.md)
+ Help your favorite programming language and GitLab by sending a merge request with a guide for that language. - Help your favorite programming language and GitLab by sending a merge request with a guide for that language.
   
## Administrator documentation ## Administrator documentation
   
Loading
@@ -49,11 +51,6 @@
Loading
@@ -49,11 +51,6 @@
- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails. - [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE. - [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
   
### Administrator documentation
+ [User permissions](permissions/permissions.md)
+ [API](api/README.md)
## Contributor documentation ## Contributor documentation
   
- [Development](development/README.md) Explains the architecture and the guidelines for shell commands. - [Development](development/README.md) Explains the architecture and the guidelines for shell commands.
Loading
Loading
Loading
@@ -332,7 +332,7 @@ GitLab Shell is an SSH access and repository management software developed speci
Loading
@@ -332,7 +332,7 @@ GitLab Shell is an SSH access and repository management software developed speci
# Go to Gitlab installation folder # Go to Gitlab installation folder
   
cd /home/git/gilab cd /home/git/gitlab
   
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
   
Loading
Loading
Loading
@@ -47,10 +47,11 @@ describe "Builds" do
Loading
@@ -47,10 +47,11 @@ describe "Builds" do
end end
end end
   
describe "GET /:project/builds/:id/cancel_all" do describe "POST /:project/builds/:id/cancel_all" do
before do before do
@build.run! @build.run!
visit cancel_all_namespace_project_builds_path(@gl_project.namespace, @gl_project) visit namespace_project_builds_path(@gl_project.namespace, @gl_project)
click_link "Cancel all"
end end
   
it { expect(page).to have_content 'No builds to show' } it { expect(page).to have_content 'No builds to show' }
Loading
@@ -67,10 +68,11 @@ describe "Builds" do
Loading
@@ -67,10 +68,11 @@ describe "Builds" do
it { expect(page).to have_content @commit.git_author_name } it { expect(page).to have_content @commit.git_author_name }
end end
   
describe "GET /:project/builds/:id/cancel" do describe "POST /:project/builds/:id/cancel" do
before do before do
@build.run! @build.run!
visit cancel_namespace_project_build_path(@gl_project.namespace, @gl_project, @build) visit namespace_project_build_path(@gl_project.namespace, @gl_project, @build)
click_link "Cancel"
end end
   
it { expect(page).to have_content 'canceled' } it { expect(page).to have_content 'canceled' }
Loading
@@ -79,7 +81,9 @@ describe "Builds" do
Loading
@@ -79,7 +81,9 @@ describe "Builds" do
   
describe "POST /:project/builds/:id/retry" do describe "POST /:project/builds/:id/retry" do
before do before do
visit cancel_namespace_project_build_path(@gl_project.namespace, @gl_project, @build) @build.run!
visit namespace_project_build_path(@gl_project.namespace, @gl_project, @build)
click_link "Cancel"
click_link 'Retry' click_link 'Retry'
end end
   
Loading
Loading
Loading
@@ -32,7 +32,7 @@ describe "Commits" do
Loading
@@ -32,7 +32,7 @@ describe "Commits" do
describe "Cancel all builds" do describe "Cancel all builds" do
it "cancels commit" do it "cancels commit" do
visit ci_status_path(@commit) visit ci_status_path(@commit)
click_on "Cancel all" click_on "Cancel running"
expect(page).to have_content "canceled" expect(page).to have_content "canceled"
end end
end end
Loading
Loading
require 'spec_helper'
describe GroupsFinder do
let(:user) { create :user }
let!(:group) { create :group }
let!(:public_group) { create :group, public: true }
describe :execute do
it 'finds public group' do
groups = GroupsFinder.new.execute(user)
expect(groups.size).to eq(1)
expect(groups.first).to eq(public_group)
end
end
end
Loading
@@ -42,6 +42,11 @@ describe SearchHelper do
Loading
@@ -42,6 +42,11 @@ describe SearchHelper do
expect(search_autocomplete_opts(project.name).size).to eq(1) expect(search_autocomplete_opts(project.name).size).to eq(1)
end end
   
it "includes the public group" do
group = create(:group, public: true)
expect(search_autocomplete_opts(group.name).size).to eq(1)
end
context "with a current project" do context "with a current project" do
before { @project = create(:project) } before { @project = create(:project) }
   
Loading
Loading
Loading
@@ -84,4 +84,23 @@ describe Group do
Loading
@@ -84,4 +84,23 @@ describe Group do
expect(group.avatar_type).to eq(["only images allowed"]) expect(group.avatar_type).to eq(["only images allowed"])
end end
end end
describe "public_profile?" do
it "returns true for public group" do
group = create(:group, public: true)
expect(group.public_profile?).to be_truthy
end
it "returns true for non-public group with public project" do
group = create(:group)
create(:project, :public, group: group)
expect(group.public_profile?).to be_truthy
end
it "returns false for non-public group with no public projects" do
group = create(:group)
create(:project, group: group)
expect(group.public_profile?).to be_falsy
end
end
end end
Loading
@@ -39,7 +39,7 @@ describe GitlabCiService do
Loading
@@ -39,7 +39,7 @@ describe GitlabCiService do
end end
   
describe :build_page do describe :build_page do
it { expect(@service.build_page("2ab7834c", 'master')).to eq("http://localhost/#{@ci_project.gl_project.path_with_namespace}/commit/2ab7834c/ci")} it { expect(@service.build_page("2ab7834c", 'master')).to eq("http://localhost/#{@ci_project.gl_project.path_with_namespace}/commit/2ab7834c/builds")}
end end
   
describe "execute" do describe "execute" do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment