Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(private-registry): add gitlab-token Composer auth #51

Merged
merged 3 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.12.0](https://github.com/le-phare/ansible-deploy/compare/v1.11.0...v1.12.0) (2024-07-02)

### Features

* **private registry:** allow set gitlab-token Composer auth ([#51](https://github.com/le-phare/ansible-deploy/pull/51))([6abce76](https://github.com/le-phare/ansible-deploy/pull/51/commits/6abce764e7654c7b807c63b68b66f3c8ee85c280))

## [1.11.0](https://github.com/le-phare/ansible-deploy/compare/v1.10.1...v1.11.0) (2023-09-28)

### Features
Expand Down
2 changes: 1 addition & 1 deletion config/before_composer.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- include_tasks: "../../lephare.ansible-deploy/config/steps/composer/private_registry.yml"
when: lephare_packagist_com_token is defined
when: lephare_packagist_com_token is defined or lephare_gitlab_token is defined

- name: Set release environment variable
shell: chdir={{ansistrano_release_path.stdout}}
Expand Down
2 changes: 1 addition & 1 deletion config/steps/composer/private_registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
src: composer/auth.json.j2
dest: "{{ lephare_composer_home }}/auth.json"
mode: 0600
when: lephare_packagist_com_token is defined
when: lephare_packagist_com_token is defined or lephare_gitlab_token is defined
2 changes: 1 addition & 1 deletion docs/composer/private-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Conditions

`lephare_packagist_com_token` must be set.
`lephare_packagist_com_token` or `lephare_gitlab_token` must be set.

## When

Expand Down
4 changes: 3 additions & 1 deletion templates/composer/auth.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"bitbucket-oauth": {},
"github-oauth": {},
"gitlab-oauth": {},
"gitlab-token": {},
"gitlab-token": {
"gitlab.com": "{{ lephare_gitlab_token }}"
},
"http-basic": {
"repo.packagist.com": {
"username": "token",
Expand Down