summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-03-13 10:09:17 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-03-13 10:09:17 +0000
commit8e6c9e9bd9eab9a68364b8b3e5ab87dde71397d6 (patch)
tree2e64ffc984468c3f1ed357da543d417ef46fec13
parentc50833571946cbabcebb3b0da9bba5b625981ab5 (diff)
parent4e18e72e810d50eb8fdea383afb8c9f5771e9f1a (diff)
downloadgitlab-ce-8e6c9e9bd9eab9a68364b8b3e5ab87dde71397d6.tar.gz
Merge branch 'master' into 29326-update-documentation
* master: Resolve transient failure in spec/models/user_spec.rb Execute inflections initializer earlier Fix alignment of resolve discussion button Update templates with new CI variables Fix inconsistent deploy key documentation in UI
-rw-r--r--app/assets/stylesheets/pages/notes.scss9
-rw-r--r--app/views/projects/deploy_keys/_index.html.haml2
-rw-r--r--app/views/projects/notes/_note.html.haml19
-rw-r--r--changelogs/unreleased/29189-discussion-button.yml4
-rw-r--r--changelogs/unreleased/29328-fix-transient-failure-in-model-user-spec.yml4
-rw-r--r--config/initializers/0_inflections.rb (renamed from config/initializers/inflections.rb)0
-rw-r--r--spec/models/user_spec.rb5
-rw-r--r--vendor/gitlab-ci-yml/Docker.gitlab-ci.yml4
-rw-r--r--vendor/gitlab-ci-yml/Maven.gitlab-ci.yml8
-rw-r--r--vendor/gitlab-ci-yml/OpenShift.gitlab-ci.yml12
-rw-r--r--vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml16
-rw-r--r--vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml18
12 files changed, 54 insertions, 47 deletions
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index dc79de19d48..c8ad88e9351 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -384,7 +384,7 @@ ul.notes {
top: 0;
.note-action-button {
- margin-left: 10px;
+ margin-left: 8px;
}
}
@@ -400,8 +400,7 @@ ul.notes {
}
.note-action-button {
- display: inline-block;
- margin-left: 0;
+ display: inline;
line-height: 20px;
@media (min-width: $screen-sm-min) {
@@ -540,7 +539,6 @@ ul.notes {
}
.line-resolve-btn {
- display: inline-block;
position: relative;
top: 2px;
padding: 0;
@@ -563,8 +561,9 @@ ul.notes {
}
svg {
- position: relative;
fill: $gray-darkest;
+ height: 15px;
+ width: 15px;
}
}
diff --git a/app/views/projects/deploy_keys/_index.html.haml b/app/views/projects/deploy_keys/_index.html.haml
index 0cbe9b3275a..4cfbd9add00 100644
--- a/app/views/projects/deploy_keys/_index.html.haml
+++ b/app/views/projects/deploy_keys/_index.html.haml
@@ -3,7 +3,7 @@
%h4.prepend-top-0
Deploy Keys
%p
- Deploy keys allow read-only access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one.
+ Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one.
.col-lg-9
%h5.prepend-top-0
Create a new deploy key for this project
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index a7618370a5d..5552086bc50 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -43,18 +43,17 @@
"inline-template" => true,
"ref" => "note_#{note.id}" }
- .note-action-button
+ %button.note-action-button.line-resolve-btn{ type: "button",
+ class: ("is-disabled" unless can_resolve),
+ ":class" => "{ 'is-active': isResolved }",
+ ":aria-label" => "buttonText",
+ "@click" => "resolve",
+ ":title" => "buttonText",
+ "v-show" => "!loading",
+ ":ref" => "'button'" }
= icon("spin spinner", "v-show" => "loading")
- %button.line-resolve-btn{ type: "button",
- class: ("is-disabled" unless can_resolve),
- ":class" => "{ 'is-active': isResolved }",
- ":aria-label" => "buttonText",
- "@click" => "resolve",
- ":title" => "buttonText",
- "v-show" => "!loading",
- ":ref" => "'button'" }
- = render "shared/icons/icon_status_success.svg"
+ = render "shared/icons/icon_status_success.svg"
- if current_user
- if note.emoji_awardable?
diff --git a/changelogs/unreleased/29189-discussion-button.yml b/changelogs/unreleased/29189-discussion-button.yml
new file mode 100644
index 00000000000..eea96362117
--- /dev/null
+++ b/changelogs/unreleased/29189-discussion-button.yml
@@ -0,0 +1,4 @@
+---
+title: Fix alignment of resolve button
+merge_request:
+author:
diff --git a/changelogs/unreleased/29328-fix-transient-failure-in-model-user-spec.yml b/changelogs/unreleased/29328-fix-transient-failure-in-model-user-spec.yml
new file mode 100644
index 00000000000..dabf9968c5b
--- /dev/null
+++ b/changelogs/unreleased/29328-fix-transient-failure-in-model-user-spec.yml
@@ -0,0 +1,4 @@
+---
+title: Add custom attributes in factories
+merge_request: 9892
+author: George Andrinopoulos
diff --git a/config/initializers/inflections.rb b/config/initializers/0_inflections.rb
index d4197da3fa9..d4197da3fa9 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/0_inflections.rb
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index adb5b538922..3166b951a42 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -713,8 +713,9 @@ describe User, models: true do
describe '.search_with_secondary_emails' do
delegate :search_with_secondary_emails, to: :described_class
- let!(:user) { create(:user) }
- let!(:email) { create(:email) }
+ let!(:user) { create(:user, name: 'John Doe', username: 'john.doe', email: 'john.doe@example.com' ) }
+ let!(:another_user) { create(:user, name: 'Albert Smith', username: 'albert.smith', email: 'albert.smith@example.com' ) }
+ let!(:email) { create(:email, user: another_user) }
it 'returns users with a matching name' do
expect(search_with_secondary_emails(user.name)).to eq([user])
diff --git a/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml b/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml
index 8c590579934..40648bcd3de 100644
--- a/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml
+++ b/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml
@@ -7,7 +7,7 @@ services:
build:
stage: build
script:
- - export IMAGE_TAG=$(echo -en $CI_BUILD_REF_NAME | tr -c '[:alnum:]_.-' '-')
- - docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
+ - export IMAGE_TAG=$(echo -en $CI_COMMIT_REF_NAME | tr -c '[:alnum:]_.-' '-')
+ - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
diff --git a/vendor/gitlab-ci-yml/Maven.gitlab-ci.yml b/vendor/gitlab-ci-yml/Maven.gitlab-ci.yml
index b75f0665bee..91b096654d1 100644
--- a/vendor/gitlab-ci-yml/Maven.gitlab-ci.yml
+++ b/vendor/gitlab-ci-yml/Maven.gitlab-ci.yml
@@ -3,9 +3,9 @@
# For docker image tags see https://hub.docker.com/_/maven/
#
# For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
-#
+#
# This template will build and test your projects as well as create the documentation.
-#
+#
# * Caches downloaded dependencies and plugins between invocation.
# * Does only verify merge requests but deploy built artifacts of the
# master branch.
@@ -24,12 +24,12 @@ variables:
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
# Cache downloaded dependencies and plugins between builds.
-# To keep cache across branches add 'key: "$CI_BUILD_REF_NAME"'
+# To keep cache across branches add 'key: "$CI_JOB_REF_NAME"'
cache:
paths:
- .m2/repository
-# This will only validate and compile stuff and run e.g. maven-enforcer-plugin.
+# This will only validate and compile stuff and run e.g. maven-enforcer-plugin.
# Because some enforcer rules might check dependency convergence and class duplications
# we use `test-compile` here instead of `validate`, so the correct classpath is picked up.
.validate: &validate
diff --git a/vendor/gitlab-ci-yml/OpenShift.gitlab-ci.yml b/vendor/gitlab-ci-yml/OpenShift.gitlab-ci.yml
index 6b6c405a507..d3bb388a1e7 100644
--- a/vendor/gitlab-ci-yml/OpenShift.gitlab-ci.yml
+++ b/vendor/gitlab-ci-yml/OpenShift.gitlab-ci.yml
@@ -38,11 +38,11 @@ review:
<<: *deploy
stage: review
variables:
- APP: $CI_BUILD_REF_NAME
- APP_HOST: $CI_PROJECT_NAME-$CI_BUILD_REF_NAME.$OPENSHIFT_DOMAIN
+ APP: $CI_COMMIT_REF_NAME
+ APP_HOST: $CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN
environment:
- name: review/$CI_BUILD_REF_NAME
- url: http://$CI_PROJECT_NAME-$CI_BUILD_REF_NAME.$OPENSHIFT_DOMAIN
+ name: review/$CI_COMMIT_REF_SLUG
+ url: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN
on_stop: stop-review
only:
- branches
@@ -56,10 +56,10 @@ stop-review:
- oc delete all -l "app=$APP"
when: manual
variables:
- APP: $CI_BUILD_REF_NAME
+ APP: $CI_COMMIT_REF_NAME
GIT_STRATEGY: none
environment:
- name: review/$CI_BUILD_REF_NAME
+ name: review/$CI_COMMIT_REF_SLUG
action: stop
only:
- branches
diff --git a/vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml b/vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml
index 574f9365f14..c644560647f 100644
--- a/vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml
+++ b/vendor/gitlab-ci-yml/autodeploy/Kubernetes.gitlab-ci.yml
@@ -24,12 +24,12 @@ build:
production:
stage: production
variables:
- CI_ENVIRONMENT_URL: http://production.$KUBE_DOMAIN
+ CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME.$KUBE_DOMAIN
script:
- command deploy
environment:
name: production
- url: http://production.$KUBE_DOMAIN
+ url: http://$CI_PROJECT_NAME.$KUBE_DOMAIN
when: manual
only:
- master
@@ -37,24 +37,24 @@ production:
staging:
stage: staging
variables:
- CI_ENVIRONMENT_URL: http://staging.$KUBE_DOMAIN
+ CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN
script:
- command deploy
environment:
name: staging
- url: http://staging.$KUBE_DOMAIN
+ url: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN
only:
- master
review:
stage: review
variables:
- CI_ENVIRONMENT_URL: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
+ CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
script:
- command deploy
environment:
- name: review/$CI_BUILD_REF_NAME
- url: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
+ name: review/$CI_COMMIT_REF_NAME
+ url: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
on_stop: stop_review
only:
- branches
@@ -68,7 +68,7 @@ stop_review:
script:
- command destroy
environment:
- name: review/$CI_BUILD_REF_NAME
+ name: review/$CI_COMMIT_REF_NAME
action: stop
when: manual
only:
diff --git a/vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml b/vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml
index 4d6f4e00ebb..27c9107e0d7 100644
--- a/vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml
+++ b/vendor/gitlab-ci-yml/autodeploy/OpenShift.gitlab-ci.yml
@@ -1,4 +1,4 @@
-# Explaination on the scripts:
+# Explanation on the scripts:
# https://gitlab.com/gitlab-examples/openshift-deploy/blob/master/README.md
image: registry.gitlab.com/gitlab-examples/openshift-deploy
@@ -24,12 +24,12 @@ build:
production:
stage: production
variables:
- CI_ENVIRONMENT_URL: http://production.$KUBE_DOMAIN
+ CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME.$KUBE_DOMAIN
script:
- command deploy
environment:
name: production
- url: http://production.$KUBE_DOMAIN
+ url: http://$CI_PROJECT_NAME.$KUBE_DOMAIN
when: manual
only:
- master
@@ -37,24 +37,24 @@ production:
staging:
stage: staging
variables:
- CI_ENVIRONMENT_URL: http://staging.$KUBE_DOMAIN
+ CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN
script:
- command deploy
environment:
name: staging
- url: http://staging.$KUBE_DOMAIN
+ url: http://$CI_PROJECT_NAME-staging.$KUBE_DOMAIN
only:
- master
review:
stage: review
variables:
- CI_ENVIRONMENT_URL: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
+ CI_ENVIRONMENT_URL: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
script:
- command deploy
environment:
- name: review/$CI_BUILD_REF_NAME
- url: http://$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
+ name: review/$CI_COMMIT_REF_NAME
+ url: http://$CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$KUBE_DOMAIN
on_stop: stop_review
only:
- branches
@@ -68,7 +68,7 @@ stop_review:
script:
- command destroy
environment:
- name: review/$CI_BUILD_REF_NAME
+ name: review/$CI_COMMIT_REF_NAME
action: stop
when: manual
only: