diff --git a/.gitignore b/.gitignore index 591e11226bee2467093e3cf6b8986b280214a50b..ccd0a8f291003b83850a087a68b2955e681a793f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ .vagrant/ +*/metadata.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52f069e78fc37d13463cb5134d33272608efe8bf..5efd09676b5713b2cec5812efbddc2a850562bb8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,13 @@ - +stages: + - makemeta + - build +build_metadata: + stage: makemeta + script: + - python make.py + cache: + paths: + - ./*/metadata.json variables: PREFIX: henrietta/ .job_template: &box_build_job @@ -8,7 +17,7 @@ variables: - develop19216822423 before_script: - ln -s .. $BOX/boxen - - cp -rf wynurz.s $BOX/wynurz.sh + - cp -f *.sh $BOX/ - cp SkeletonVagrantfile $BOX/Vagrantfile - sed -ie 's/INSERTBOXNAME/$BOX/g' $BOX/Vagrantfile - cd $BOX; vagrant up diff --git a/cass_zk_rmq/DESCRIPTION b/cass_zk_rmq/DESCRIPTION new file mode 100644 index 0000000000000000000000000000000000000000..15e1fd583f6ee5fcb3397d0e9313338eb496463d --- /dev/null +++ b/cass_zk_rmq/DESCRIPTION @@ -0,0 +1 @@ +Cassandra, ZooKeeper, RabbitMQ \ No newline at end of file diff --git a/cass_zk_rmq/metadata.json b/cass_zk_rmq/metadata.json deleted file mode 100644 index e54a1d01c6cd536a3c92151656a5dcf7baae2e01..0000000000000000000000000000000000000000 --- a/cass_zk_rmq/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "Cassandra, ZooKeeper, RabbitMQ", - "short_description": "Cassandra, ZooKeeper, RabbitMQ", - "name": "henrietta/cass_zk_rmq", - "versions": [{ - "version": "1", - "status": "active", - "description_html": "<p>Cass+ZK+RMQ</p>", - "description_markdown": "Cass+ZK+RMQ", - "providers": [{ - "name": "virtualbox", - "url": "http://dev.dms-serwis.com.pl/vagrant/cass_zk_rmq.box" - }] - }] -} \ No newline at end of file diff --git a/cassandra/DESCRIPTION b/cassandra/DESCRIPTION new file mode 100644 index 0000000000000000000000000000000000000000..a218ac4cd0541c439932a0646edb4e7baf050fe8 --- /dev/null +++ b/cassandra/DESCRIPTION @@ -0,0 +1 @@ +Debian Jessie x86_64 with Cassandra 3.0.9 \ No newline at end of file diff --git a/cassandra/metadata.json b/cassandra/metadata.json index 3065a026f836a762a9bce485de47eb2732f5328a..305681aba261676befa50e0cfd667a5990e5e174 100644 --- a/cassandra/metadata.json +++ b/cassandra/metadata.json @@ -1,5 +1,5 @@ { - "description": "Debian Jessie x86_64 with Cassandra 3.0.9", + "description": "", "short_description": "Debian + Cassandra", "name": "henrietta/cassandra", "versions": [{ diff --git a/czr_pythons/DESCRIPTION b/czr_pythons/DESCRIPTION new file mode 100644 index 0000000000000000000000000000000000000000..43b9777685168d330de3d45c60bef21dac81a163 --- /dev/null +++ b/czr_pythons/DESCRIPTION @@ -0,0 +1 @@ +Cassandra, ZooKeeper, RabbitMQ and assorted Pythons \ No newline at end of file diff --git a/czr_pythons/metadata.json b/czr_pythons/metadata.json deleted file mode 100644 index 29315cd717cb6b5a96e80cb055ff6b2a14eb7394..0000000000000000000000000000000000000000 --- a/czr_pythons/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "Cassandra, ZooKeeper, RabbitMQ and assorted Pythons", - "short_description": "Cassandra, ZooKeeper, RabbitMQ and assorted Pythons", - "name": "henrietta/czr_pythons", - "versions": [{ - "version": "1", - "status": "active", - "description_html": "<p>Cass+ZK+RMQ+Py</p>", - "description_markdown": "Cass+ZK+RMQ+Py", - "providers": [{ - "name": "virtualbox", - "url": "http://dev.dms-serwis.com.pl/vagrant/czr_pythons.box" - }] - }] -} \ No newline at end of file diff --git a/czr_pythons_pg/DESCIRPTION b/czr_pythons_pg/DESCIRPTION new file mode 100644 index 0000000000000000000000000000000000000000..63bfdda18ee6c9ad405b6c7d8458b110545cf6f7 --- /dev/null +++ b/czr_pythons_pg/DESCIRPTION @@ -0,0 +1 @@ +czr_pythons but with PostgreSQL \ No newline at end of file diff --git a/czr_pythons_pg/metadata.json b/czr_pythons_pg/metadata.json deleted file mode 100644 index 50bb0f5fe274618b30d15ed4be3170c287741000..0000000000000000000000000000000000000000 --- a/czr_pythons_pg/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "Cassandra, ZooKeeper, RabbitMQ, PgSQL and assorted Pythons", - "short_description": "Cassandra, ZooKeeper, RabbitMQ, PgSQL and assorted Pythons", - "name": "henrietta/czr_pythons_pg", - "versions": [{ - "version": "1", - "status": "active", - "description_html": "<p>Cass+ZK+RMQ+PgSQL+Py</p>", - "description_markdown": "Cass+ZK+RMQ+PgSQL+Py", - "providers": [{ - "name": "virtualbox", - "url": "http://dev.dms-serwis.com.pl/vagrant/czr_pythons_pg.box" - }] - }] -} \ No newline at end of file diff --git a/make-gitlab-ci.py b/make.py similarity index 54% rename from make-gitlab-ci.py rename to make.py index 126f8787a1e12535cc15e652b144fef8b927f11d..caa379ad484420af5afeea8cda3160dcc5aebcf2 100644 --- a/make-gitlab-ci.py +++ b/make.py @@ -8,6 +8,7 @@ if __name__ == '__main__': dirs = [dir for dir in os.listdir('.') if os.path.isdir(dir)] boxes = [box for box in dirs if os.path.exists(os.path.join(box, 'Vagrantfile'))] + # Generate Gitlab CI file with open('.gitlab-ci.yml', 'wb') as ci: ci.write(b''' variables: @@ -40,4 +41,28 @@ build_%s: - master - /^%s\-(.*)$/ -''' % (box, box, box)) \ No newline at end of file +''' % (box, box, box)) + + + # Generate metadata + for box in boxes: + with open(os.path.join(box, 'DESCRIPTION'), 'rb') as mdin: + description = mdin.read().strip() + + with open(os.path.join(box, 'metadata.json'), 'wb') as mdout: + mdout.write('''{ + "description": "%s", + "short_description": "%s", + "name": "henrietta/%s", + "versions": [{ + "version": "1", + "status": "active", + "description_html": "<p>%s</p>", + "description_markdown": "%s", + "providers": [{ + "name": "virtualbox", + "url": "http://dev.dms-serwis.com.pl/vagrant/%s.box" + }] + }] +}''' % (description, description, box, description, description, box)) + diff --git a/nodejs4/DESCRIPTION b/nodejs4/DESCRIPTION new file mode 100644 index 0000000000000000000000000000000000000000..d285119e40c2c52ebd9dbd361f9494d86eda484d --- /dev/null +++ b/nodejs4/DESCRIPTION @@ -0,0 +1 @@ +NodeJS 4 + bower + gulp \ No newline at end of file diff --git a/nodejs4/metadata.json b/nodejs4/metadata.json deleted file mode 100644 index 8c2280a4909368db1f4c15efed8588badfd953f2..0000000000000000000000000000000000000000 --- a/nodejs4/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "NodeJS 4 + bower + gulp", - "short_description": "NodeJS 4 + bower + gulp", - "name": "henrietta/nodejs4", - "versions": [{ - "version": "1", - "status": "active", - "description_html": "<p>NodeJS 4 + bower + gulp</p>", - "description_markdown": "NodeJS 4 + bower + gulp", - "providers": [{ - "name": "virtualbox", - "url": "http://dev.dms-serwis.com.pl/vagrant/nodejs4.box" - }] - }] -} \ No newline at end of file diff --git a/nodejs5_jdk_adk25/DESCRIPTION b/nodejs5_jdk_adk25/DESCRIPTION new file mode 100644 index 0000000000000000000000000000000000000000..f62f671bc0e0d1567b2a334e1dd0a1946c4fd318 --- /dev/null +++ b/nodejs5_jdk_adk25/DESCRIPTION @@ -0,0 +1 @@ +odeJS 5.x + JDK + ADT + cordova \ No newline at end of file diff --git a/nodejs5_jdk_adk25/metadata.json b/nodejs5_jdk_adk25/metadata.json deleted file mode 100644 index eb6e887e13962e72727333fb26fed1b9b4216a44..0000000000000000000000000000000000000000 --- a/nodejs5_jdk_adk25/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "NodeJS 5.x + JDK + ADT + cordova", - "short_description": "NodeJS 5.x + JDK + ADT + cordova", - "name": "henrietta/nodejs5_jdk_adk25", - "versions": [{ - "version": "1", - "status": "active", - "description_html": "<p>NodeJS 5.x + JDK + ADT + cordova</p>", - "description_markdown": "NodeJS 5.x + JDK + ADT + cordova", - "providers": [{ - "name": "virtualbox", - "url": "http://dev.dms-serwis.com.pl/vagrant/nodejs5_jdk_adk25.box" - }] - }] -} \ No newline at end of file