Skip to content

Commit

Permalink
feat(private-registry): add gitlab-token Composer auth (#51)
Browse files Browse the repository at this point in the history
* feat(private-registry): add gitlab-token Composer auth

* doc(private-registry): update changelog for 1.12.0 version

* doc(private-registry): update changelog for 1.12.0 version
  • Loading branch information
pierreboissinot authored Jul 2, 2024
1 parent 641c821 commit 1aebaaf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
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

0 comments on commit 1aebaaf

Please sign in to comment.