Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Release artifact build command #116

Closed
4 of 5 tasks
chouseknecht opened this issue Aug 8, 2018 · 4 comments
Closed
4 of 5 tasks

Release artifact build command #116

chouseknecht opened this issue Aug 8, 2018 · 4 comments

Comments

@chouseknecht
Copy link
Contributor

chouseknecht commented Aug 8, 2018

We've been given the green light to move forward with Artifact Build and Import Proposal

In support of that, Mazer needs to have a build command that does the following, as taken directly from the proposal:

From within the root of the project (the Collection or repository directory), the user runs the mazer build command to create a build artifact, which does the following:

  • Verifies galaxy.yml, the collection level meta data file
  • Verifies project directory structure format (Need to figure out details of this. Should we allow extra subdirs and files? Should we require all subdirs to be present? Or, maybe we don't care? The mantra so far has been that we're being prescriptive about how things work, so perhaps we want to be prescriptive here too?)
  • Creates a ‘release’ subdirectory, if it does not already exists
  • Within the ‘release’ subdirectory, creates a Tar GZip archive file that includes the version in the name. For example, v1.0.0.tar.gz
  • To the archive, adds a MANIFEST.json file containing metadata from galaxy.yml, including the version information.
@chouseknecht chouseknecht added this to the 3.1 Sprint 2 milestone Aug 8, 2018
@chouseknecht chouseknecht removed this from the 3.1 Sprint 2 milestone Aug 8, 2018
@chouseknecht chouseknecht changed the title Release artifact build Release artifact build command Aug 8, 2018
@chouseknecht chouseknecht added this to the Mazer 1.0.0 milestone Aug 9, 2018
@alikins
Copy link
Contributor

alikins commented Aug 16, 2018

for #116, for the stuff in the tarball (releases/v1.0.0.tar.gz), what should the name of the top level dir be if there is one?

ie, when v1.0.0.tar.gz is extracted, what would 'some_dir' be below (if there is a top level dir)?

some_dir/
some_dir/MANIFEST.json
some_dir/galaxy.yml
some_dir/README.md
some_dir/roles/
some_dir/roles/some_role/
some_dir/roles/some_role/meta/
some_dir/roles/some_role/meta/main.yml
some_dir/callback_plugins/
some_dir/callback_plugins/some_callback.py

@alikins
Copy link
Contributor

alikins commented Aug 16, 2018

existing traditional role content archives as created by github end up with names like "ansible-role-nginx-2.5.0/"

github download url: https://github.com/geerlingguy/ansible-role-nginx/archive/2.5.0.tar.gz
in tmp as /tmp/tmp-ansible-galaxy-content-archive-q6zy2uwj.tar.gz

galaxy-py27) [newswoop:F27:tmp]$ tar tvfl tmp-ansible-galaxy-content-archive-q6zy2uwj.tar.gz
drwxrwxr-x root/root         0 2017-08-08 14:06 ansible-role-nginx-2.5.0/
-rw-rw-r-- root/root        22 2017-08-08 14:06 ansible-role-nginx-2.5.0/.gitignore
-rw-rw-r-- root/root       866 2017-08-08 14:06 ansible-role-nginx-2.5.0/.travis.yml
-rw-rw-r-- root/root      1080 2017-08-08 14:06 ansible-role-nginx-2.5.0/LICENSE
-rw-rw-r-- root/root     11062 2017-08-08 14:06 ansible-role-nginx-2.5.0/README.md
drwxrwxr-x root/root         0 2017-08-08 14:06 ansible-role-nginx-2.5.0/defaults/
-rw-rw-r-- root/root      2719 2017-08-08 14:06 ansible-role-nginx-2.5.0/defaults/main.yml
drwxrwxr-x root/root         0 2017-08-08 14:06 ansible-role-nginx-2.5.0/handlers/
-rw-rw-r-- root/root       228 2017-08-08 14:06 ansible-role-nginx-2.5.0/handlers/main.yml
drwxrwxr-x root/root         0 2017-08-08 14:06 ansible-role-nginx-2.5.0/meta/
-rw-rw-r-- root/root       644 2017-08-08 14:06 ansible-role-nginx-2.5.0/meta/main.yml
drwxrwxr-x root/root         0 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/
-rw-rw-r-- root/root      1050 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/main.yml
-rw-rw-r-- root/root       107 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/setup-Archlinux.yml
-rw-rw-r-- root/root       251 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/setup-Debian.yml
-rw-rw-r-- root/root       240 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/setup-FreeBSD.yml
-rw-rw-r-- root/root       196 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/setup-OpenBSD.yml
-rw-rw-r-- root/root       283 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/setup-RedHat.yml
-rw-rw-r-- root/root       323 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/setup-Ubuntu.yml
-rw-rw-r-- root/root      1133 2017-08-08 14:06 ansible-role-nginx-2.5.0/tasks/vhosts.yml
drwxrwxr-x root/root         0 2017-08-08 14:06 ansible-role-nginx-2.5.0/templates/
-rw-rw-r-- root/root      1959 2017-08-08 14:06 ansible-role-nginx-2.5.0/templates/nginx.conf.j2
-rw-rw-r-- root/root       138 2017-08-08 14:06 ansible-role-nginx-2.5.0/templates/nginx.repo.j2
-rw-rw-r-- root/root      1144 2017-08-08 14:06 ansible-role-nginx-2.5.0/templates/vhost.j2
drwxrwxr-x root/root         0 2017-08-08 14:06 ansible-role-nginx-2.5.0/tests/
-rw-rw-r-- root/root       632 2017-08-08 14:06 ansible-role-nginx-2.5.0/tests/README.md
-rw-rw-r-- root/root       434 2017-08-08 14:06 ansible-role-nginx-2.5.0/tests/test.yml
drwxrwxr-x root/root         0 2017-08-08 14:06 ansible-role-nginx-2.5.0/vars/
-rw-rw-r-- root/root       297 2017-08-08 14:06 ansible-role-nginx-2.5.0/vars/Archlinux.yml
-rw-rw-r-- root/root       301 2017-08-08 14:06 ansible-role-nginx-2.5.0/vars/Debian.yml
-rw-rw-r-- root/root       351 2017-08-08 14:06 ansible-role-nginx-2.5.0/vars/FreeBSD.yml
-rw-rw-r-- root/root       331 2017-08-08 14:06 ansible-role-nginx-2.5.0/vars/OpenBSD.yml
-rw-rw-r-- root/root       293 2017-08-08 14:06 ansible-role-nginx-2.5.0/vars/RedHat.yml

@alikins
Copy link
Contributor

alikins commented Aug 16, 2018

For existing multi-content repos something like 'testing.ansible_testing_content' ends up "ansible-testing-content-1.3.0"

github url: https://github.com/atestuseraccount/ansible-testing-content/archive/1.3.0.tar.gz
saved as /tmp/tmp-ansible-galaxy-content-archive-f_bsnb2a.tar.gz

tar contents:

(galaxy-py27) [newswoop:F27:tmp]$ tar tvfl /tmp/tmp-ansible-galaxy-content-archive-f_bsnb2a.tar.gz
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/
-rw-rw-r-- root/root         9 2018-05-03 09:17 ansible-testing-content-1.3.0/.gitignore
-rw-rw-r-- root/root     35148 2018-05-03 09:17 ansible-testing-content-1.3.0/LICENSE
-rw-rw-r-- root/root       130 2018-05-03 09:17 ansible-testing-content-1.3.0/README.md
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/action_plugins/
-rw-rw-r-- root/root      3394 2018-05-03 09:17 ansible-testing-content-1.3.0/action_plugins/add_host.py
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/filter_plugins/
-rw-rw-r-- root/root      1857 2018-05-03 09:17 ansible-testing-content-1.3.0/filter_plugins/json_query.py
-rw-rw-r-- root/root      6586 2018-05-03 09:17 ansible-testing-content-1.3.0/filter_plugins/mathstuff.py
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/library/
-rw-rw-r-- root/root      8506 2018-05-03 09:17 ansible-testing-content-1.3.0/library/elasticsearch_plugin.py
-rw-rw-r-- root/root      6546 2018-05-03 09:17 ansible-testing-content-1.3.0/library/kibana_plugin.py
-rw-rw-r-- root/root     15018 2018-05-03 09:17 ansible-testing-content-1.3.0/library/mysql_db.py
-rw-rw-r-- root/root     12671 2018-05-03 09:17 ansible-testing-content-1.3.0/library/mysql_replication.py
-rw-rw-r-- root/root     24111 2018-05-03 09:17 ansible-testing-content-1.3.0/library/mysql_user.py
-rw-rw-r-- root/root      5659 2018-05-03 09:17 ansible-testing-content-1.3.0/library/mysql_variables.py
-rw-rw-r-- root/root      9919 2018-05-03 09:17 ansible-testing-content-1.3.0/library/redis.py
-rw-rw-r-- root/root      7467 2018-05-03 09:17 ansible-testing-content-1.3.0/library/riak.py
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/module_utils/
-rw-rw-r-- root/root      8181 2018-05-03 09:17 ansible-testing-content-1.3.0/module_utils/common.py
-rw-rw-r-- root/root     28180 2018-05-03 09:17 ansible-testing-content-1.3.0/module_utils/helper.py
-rw-rw-r-- root/root     16505 2018-05-03 09:17 ansible-testing-content-1.3.0/module_utils/inventory.py
-rw-rw-r-- root/root      7677 2018-05-03 09:17 ansible-testing-content-1.3.0/module_utils/lookup.py
-rw-rw-r-- root/root      8686 2018-05-03 09:17 ansible-testing-content-1.3.0/module_utils/raw.py
-rw-rw-r-- root/root      8921 2018-05-03 09:17 ansible-testing-content-1.3.0/module_utils/scale.py
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/ansible-role-foobar/
-rw-rw-r-- root/root       539 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/ansible-role-foobar/.travis.yml
-rw-rw-r-- root/root      1328 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/ansible-role-foobar/README.md
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/ansible-role-foobar/defaults/
-rw-rw-r-- root/root        43 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/ansible-role-foobar/defaults/main.yml
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/ansible-role-foobar/handlers/
-rw-rw-r-- root/root        43 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/ansible-role-foobar/handlers/main.yml
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/ansible-role-foobar/meta/

<  # lots of roles stuff cut for brevity >

-rw-rw-r-- root/root        11 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/test-role-d/tests/inventory
-rw-rw-r-- root/root        69 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/test-role-d/tests/test.yml
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/test-role-d/vars/
-rw-rw-r-- root/root        31 2018-05-03 09:17 ansible-testing-content-1.3.0/roles/test-role-d/vars/main.yml
drwxrwxr-x root/root         0 2018-05-03 09:17 ansible-testing-content-1.3.0/strategy_plugins/
-rw-rw-r-- root/root      1251 2018-05-03 09:17 ansible-testing-content-1.3.0/strategy_plugins/debug.py
-rw-rw-r-- root/root     12007 2018-05-03 09:17 ansible-testing-content-1.3.0/strategy_plugins/free.py
-rw-rw-r-- root/root     21259 2018-05-03 09:17 ansible-testing-content-1.3.0/strategy_plugins/linear.py

@alikins
Copy link
Contributor

alikins commented Aug 21, 2018

#130 has a good chunk of this feature.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants