{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2546","repository_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide","labels_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2546/labels{/name}","comments_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2546/comments","events_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2546/events","html_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2546","id":289363855,"number":2546,"title":"Script to auto-upload / update ansible galaxy roles from SSG","user":{"login":"mpreisler","id":753153,"avatar_url":"https://avatars1.githubusercontent.com/u/753153?v=4","gravatar_id":"","url":"https://api.github.com/users/mpreisler","html_url":"https://github.com/mpreisler","followers_url":"https://api.github.com/users/mpreisler/followers","following_url":"https://api.github.com/users/mpreisler/following{/other_user}","gists_url":"https://api.github.com/users/mpreisler/gists{/gist_id}","starred_url":"https://api.github.com/users/mpreisler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpreisler/subscriptions","organizations_url":"https://api.github.com/users/mpreisler/orgs","repos_url":"https://api.github.com/users/mpreisler/repos","events_url":"https://api.github.com/users/mpreisler/events{/privacy}","received_events_url":"https://api.github.com/users/mpreisler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/milestones/34","html_url":"https://github.com/OpenSCAP/scap-security-guide/milestone/34","labels_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/milestones/34/labels","id":2878787,"number":34,"title":"0.1.38","description":"","creator":{"login":"yuumasato","id":7460169,"avatar_url":"https://avatars0.githubusercontent.com/u/7460169?v=4","gravatar_id":"","url":"https://api.github.com/users/yuumasato","html_url":"https://github.com/yuumasato","followers_url":"https://api.github.com/users/yuumasato/followers","following_url":"https://api.github.com/users/yuumasato/following{/other_user}","gists_url":"https://api.github.com/users/yuumasato/gists{/gist_id}","starred_url":"https://api.github.com/users/yuumasato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuumasato/subscriptions","organizations_url":"https://api.github.com/users/yuumasato/orgs","repos_url":"https://api.github.com/users/yuumasato/repos","events_url":"https://api.github.com/users/yuumasato/events{/privacy}","received_events_url":"https://api.github.com/users/yuumasato/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":63,"state":"open","created_at":"2017-10-31T16:43:50Z","updated_at":"2018-02-22T18:42:56Z","due_on":"2018-03-02T08:00:00Z","closed_at":null},"comments":7,"created_at":"2018-01-17T18:16:17Z","updated_at":"2018-02-22T18:50:08Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2546","html_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2546","diff_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2546.diff","patch_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2546.patch"},"body":"#### Description:\r\n\r\n- This is a resubmit of #2466 with substantial changes:\r\n- The upload no longer happens as part of build, instead there is a script in misc that does all the updating\r\n- The script now takes tokens as well as plain text logins, tokens are heavily recommended over login via username\r\n- Be exception safe, if something fails don't leave the cwd at the wrong location\r\n- A ton of minor readability fixes\r\n\r\nKeep in mind that this script is still not perfect. Despite my efforts to make it robust it will still produce undefined states especially when creating a repo is successful but uploading the initial content is not. If that happens the next time it is run it will fail. There are numerous other issues like this. It is very hard for me to fix them all because of how the script is written.\r\n\r\nHow to test:\r\n```\r\ncd build/\r\ncmake -G Ninja ..\r\nninja\r\n../shared/misc/upload_ansible_roles_to_galaxy.py --build-roles-dir ./roles/ --meta-template-path ../shared/misc/galaxy_ansible_role_meta_template.yml\r\n\r\nInput your GitHub credentials:\r\nusername or token: REDACTED\r\npassword (or empty for token): \r\nCreating new Github repository: ssg-centos7-role-stig-satellite-upstream\r\nCreating new Github repository: ssg-rhel7-role-stig-satellite-upstream\r\nCreating new Github repository: ssg-sl7-role-stig-satellite-upstream\r\nCloning into 'ssg-centos7-role-stig-satellite-upstream'...\r\nwarning: You appear to have cloned an empty repository.\r\n- ssg-centos7-role-stig-satellite-upstream was created successfully\r\n[master (root-commit) 1675cfb] Initial commit\r\n 8 files changed, 110 insertions(+)\r\n create mode 100644 README.md\r\n create mode 100644 defaults/main.yml\r\n create mode 100644 handlers/main.yml\r\n create mode 100644 meta/main.yml\r\n create mode 100644 tasks/main.yml\r\n create mode 100644 tests/inventory\r\n create mode 100644 tests/test.yml\r\n create mode 100644 vars/main.yml\r\nCounting objects: 16, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (10/10), done.\r\nWriting objects: 100% (16/16), 2.47 KiB | 843.00 KiB/s, done.\r\nTotal 16 (delta 0), reused 0 (delta 0)\r\nTo github.com:OpenSCAP-Ansible-Roles/ssg-centos7-role-stig-satellite-upstream.git\r\n * [new branch]      master -> master\r\nCloning into 'ssg-rhel7-role-stig-satellite-upstream'...\r\nwarning: You appear to have cloned an empty repository.\r\n- ssg-rhel7-role-stig-satellite-upstream was created successfully\r\n[master (root-commit) 402a660] Initial commit\r\n 8 files changed, 110 insertions(+)\r\n create mode 100644 README.md\r\n create mode 100644 defaults/main.yml\r\n create mode 100644 handlers/main.yml\r\n create mode 100644 meta/main.yml\r\n create mode 100644 tasks/main.yml\r\n create mode 100644 tests/inventory\r\n create mode 100644 tests/test.yml\r\n create mode 100644 vars/main.yml\r\nCounting objects: 16, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (10/10), done.\r\nWriting objects: 100% (16/16), 2.46 KiB | 2.46 MiB/s, done.\r\nTotal 16 (delta 0), reused 0 (delta 0)\r\nTo github.com:OpenSCAP-Ansible-Roles/ssg-rhel7-role-stig-satellite-upstream.git\r\n * [new branch]      master -> master\r\nCloning into 'ssg-sl7-role-stig-satellite-upstream'...\r\nwarning: You appear to have cloned an empty repository.\r\n- ssg-sl7-role-stig-satellite-upstream was created successfully\r\n[master (root-commit) b3d3409] Initial commit\r\n 8 files changed, 110 insertions(+)\r\n create mode 100644 README.md\r\n create mode 100644 defaults/main.yml\r\n create mode 100644 handlers/main.yml\r\n create mode 100644 meta/main.yml\r\n create mode 100644 tasks/main.yml\r\n create mode 100644 tests/inventory\r\n create mode 100644 tests/test.yml\r\n create mode 100644 vars/main.yml\r\nCounting objects: 16, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (10/10), done.\r\nWriting objects: 100% (16/16), 2.46 KiB | 1.23 MiB/s, done.\r\nTotal 16 (delta 0), reused 0 (delta 0)\r\nTo github.com:OpenSCAP-Ansible-Roles/ssg-sl7-role-stig-satellite-upstream.git\r\n * [new branch]      master -> master\r\nProcessing ssg-centos6-role-C2S...\r\nProcessing ssg-centos6-role-CS2...\r\nProcessing ssg-centos6-role-CSCF-RHEL6-MLS...\r\nProcessing ssg-centos6-role-common...\r\nProcessing ssg-centos6-role-desktop...\r\n...\r\n```\r\n\r\n#### Rationale:\r\n\r\n- Manually updating ansible roles is very tedious and nobody can be expected to update ~130 ansible roles every SSG release. This script should make that easier\r\n"},"comment":{"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/comments/367781677","html_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2546#issuecomment-367781677","issue_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2546","id":367781677,"user":{"login":"mpreisler","id":753153,"avatar_url":"https://avatars1.githubusercontent.com/u/753153?v=4","gravatar_id":"","url":"https://api.github.com/users/mpreisler","html_url":"https://github.com/mpreisler","followers_url":"https://api.github.com/users/mpreisler/followers","following_url":"https://api.github.com/users/mpreisler/following{/other_user}","gists_url":"https://api.github.com/users/mpreisler/gists{/gist_id}","starred_url":"https://api.github.com/users/mpreisler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpreisler/subscriptions","organizations_url":"https://api.github.com/users/mpreisler/orgs","repos_url":"https://api.github.com/users/mpreisler/repos","events_url":"https://api.github.com/users/mpreisler/events{/privacy}","received_events_url":"https://api.github.com/users/mpreisler/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T18:50:08Z","updated_at":"2018-02-22T18:50:08Z","author_association":"OWNER","body":"> I also see an artifact in github's README.md which I don't see in Ansible Galaxy, and I don't know where it comes from nor how it is not present in Galaxy. Just before Requirements header there is the following snippet:\r\n> This Ansible role has been generated from the\r\n\r\nLink please, I can't find this."}}
{"actor":{"display_login":"mpreisler"}}