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

add new module with integration tests to manage gitlab project variables #56574

Open
wants to merge 34 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@markuman
Copy link

commented May 17, 2019

SUMMARY

A new module to manage gitlab project variables

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

gitlab_project_variable

ADDITIONAL INFORMATION

The integration test can be run on any gitlab host. Just add three variable to test/integration/integration_config.yml and run test/runner/ansible-test integration -v --python 3.7 gitlab_project_variable --docker --allow-disabled

diff --git a/test/integration/integration_config.yml b/test/integration/integration_config.yml
index 6b47a35dc1..60605ed585 100644
--- a/test/integration/integration_config.yml
+++ b/test/integration/integration_config.yml
@@ -1,3 +1,7 @@
 ---
 win_output_dir: 'C:\ansible_testing'
 output_dir: ~/ansible_testing
+gitlab_host: https://gitlab.com
+gitlab_login_token: secret-access-token
+gitlab_project_name: markuman/dotfiles
+
test.yml
---
- hosts: localhost
  gather_facts: False

  tasks:
    - name: Set or update some CI/CD variables
      gitlab_project_variables:
        server_url: https://gitlab.com
        login_token: secret-access-token
        name: markuman/dotfiles
        purge_vars: True
        vars:
          - ACCESS_KEY_ID: abc123
          - SECRET_ACCESS_KEY: 321cba
invoke test.yml
markuman:~/git/ansible$ ansible-playbook test.yml 

PLAY [localhost] *******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Set or update some CI/CD variables] ******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
changed: [localhost]

PLAY RECAP *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

markuman:~/git/ansible$ ansible-playbook test.yml 

PLAY [localhost] *******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

TASK [Set or update some CI/CD variables] ******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [localhost]

PLAY RECAP *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

@markuman This PR contains @ mentions in at least one commit message. Those mentions can cause cascading notifications through GitHub and need to be removed. Please squash or amend your commits to remove the mentions.

click here for bot help

Markus Bergholz

@markuman markuman force-pushed the markuman:gitlab_project_variable branch from 72f6e95 to 4cba208 May 17, 2019

Markus Bergholz
@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

@Lunik @SamyCoenen @adrianmoisey @andreparames @bincyber @catcombo @dj-wasabi @djmattyg007 @dsummersl @marwatk @mgedmin @pcgentry @stpierre @waheedi @yeukhon

As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add shipit if you would like to see it merged.

click here for bot help

@markuman

This comment has been minimized.

Copy link
Author

commented May 20, 2019

@Lunik Thanks a lot for your detailed review.
I hope I took into account everything you've mentioned.

@markuman

This comment has been minimized.

Copy link
Author

commented May 20, 2019

@Lunik Thx again. I've reworked the five suggestions

@Lunik

This comment has been minimized.

Copy link
Contributor

commented May 20, 2019

Great work, can you close reviews is you have properly made the modifications

@markuman

This comment has been minimized.

Copy link
Author

commented May 22, 2019

@Lunik Do you have some time to make a final review again?

@Lunik Lunik referenced this pull request May 28, 2019

Open

GitLab community pinboard #431

@ansibot ansibot added the stale_ci label May 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.