Commit d51370d4 authored by Nick Gaskill's avatar Nick Gaskill

Merge branch 'tmaier-master-patch-57039' into 'master'

Docs: Use $CI_API_V4_URL in Ruby gems Package Registry documentation

See merge request gitlab-org/gitlab!62333
parents 2c7ec91b a5072b71
...@@ -88,11 +88,11 @@ run: ...@@ -88,11 +88,11 @@ run:
- mkdir ~/.gem - mkdir ~/.gem
- echo "---" > ~/.gem/credentials - echo "---" > ~/.gem/credentials
- | - |
echo "https://gitlab.example.com/api/v4/projects/${CI_PROJECT_ID}/packages/rubygems: '${CI_JOB_TOKEN}'" >> ~/.gem/credentials echo "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/rubygems: '${CI_JOB_TOKEN}'" >> ~/.gem/credentials
- chmod 0600 ~/.gem/credentials # rubygems requires 0600 permissions on the credentials file - chmod 0600 ~/.gem/credentials # rubygems requires 0600 permissions on the credentials file
script: script:
- gem build my_gem - gem build my_gem
- gem push my_gem-0.0.1.gem --host https://gitlab.example.com/api/v4/projects/${CI_PROJECT_ID}/packages/rubygems - gem push my_gem-0.0.1.gem --host ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/rubygems
``` ```
You can also use `CI_JOB_TOKEN` in a `~/.gem/credentials` file that you check in to You can also use `CI_JOB_TOKEN` in a `~/.gem/credentials` file that you check in to
......
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