diff --git a/app/assets/javascripts/monitoring/components/charts/annotations.js b/app/assets/javascripts/monitoring/components/charts/annotations.js index de2b0c69a88..947750b3721 100644 --- a/app/assets/javascripts/monitoring/components/charts/annotations.js +++ b/app/assets/javascripts/monitoring/components/charts/annotations.js @@ -45,19 +45,16 @@ export const annotationsYAxis = { * Fetched list of annotations are parsed into a * format the eCharts accepts to draw markLines * - * If Annotation is a single line, the `from` property - * has a value and the `to` is null. Because annotations - * only supports lines the from value does not exist yet. + * If Annotation is a single line, the `starting_at` property + * has a value and the `ending_at` is null. Because annotations + * only supports lines the `ending_at` value does not exist yet. * * * @param {Object} annotation object * @returns {Object} markLine object */ -export const parseAnnotations = ({ - from: annotationFrom = '', - color = colorValues.primaryColor, -}) => ({ - xAxis: annotationFrom, +export const parseAnnotations = ({ starting_at = '', color = colorValues.primaryColor }) => ({ + xAxis: starting_at, lineStyle: { color, }, @@ -105,7 +102,7 @@ export const generateAnnotationsSeries = ({ deployments = [], annotations = [] } const annotationsData = annotations.map(annotation => { return { name: 'annotations', - value: [annotation.from, annotationsYAxisCoords.pos], + value: [annotation.starting_at, annotationsYAxisCoords.pos], // style options symbol: 'none', // metadata that are accessible in `formatTooltipText` method diff --git a/app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql b/app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql index e2edaa707b2..2fd698eadf9 100644 --- a/app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql +++ b/app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql @@ -4,8 +4,8 @@ query getAnnotations($projectPath: ID!) { annotations: nodes { id description - from - to + starting_at + ending_at panelId } } diff --git a/app/assets/javascripts/pages/projects/commits/show/index.js b/app/assets/javascripts/pages/projects/commits/show/index.js index ad671ce9351..b456baac612 100644 --- a/app/assets/javascripts/pages/projects/commits/show/index.js +++ b/app/assets/javascripts/pages/projects/commits/show/index.js @@ -2,8 +2,11 @@ import CommitsList from '~/commits'; import GpgBadges from '~/gpg_badges'; import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation'; +import mountCommits from '~/projects/commits'; + document.addEventListener('DOMContentLoaded', () => { new CommitsList(document.querySelector('.js-project-commits-show').dataset.commitsLimit); // eslint-disable-line no-new new ShortcutsNavigation(); // eslint-disable-line no-new GpgBadges.fetch(); + mountCommits(document.getElementById('js-author-dropdown')); }); diff --git a/app/assets/javascripts/projects/commits/components/author_select.vue b/app/assets/javascripts/projects/commits/components/author_select.vue new file mode 100644 index 00000000000..78f9389b80c --- /dev/null +++ b/app/assets/javascripts/projects/commits/components/author_select.vue @@ -0,0 +1,141 @@ + + + diff --git a/app/assets/javascripts/projects/commits/index.js b/app/assets/javascripts/projects/commits/index.js new file mode 100644 index 00000000000..6f85432a77e --- /dev/null +++ b/app/assets/javascripts/projects/commits/index.js @@ -0,0 +1,26 @@ +import Vue from 'vue'; +import Vuex from 'vuex'; +import AuthorSelectApp from './components/author_select.vue'; +import store from './store'; + +Vue.use(Vuex); + +export default el => { + if (!el) { + return null; + } + + store.dispatch('setInitialData', el.dataset); + + return new Vue({ + el, + store, + render(h) { + return h(AuthorSelectApp, { + props: { + projectCommitsEl: document.querySelector('.js-project-commits-show'), + }, + }); + }, + }); +}; diff --git a/app/assets/javascripts/projects/commits/store/actions.js b/app/assets/javascripts/projects/commits/store/actions.js new file mode 100644 index 00000000000..daeae071d6a --- /dev/null +++ b/app/assets/javascripts/projects/commits/store/actions.js @@ -0,0 +1,31 @@ +import * as types from './mutation_types'; +import axios from '~/lib/utils/axios_utils'; +import createFlash from '~/flash'; +import { __ } from '~/locale'; + +export default { + setInitialData({ commit }, data) { + commit(types.SET_INITIAL_DATA, data); + }, + receiveAuthorsSuccess({ commit }, authors) { + commit(types.COMMITS_AUTHORS, authors); + }, + receiveAuthorsError() { + createFlash(__('An error occurred fetching the project authors.')); + }, + fetchAuthors({ dispatch, state }, author = null) { + const { projectId } = state; + const path = '/autocomplete/users.json'; + + return axios + .get(path, { + params: { + project_id: projectId, + active: true, + search: author, + }, + }) + .then(({ data }) => dispatch('receiveAuthorsSuccess', data)) + .catch(() => dispatch('receiveAuthorsError')); + }, +}; diff --git a/app/assets/javascripts/projects/commits/store/index.js b/app/assets/javascripts/projects/commits/store/index.js new file mode 100644 index 00000000000..e864ef5716e --- /dev/null +++ b/app/assets/javascripts/projects/commits/store/index.js @@ -0,0 +1,15 @@ +import Vue from 'vue'; +import Vuex from 'vuex'; +import actions from './actions'; +import mutations from './mutations'; +import state from './state'; + +Vue.use(Vuex); + +export const createStore = () => ({ + actions, + mutations, + state: state(), +}); + +export default new Vuex.Store(createStore()); diff --git a/app/assets/javascripts/projects/commits/store/mutation_types.js b/app/assets/javascripts/projects/commits/store/mutation_types.js new file mode 100644 index 00000000000..0a6a5a0b902 --- /dev/null +++ b/app/assets/javascripts/projects/commits/store/mutation_types.js @@ -0,0 +1,2 @@ +export const SET_INITIAL_DATA = 'SET_INITIAL_DATA'; +export const COMMITS_AUTHORS = 'COMMITS_AUTHORS'; diff --git a/app/assets/javascripts/projects/commits/store/mutations.js b/app/assets/javascripts/projects/commits/store/mutations.js new file mode 100644 index 00000000000..11f703c0946 --- /dev/null +++ b/app/assets/javascripts/projects/commits/store/mutations.js @@ -0,0 +1,10 @@ +import * as types from './mutation_types'; + +export default { + [types.SET_INITIAL_DATA](state, data) { + Object.assign(state, data); + }, + [types.COMMITS_AUTHORS](state, data) { + state.commitsAuthors = data; + }, +}; diff --git a/app/assets/javascripts/projects/commits/store/state.js b/app/assets/javascripts/projects/commits/store/state.js new file mode 100644 index 00000000000..f074708ffa2 --- /dev/null +++ b/app/assets/javascripts/projects/commits/store/state.js @@ -0,0 +1,5 @@ +export default () => ({ + commitsPath: null, + projectId: null, + commitsAuthors: [], +}); diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss index b6edadb05a9..f746d7e6f69 100644 --- a/app/assets/stylesheets/framework/dropdowns.scss +++ b/app/assets/stylesheets/framework/dropdowns.scss @@ -317,7 +317,10 @@ } } - .dropdown-item { + // Temporary fix to ensure tick is aligned + // Follow up Issue to remove after the GlNewDropdownItem component is fixed + // > https://gitlab.com/gitlab-org/gitlab/-/issues/213948 + li:not(.gl-new-dropdown-item) .dropdown-item { @include dropdown-link; } diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 3f1d44a488a..7722a3523a1 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -13,7 +13,8 @@ %ul.breadcrumb.repo-breadcrumb = commits_breadcrumbs - .tree-controls.d-none.d-sm-none.d-md-block< + #js-author-dropdown{ data: { 'commits_path': project_commits_path(@project), 'project_id': @project.id } } + .tree-controls.d-none.d-sm-none.d-md-block - if @merge_request.present? .control = link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'btn' diff --git a/changelogs/unreleased/14984-show-commits-by-author.yml b/changelogs/unreleased/14984-show-commits-by-author.yml new file mode 100644 index 00000000000..89f90c074ca --- /dev/null +++ b/changelogs/unreleased/14984-show-commits-by-author.yml @@ -0,0 +1,5 @@ +--- +title: Add ability to filter commits by author +merge_request: 28509 +author: +type: added diff --git a/changelogs/unreleased/feat-x509-update-signatures-rake-task.yml b/changelogs/unreleased/feat-x509-update-signatures-rake-task.yml new file mode 100644 index 00000000000..6edc495a6e7 --- /dev/null +++ b/changelogs/unreleased/feat-x509-update-signatures-rake-task.yml @@ -0,0 +1,5 @@ +--- +title: Add rake task to update x509 signatures +merge_request: 28406 +author: Roger Meier +type: added diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md index acdc61d008f..0ae7a10a290 100644 --- a/doc/ci/docker/using_docker_build.md +++ b/doc/ci/docker/using_docker_build.md @@ -147,7 +147,12 @@ released. #### TLS enabled NOTE: **Note** -This requires GitLab Runner 11.11 or higher. +Requires GitLab Runner 11.11 or later, but is not supported if GitLab +Runner is installed using the [Helm +chart](https://docs.gitlab.com/runner/install/kubernetes.html). See the +[related +issue](https://gitlab.com/gitlab-org/charts/gitlab-runner/issues/83) for +details. The Docker daemon supports connection over TLS and it's done by default for Docker 19.03.8 or higher. This is the **suggested** way to use the diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index e5d619ea00c..e79d44cb057 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -1264,7 +1264,9 @@ osx job: `allow_failure` allows a job to fail without impacting the rest of the CI suite. -The default value is `false`, except for [manual](#whenmanual) jobs. +The default value is `false`, except for [manual](#whenmanual) jobs using the +`when: manual` syntax, unless using [`rules:`](#rules) syntax, where all jobs +default to false, *including* `when: manual` jobs. When enabled and the job fails, the job will show an orange warning in the UI. However, the logical flow of the pipeline will consider the job a @@ -1379,14 +1381,17 @@ manual action by clicking a _play_ button. When a pipeline is blocked, it will not be merged if Merge When Pipeline Succeeds is set. Blocked pipelines also do have a special status, called _manual_. -Manual actions are non-blocking by default. If you want to make manual action -blocking, it is necessary to add `allow_failure: false` to the job's definition -in `.gitlab-ci.yml`. +When the `when:manual` syntax is used, manual actions are non-blocking by +default. If you want to make manual action blocking, it is necessary to add +`allow_failure: false` to the job's definition in `.gitlab-ci.yml`. Optional manual actions have `allow_failure: true` set by default and their Statuses do not contribute to the overall pipeline status. So, if a manual action fails, the pipeline will eventually succeed. +NOTE: **Note:** +When using [`rules:`](#rules), `allow_failure` defaults to `false`, including for manual jobs. + Manual actions are considered to be write actions, so permissions for [protected branches](../../user/project/protected_branches.md) are used when a user wants to trigger an action. In other words, in order to trigger a manual diff --git a/doc/raketasks/README.md b/doc/raketasks/README.md index 8faace58599..1670849016c 100644 --- a/doc/raketasks/README.md +++ b/doc/raketasks/README.md @@ -36,3 +36,4 @@ The following are available Rake tasks: | [Uploads sanitize](../administration/raketasks/uploads/sanitize.md) | Remove EXIF data from images uploaded to earlier versions of GitLab. | | [User management](user_management.md) | Perform user management tasks. | | [Webhooks administration](web_hooks.md) | Maintain project Webhooks. | +| [X509 signatures](x509_signatures.md) | Update x509 commit signatures, useful if certificate store has changed. | diff --git a/doc/raketasks/x509_signatures.md b/doc/raketasks/x509_signatures.md new file mode 100644 index 00000000000..dd518997f7b --- /dev/null +++ b/doc/raketasks/x509_signatures.md @@ -0,0 +1,22 @@ +# X509 signatures + +When [signing commits with x509](../user/project/repository/x509_signed_commits/index.md) +the trust anchor might change and the signatures stored within the database have +to be updated. + +## Update all x509 signatures + +This task loops through all X509 signed commits and updates their verification +based on current certificate store. + +**Omnibus Installation** + +```shell +sudo gitlab-rake gitlab:x509:update_signatures +``` + +**Source Installation** + +```shell +sudo -u git -H bundle exec rake gitlab:x509:update_signatures RAILS_ENV=production +``` diff --git a/doc/subscriptions/index.md b/doc/subscriptions/index.md index 12d5aa1e29f..63a10fdf4be 100644 --- a/doc/subscriptions/index.md +++ b/doc/subscriptions/index.md @@ -8,8 +8,8 @@ GitLab offers tiers of features. Your subscription determines which tier you hav GitLab provides special subscriptions to participants in the [GitLab Education Program](https://about.gitlab.com/solutions/education/) and [GitLab Open Source Program](https://about.gitlab.com/solutions/open-source/). For details on obtaining and renewing these subscriptions, see: -- [GitLab Education Program subscriptions](#gitlab-education-program-subscriptions) -- [GitLab Open Source Program subscriptions](#gitlab-open-source-program-subscriptions) +- [GitLab for Education subscriptions](#gitlab-for-education-subscriptions) +- [GitLab for Open Source subscriptions](#gitlab-for-open-source-subscriptions) ## Choosing a GitLab subscription @@ -493,9 +493,9 @@ Learn more about: - The tiers of [GitLab Support](https://about.gitlab.com/support/). - [Submit a request via the Support Portal](https://support.gitlab.com/hc/en-us/requests/new). -## GitLab Education Program subscriptions +## GitLab for Education subscriptions -To renew a [GitLab Education Program](https://about.gitlab.com/solutions/education/) subscription, send an email to `education@gitlab.com` with the following information: +To renew a [GitLab for Education](https://about.gitlab.com/solutions/education/) subscription, send an email to `education@gitlab.com` with the following information: 1. The number of seats for the renewal. You can add seats if needed. 1. The use case for the license. Specifically, we need verification that the use meets the conditions of the [End User License Agreement](https://about.gitlab.com/terms/#edu-oss). Note that university infrastructure operations and information technology operations don't fall within the stated terms of the Education Program. For details, see the [Education FAQ](https://about.gitlab.com/solutions/education/#FAQ). @@ -503,9 +503,9 @@ To renew a [GitLab Education Program](https://about.gitlab.com/solutions/educati After we receive the above information, we will process the request and return a renewal quote for signature. Please allow a minimum of 2 business days for return. Email us at `education@gitlab.com` with any questions. -## GitLab Open Source Program subscriptions +## GitLab for Open Source subscriptions -All requests for our GitLab Open Source program, including subscription renewals, must be made by using the [Open Source Program](https://about.gitlab.com/solutions/open-source/program/) application process. If you have any questions, send an email to `opensource@gitlab.com` for assistance. +All [GitLab for Open Source](https://about.gitlab.com/solutions/open-source/program/) requests, including subscription renewals, must be made by using the application process. If you have any questions, send an email to `opensource@gitlab.com` for assistance.