Commit c551fd72 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 333a2e67 a6e90010
import { s__ } from '~/locale';
export const PAGINATION_UI_BUTTON_LIMIT = 4;
export const UI_LIMIT = 6;
export const SPREAD = '...';
export const PREV = s__('Pagination|Prev');
export const NEXT = s__('Pagination|Next');
export const FIRST = s__('Pagination|« First');
export const LAST = s__('Pagination|Last »');
<script>
import { GlButton } from '@gitlab/ui';
import { PREV, NEXT } from '~/vue_shared/components/pagination/constants';
/**
* Pagination Component for graphql API
*/
export default {
name: 'GraphqlPaginationComponent',
components: {
GlButton,
},
labels: {
prev: PREV,
next: NEXT,
},
props: {
hasNextPage: {
required: true,
type: Boolean,
},
hasPreviousPage: {
required: true,
type: Boolean,
},
},
};
</script>
<template>
<div class="justify-content-center d-flex prepend-top-default">
<div class="btn-group">
<gl-button
class="js-prev-btn page-link"
:disabled="!hasPreviousPage"
@click="$emit('previousClicked')"
>{{ $options.labels.prev }}</gl-button
>
<gl-button
class="js-next-btn page-link"
:disabled="!hasNextPage"
@click="$emit('nextClicked')"
>{{ $options.labels.next }}</gl-button
>
</div>
</div>
</template>
<script>
import { s__ } from '../../locale';
const PAGINATION_UI_BUTTON_LIMIT = 4;
const UI_LIMIT = 6;
const SPREAD = '...';
const PREV = s__('Pagination|Prev');
const NEXT = s__('Pagination|Next');
const FIRST = s__('Pagination|« First');
const LAST = s__('Pagination|Last »');
import {
PAGINATION_UI_BUTTON_LIMIT,
UI_LIMIT,
SPREAD,
PREV,
NEXT,
FIRST,
LAST,
} from '~/vue_shared/components/pagination/constants';
export default {
props: {
......
---
title: Adds pagination component for graphql api
merge_request: 29277
author:
type: added
......@@ -26,8 +26,7 @@ experience with GitLab.com and Enterprise Edition on-premises customers.
For a detailed insight into how GitLab scales and configures GitLab.com, you can
watch [this 1 hour Q&A](https://www.youtube.com/watch?v=uCU8jdYzpac)
with [John Northrup](https://gitlab.com/northrup), one of our infrastructure
engineers, and live questions coming in from some of our customers.
with [John Northrup](https://gitlab.com/northrup), and live questions coming in from some of our customers.
## GitLab Components
......
......@@ -37,6 +37,14 @@ options:
circumstances it could lead to data loss if a failure occurs before data has
synced.
Due to the complexities of running Omnibus with LDAP and the complexities of
maintaining ID mapping without LDAP, in most cases you should enable numeric UIDs
and GIDs (which is off by default in some cases) for simplified permission
management between systems:
- [NetApp instructions](https://library.netapp.com/ecmdocs/ECMP1401220/html/GUID-24367A9F-E17B-4725-ADC1-02D86F56F78E.html)
- For non-NetApp devices, disable NFSv4 `idmapping` by performing opposite of [enable NFSv4 idmapper](https://wiki.archlinux.org/index.php/NFS#Enabling_NFSv4_idmapping)
### Improving NFS performance with GitLab
NOTE: **Note:** This is only available starting in certain versions of GitLab: 11.5.11,
......
......@@ -29,11 +29,11 @@ the development cycle, ensuring that all the code deployed to
production complies with the code standards you established for
your app.
For a:
For a complete overview of these methodologies and GitLab CI/CD,
read the [Introduction to CI/CD with GitLab](introduction/index.md).
- Complete overview of these methodologies and GitLab CI/CD,
read the [Introduction to CI/CD with GitLab](introduction/index.md).
- Video demonstration of GitLab CI/CD, see [Demo: CI/CD with GitLab](https://www.youtube.com/watch?v=1iXFbchozdY).
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For a video demonstration of GitLab CI/CD, see [Demo: CI/CD with GitLab](https://www.youtube.com/watch?v=1iXFbchozdY).
## Getting started
......
......@@ -5,24 +5,17 @@ type: howto
# Using GitLab CI/CD with a GitHub repository **[PREMIUM]**
GitLab CI/CD can be used with **GitHub.com** and **GitHub Enterprise** by
creating a [CI/CD project](https://docs.gitlab.com/ee/user/project/ci_cd_for_external_repo.html) to connect your GitHub repository to
creating a [CI/CD project](index.md) to connect your GitHub repository to
GitLab.
NOTE: **Note:**
To use **GitHub Enterprise** with **GitLab.com** you should use the
manual method.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
Watch a video on [Using GitLab CI/CD pipelines with GitHub repositories](https://www.youtube.com/watch?v=qgl3F2j-1cI).
## Connect with GitHub integration
If the [GitHub integration](../../integration/github.md) has been enabled by your GitLab
administrator:
NOTE: **Note:**
Due to a 10-token limitation on the [GitHub OAuth Implementation](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#creating-multiple-tokens-for-oauth-apps),
if you import more than 10 times, your oldest imported project's token will be
revoked. See issue [#9147](https://gitlab.com/gitlab-org/gitlab-ee/issues/9147)
for more information.
1. In GitLab create a **CI/CD for external repo** project and select
**GitHub**.
......@@ -42,6 +35,12 @@ GitLab will:
1. Enable [GitHub project integration](https://docs.gitlab.com/ee/user/project/integrations/github.html).
1. Create a web hook on GitHub to notify GitLab of new commits.
CAUTION: **Caution:**
Due to a 10-token limitation on the [GitHub OAuth Implementation](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#creating-multiple-tokens-for-oauth-apps),
if you import more than 10 times, your oldest imported project's token will be
revoked. See issue [#9147](https://gitlab.com/gitlab-org/gitlab-ee/issues/9147)
for more information.
## Connect with Personal Access Token
NOTE: **Note:**
......@@ -79,6 +78,9 @@ GitLab will:
## Connect manually
NOTE: **Note:**
To use **GitHub Enterprise** with **GitLab.com** use this method.
If the [GitHub integration](../../integration/github.md) is not enabled, or is enabled
for a different GitHub instance, you GitLab CI/CD can be manually enabled for
your repository:
......
......@@ -4,12 +4,12 @@ type: index, howto
# GitLab CI/CD for external repositories **[PREMIUM]**
>[Introduced][ee-4642] in [GitLab Premium][eep] 10.6.
NOTE: **Note:**
This feature [is available for free](https://about.gitlab.com/2019/03/21/six-more-months-ci-cd-github/) to
GitLab.com users until September 22nd, 2019.
>[Introduced][ee-4642] in [GitLab Premium][eep] 10.6.
GitLab CI/CD can be used with:
- [GitHub](github_integration.md).
......
......@@ -63,6 +63,12 @@ For examples of setting up GitLab CI/CD for cloud-based environments, see:
- [How to autoscale continuous deployment with GitLab Runner on DigitalOcean](https://about.gitlab.com/2018/06/19/autoscale-continuous-deployment-gitlab-runner-digital-ocean/)
- [How to create a CI/CD pipeline with Auto Deploy to Kubernetes using GitLab and Helm](https://about.gitlab.com/2017/09/21/how-to-create-ci-cd-pipeline-with-autodeploy-to-kubernetes-using-gitlab-and-helm/)
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
See also the following video overviews:
- [Containers, Schedulers, and GitLab CI](https://www.youtube.com/watch?v=d-9awBxEbvQ).
- [Deploying to IBM Cloud with GitLab CI/CD](https://www.youtube.com/watch?v=6ZF4vgKMd-g).
### Customer stories
For some customer experiences with GitLab CI/CD, see:
......
......@@ -205,6 +205,9 @@ With GitLab CI/CD you can also:
To see all CI/CD features, navigate back to the [CI/CD index](../README.md).
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
Watch the video [GitLab CI Live Demo](https://www.youtube.com/watch?v=pBe4t1CD8Fc) with a deeper overview of GitLab CI/CD.
### Setting up GitLab CI/CD for the first time
To get started with GitLab CI/CD, you need to familiarize yourself
......
......@@ -19,6 +19,9 @@ GitLab's Jenkins integration allows you to trigger a Jenkins build when you
push code to a repository, or when a merge request is created. Additionally,
it shows the pipeline status on merge requests widgets and on the project's home page.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For a video overview, see [Migrating from Jenkins to GitLab](https://www.youtube.com/watch?v=RlEVGOpYF5Y).
## Use cases
- Suppose you are new to GitLab, and want to keep using Jenkins until you prepare
......@@ -30,6 +33,8 @@ running with Jenkins, but view the results in your project's repository in GitLa
therefore, you opt for keep using Jenkins to build your apps. Show the results of your
pipelines directly in GitLab.
For a real use case, read the blog post [Continuous integration: From Jenkins to GitLab using Docker](https://about.gitlab.com/2017/07/27/docker-my-precious/).
## Requirements
* [Jenkins GitLab Plugin](https://wiki.jenkins.io/display/JENKINS/GitLab+Plugin)
......
......@@ -49,16 +49,10 @@ Otherwise, you can:
## Add your license at install time
The license may be automatically injected during installation using one of
two methods.
A license can be automatically imported at install time, by placing a file named
`Gitlab.gitlab-license` in `/etc/gitlab/` for Omnibus, or `config/` for source installations.
The first requires a license file named `Gitlab.gitlab-release`.
Place it in the `config/` directory if installing from source or in the
`/etc/gitlab/` directory if installing Omnibus.
The second allows the administrator to configure the location and
filename of the license.
It is also possible to specify a custom location and filename for the license.
Source installations should set the `GITLAB_LICENSE_FILE` environment
variable with the path to a valid GitLab Enterprise Edition license.
......
import { shallowMount } from '@vue/test-utils';
import GraphqlPagination from '~/vue_shared/components/pagination/graphql_pagination.vue';
describe('Graphql Pagination component', () => {
let wrapper;
function factory({ hasNextPage = true, hasPreviousPage = true }) {
wrapper = shallowMount(GraphqlPagination, {
propsData: {
hasNextPage,
hasPreviousPage,
},
});
}
afterEach(() => {
wrapper.destroy();
});
describe('without previous page', () => {
beforeEach(() => {
factory({ hasPreviousPage: false });
});
it('renders disabled previous button', () => {
expect(wrapper.find('.js-prev-btn').attributes().disabled).toEqual('true');
});
});
describe('with previous page', () => {
beforeEach(() => {
factory({ hasPreviousPage: true });
});
it('renders enabled previous button', () => {
expect(wrapper.find('.js-prev-btn').attributes().disabled).toEqual(undefined);
});
it('emits previousClicked on click', () => {
wrapper.find('.js-prev-btn').vm.$emit('click');
expect(wrapper.emitted().previousClicked.length).toBe(1);
});
});
describe('without next page', () => {
beforeEach(() => {
factory({ hasNextPage: false });
});
it('renders disabled next button', () => {
expect(wrapper.find('.js-next-btn').attributes().disabled).toEqual('true');
});
});
describe('with next page', () => {
beforeEach(() => {
factory({ hasNextPage: true });
});
it('renders enabled next button', () => {
expect(wrapper.find('.js-next-btn').attributes().disabled).toEqual(undefined);
});
it('emits nextClicked on click', () => {
wrapper.find('.js-next-btn').vm.$emit('click');
expect(wrapper.emitted().nextClicked.length).toBe(1);
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment