You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To share your module with other Puppet users, get contributions to your modules, and maintain your module releases, publish your module on the Puppet Forge. The Forge is a community repository of modules, written and contributed by open source Puppet and Puppet Enterprise users.
17
+
To share your module with other Puppet users, get contributions to your modules, and maintain your module releases, publish your module on the Puppet Forge.
18
+
The Forge is a community repository of modules, written and contributed by open source Puppet and Puppet Enterprise users.
19
19
20
20
To publish your module:
21
21
@@ -39,11 +39,18 @@ To publish your module:
39
39
40
40
Your module has two names: a short name, like "mysql", and a long name that includes your Forge username, like "puppetlabs-mysql".
41
41
42
-
To upload to the Forge, use the module long name. This name is composed of your Forge username and the short name of your module. For example, the "puppetlabs" user maintains a "mysql" module, which is known to the Forge as "puppetlabs-mysql". Use this long name in your module's `metadata.json` file. This helps disambiguate modules that might have common short names, such as "mysql" or "apache."
42
+
To upload to the Forge, use the module long name.
43
+
This name is composed of your Forge username and the short name of your module.
44
+
For example, the "puppetlabs" user maintains a "mysql" module, which is known to the Forge as "puppetlabs-mysql".
45
+
Use this long name in your module's `metadata.json` file.
46
+
This helps disambiguate modules that might have common short names, such as "mysql" or "apache."
43
47
44
-
However, your module directory on disk must use the short name, without the username prefix. Module directory names cannot contain dashes or periods; only letters, numbers, and underscores. As long as you have the correct long name in your `metadata.json` file, the `puppet module build` command uses the correct names in the correct places.
48
+
However, your module directory on disk must use the short name, without the username prefix.
49
+
Module directory names cannot contain dashes or periods; only letters, numbers, and underscores.
50
+
As long as you have the correct long name in your `metadata.json` file, the `puppet module build` command uses the correct names in the correct places.
45
51
46
-
{% include alert.html type="note" content="Although the Forge expects to receive modules named `username-module`, its web interface presents them as `username/module`. Always use the `username-module` style in your metadata files and when issuing commands." %}
52
+
{% include alert.html type="note" content="Although the Forge expects to receive modules named `username-module`, its web interface presents them as `username/module`.
53
+
Always use the `username-module` style in your metadata files and when issuing commands." %}
47
54
48
55
49
56
Related topics:
@@ -66,7 +73,8 @@ Before you build your module package for publishing, you'll need to make sure it
66
73
67
74
To do this, you'll exclude unnecessary files from your package or repository, remove or ignore any symlinks your module contains, and make sure your `metadata.json` contains the correct information.
68
75
69
-
{% include alert.html type="note" content="In order to successfully publish your module to the Puppet Forge and ensure that everything is rendered correctly, your `README`, license file, changelog, and `metadata.json` must be UTF-8 encoded. If you used modern tooling to create your module, these files are already UTF-8 encoded." %}
76
+
{% include alert.html type="note" content="In order to successfully publish your module to the Puppet Forge and ensure that everything is rendered correctly, your `README`, license file, changelog, and `metadata.json` must be UTF-8 encoded.
77
+
If you used modern tooling to create your module, these files are already UTF-8 encoded." %}
70
78
71
79
72
80
### Excluding files from the package
@@ -79,7 +87,7 @@ Files in `.gitignore` will be excluded from modules and also from git, unless sp
79
87
80
88
#### `.pdkignore` example
81
89
82
-
```
90
+
```text
83
91
import/
84
92
/spec/fixtures/
85
93
.tmp
@@ -95,7 +103,9 @@ junit/
95
103
tmp/
96
104
```
97
105
98
-
The `.pdkignore` file excludes files during `jig module build` only. For example, you might want spec tests in your source control but not in your module package, so you would list them in `.pdkignore`. To prevent files, such as those in temporary directories, from ever being checked into Git, use `.gitignore`.
106
+
The `.pdkignore` file excludes files during `jig module build` only.
107
+
For example, you might want spec tests in your source control but not in your module package, so you would list them in `.pdkignore`.
108
+
To prevent files, such as those in temporary directories, from ever being checked into Git, use `.gitignore`.
99
109
100
110
If you have both a `.pdkignore` and a `.gitignore` file, the `jig module` command uses the `.pdkignore` file.
101
111
@@ -104,19 +114,24 @@ If you have both a `.pdkignore` and a `.gitignore` file, the `jig module` comman
104
114
Symlinks in modules are unsupported.
105
115
If your module contains symlinks, either remove them or ignore them before you build your module.
106
116
107
-
{% include alert.html type="warning" content="If you try to build a module package that contains symlinks, you will receive an warning informing you to remove them. They will not be included in the module package." %}
117
+
{% include alert.html type="warning" content="If you try to build a module package that contains symlinks, you will receive an warning informing you to remove them.
118
+
They will not be included in the module package." %}
108
119
109
120
110
121
### Adding module metadata in `metadata.json`
111
122
112
123
To publish your module on the Forge, it must contain required metadata in a `metadata.json` file.
113
124
114
-
If you generated your module using modern tooling, you'll already have a `metadata.json` file. Check it and make any necessary edits.
115
-
116
-
If you assembled your module manually, you must make sure that you have a `metadata.json` file in your module's main directory. For details on writing or editing the `metadata.json` file, see the related topic about module metadata.
125
+
If you generated your module using modern tooling, you'll already have a `metadata.json` file.
126
+
Check it and make any necessary edits.
117
127
118
-
{% include alert.html type="warning" content="If you maintain very old modules, you might find the metadata stored in a `Modulefile`. Move any metadata contained in the `Modulefile` to `metadata.json`. Modulefiles were deprecated in Puppet 3 and removed in Puppet 4. They are now treated like any other text file in the root directory of the module." %}
128
+
If you assembled your module manually, you must make sure that you have a `metadata.json` file in your module's main directory.
129
+
For details on writing or editing the `metadata.json` file, see the related topic about module metadata.
119
130
131
+
{% include alert.html type="warning" content="If you maintain very old modules, you might find the metadata stored in a `Modulefile`.
132
+
Move any metadata contained in the `Modulefile` to `metadata.json`.
133
+
Modulefiles were deprecated in Puppet 3 and removed in Puppet 4.
134
+
They are now treated like any other text file in the root directory of the module." %}
120
135
121
136
Related topics:
122
137
@@ -150,7 +165,8 @@ Your module package should be a compiled `tar.gz` package of 10MB or less.
150
165
151
166
4. On the upload page, click **Choose File** and use the file browser to locate and select the release tarball. Then click **Upload Release**.
152
167
153
-
After a successful upload, your browser should load the new release page of your module, with any errors popping up on the same screen. Your module's README, Changelog,and License files are displayed on your module's Forge page.
168
+
After a successful upload, your browser should load the new release page of your module, with any errors popping up on the same screen.
169
+
Your module's README, Changelog,and License files are displayed on your module's Forge page.
0 commit comments