Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/examples')
-rw-r--r--doc/ci/examples/README.md6
-rw-r--r--doc/ci/examples/authenticating-with-hashicorp-vault/index.md5
-rw-r--r--doc/ci/examples/laravel_with_gitlab_and_envoy/index.md22
-rw-r--r--doc/ci/examples/php.md2
-rw-r--r--doc/ci/examples/test-and-deploy-python-application-to-heroku.md1
-rw-r--r--doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md1
-rw-r--r--doc/ci/examples/test-clojure-application.md1
7 files changed, 23 insertions, 15 deletions
diff --git a/doc/ci/examples/README.md b/doc/ci/examples/README.md
index 3238b062752..90273190697 100644
--- a/doc/ci/examples/README.md
+++ b/doc/ci/examples/README.md
@@ -1,6 +1,6 @@
---
stage: Verify
-group: Continuous Integration
+group: Pipeline Execution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
comments: false
type: index
@@ -56,7 +56,7 @@ separate example projects:
## CI/CD templates
Get started with GitLab CI/CD and your favorite programming language or framework by using a
-`.gitlab-ci.yml` [template](https://gitlab.com/gitlab-org/gitlab/tree/master/lib/gitlab/ci/templates).
+`.gitlab-ci.yml` [template](https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates).
When you create a `gitlab-ci.yml` file in the UI, you can
choose one of these templates:
@@ -99,7 +99,7 @@ choose one of these templates:
If a programming language or framework template is not in this list, you can contribute
one. To create a template, submit a merge request
-to [the templates list](https://gitlab.com/gitlab-org/gitlab/tree/master/lib/gitlab/ci/templates).
+to [the templates list](https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates).
### Adding templates to your GitLab installation **(PREMIUM SELF)**
diff --git a/doc/ci/examples/authenticating-with-hashicorp-vault/index.md b/doc/ci/examples/authenticating-with-hashicorp-vault/index.md
index 40ba7cff5f9..fc1e06e91c6 100644
--- a/doc/ci/examples/authenticating-with-hashicorp-vault/index.md
+++ b/doc/ci/examples/authenticating-with-hashicorp-vault/index.md
@@ -50,6 +50,7 @@ The JWT's payload looks like this:
"user_login": "myuser" # GitLab @username
"user_email": "myuser@example.com", # Email of the user executing the job
"pipeline_id": "1212", #
+ "pipeline_source": "web", # Pipeline source, see: https://docs.gitlab.com/ee/ci/yaml/#common-if-clauses-for-rules
"job_id": "1212", #
"ref": "auto-deploy-2020-04-01", # Git ref for this job
"ref_type": "branch", # Git ref type, branch or tag
@@ -202,6 +203,10 @@ read_secrets:
- export PASSWORD="$(vault kv get -field=password secret/myproject/production/db)"
```
+NOTE:
+If you're using a Vault instance provided by HashiCorp Cloud Platform,
+you need to export the `VAULT_NAMESPACE` variable. Its default value is `admin`.
+
![read_secrets staging](img/vault-read-secrets-staging.png)
The following job is able to authenticate using the `myproject-production` role and read secrets under `/secret/myproject/production/`:
diff --git a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
index 5a5e44c03bf..5f08f2954f5 100644
--- a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
+++ b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
@@ -1,6 +1,6 @@
---
stage: Verify
-group: Continuous Integration
+group: Pipeline Execution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
disqus_identifier: 'https://docs.gitlab.com/ee/articles/laravel_with_gitlab_and_envoy/index.html'
author: Mehran Rasulian
@@ -78,7 +78,7 @@ git init
git remote add origin git@gitlab.example.com:<USERNAME>/laravel-sample.git
git add .
git commit -m 'Initial Commit'
-git push -u origin master
+git push -u origin main
```
## Configure the production server
@@ -260,7 +260,7 @@ Let's create these three tasks one by one.
#### Clone the repository
-The first task will create the `releases` directory (if it doesn't exist), and then clone the `master` branch of the repository (by default) into the new release directory, given by the `$new_release_dir` variable.
+The first task will create the `releases` directory (if it doesn't exist), and then clone the `main` branch of the repository (by default) into the new release directory, given by the `$new_release_dir` variable.
The `releases` directory will hold all our deployments:
```php
@@ -378,14 +378,14 @@ These are persistent data and will be shared to every new release.
Now, we would need to deploy our app by running `envoy run deploy`, but it won't be necessary since GitLab can handle that for us with CI's [environments](../../environments/index.md), which will be described [later](#setting-up-gitlab-cicd) in this tutorial.
-Now it's time to commit [Envoy.blade.php](https://gitlab.com/mehranrasulian/laravel-sample/blob/master/Envoy.blade.php) and push it to the `master` branch.
-To keep things simple, we commit directly to `master`, without using [feature-branches](../../../topics/gitlab_flow.md#github-flow-as-a-simpler-alternative) since collaboration is beyond the scope of this tutorial.
+Now it's time to commit [Envoy.blade.php](https://gitlab.com/mehranrasulian/laravel-sample/blob/master/Envoy.blade.php) and push it to the `main` branch.
+To keep things simple, we commit directly to `main`, without using [feature-branches](../../../topics/gitlab_flow.md#github-flow-as-a-simpler-alternative) since collaboration is beyond the scope of this tutorial.
In a real world project, teams may use [Issue Tracker](../../../user/project/issues/index.md) and [Merge Requests](../../../user/project/merge_requests/index.md) to move their code across branches:
```shell
git add Envoy.blade.php
git commit -m 'Add Envoy'
-git push origin master
+git push origin main
```
## Continuous Integration with GitLab
@@ -474,7 +474,7 @@ Let's commit the `Dockerfile` file.
```shell
git add Dockerfile
git commit -m 'Add Dockerfile'
-git push origin master
+git push origin main
```
### Setting up GitLab CI/CD
@@ -523,7 +523,7 @@ deploy_production:
url: http://192.168.1.1
when: manual
only:
- - master
+ - main
```
That's a lot to take in, isn't it? Let's run through it step by step.
@@ -595,7 +595,7 @@ If the SSH keys have added successfully, we can run Envoy.
As mentioned before, GitLab supports [Continuous Delivery](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#continuous-delivery) methods as well.
The [environment](../../yaml/README.md#environment) keyword tells GitLab that this job deploys to the `production` environment.
The `url` keyword is used to generate a link to our application on the GitLab Environments page.
-The `only` keyword tells GitLab CI/CD that the job should be executed only when the pipeline is building the `master` branch.
+The `only` keyword tells GitLab CI/CD that the job should be executed only when the pipeline is building the `main` branch.
Lastly, `when: manual` is used to turn the job from running automatically to a manual action.
```yaml
@@ -616,7 +616,7 @@ deploy_production:
url: http://192.168.1.1
when: manual
only:
- - master
+ - main
```
You may also want to add another job for [staging environment](https://about.gitlab.com/blog/2021/02/05/ci-deployment-and-environments/), to final test your application before deploying to production.
@@ -624,7 +624,7 @@ You may also want to add another job for [staging environment](https://about.git
### Turn on GitLab CI/CD
We have prepared everything we need to test and deploy our app with GitLab CI/CD.
-To do that, commit and push `.gitlab-ci.yml` to the `master` branch. It will trigger a pipeline, which you can watch live under your project's **Pipelines**.
+To do that, commit and push `.gitlab-ci.yml` to the `main` branch. It will trigger a pipeline, which you can watch live under your project's **Pipelines**.
![pipelines page](img/pipelines_page.png)
diff --git a/doc/ci/examples/php.md b/doc/ci/examples/php.md
index 53014585f2e..fc639b19ca0 100644
--- a/doc/ci/examples/php.md
+++ b/doc/ci/examples/php.md
@@ -1,6 +1,6 @@
---
stage: Verify
-group: Continuous Integration
+group: Pipeline Execution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
type: tutorial
---
diff --git a/doc/ci/examples/test-and-deploy-python-application-to-heroku.md b/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
index 4a6555a58a6..94cfb8c1c58 100644
--- a/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
+++ b/doc/ci/examples/test-and-deploy-python-application-to-heroku.md
@@ -1,5 +1,6 @@
---
redirect_to: 'README.md#contributed-examples'
+remove_date: '2021-06-01'
---
This document was moved to [another location](README.md#contributed-examples).
diff --git a/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md b/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md
index 4a6555a58a6..94cfb8c1c58 100644
--- a/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md
+++ b/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md
@@ -1,5 +1,6 @@
---
redirect_to: 'README.md#contributed-examples'
+remove_date: '2021-06-01'
---
This document was moved to [another location](README.md#contributed-examples).
diff --git a/doc/ci/examples/test-clojure-application.md b/doc/ci/examples/test-clojure-application.md
index 8aa1fb21275..cb4040212ad 100644
--- a/doc/ci/examples/test-clojure-application.md
+++ b/doc/ci/examples/test-clojure-application.md
@@ -1,5 +1,6 @@
---
redirect_to: 'README.md#contributed-examples'
+remove_date: '2021-05-26'
---
This document was moved to [another location](README.md#contributed-examples).