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
Add Gallery documentation to the contributing guide (#47)
* Add README link to the contributing doc
* Remove template connect-extension.toml
* Add initial draft of gallery contributing guide
* Add a doc with a template for custom workflows
It is recommended to begin with `"version": "0.0.0"` to avoid triggering a
58
+
release during development of your content. When you are ready to release to
59
+
the gallery check the [Adding content to the Connect Gallery](#adding-content-to-the-connect-gallery) section.
60
+
61
+
### Language version constraints
62
+
63
+
To ensure that content in the gallery is installable on as many Posit Connect
64
+
servers as possible we use the language version constraints feature to broaden
65
+
the language versions Connect can use for a piece of content.
66
+
67
+
All content in the gallery should include `requires` specifications for the
68
+
language(s) it utilizes.
69
+
70
+
Here is an example of what needs to be included in a `manifest.json`:
71
+
72
+
```json {filename="manifest.json"}
73
+
{
74
+
...
75
+
"environment": {
76
+
"python": {
77
+
"requires": ">=3.8, <4"
78
+
},
79
+
"r": {
80
+
"requires": ">=4.2, <5"
81
+
}
82
+
},
83
+
...
84
+
}
31
85
```
86
+
87
+
## Adding content to the Connect Gallery
88
+
89
+
Once your content has the requirements above it is ready to be added to the
90
+
Connect Gallery.
91
+
92
+
The Connect Gallery uses GitHub Workflows to automate releases of new content
93
+
when pull requests in this repo merge into `main`.
94
+
95
+
To add content to the Connect Gallery, follow the steps below:
96
+
97
+
### Adding simple content
98
+
99
+
"Simple content" refers to content that can be bundled into a TAR file without
100
+
any additional steps. Most content will fall into this category.
101
+
102
+
::: {.callout-note}
103
+
If you can run
104
+
```bash
105
+
tar -czf my-extension-name.tar.gz ./extensions/my-extension-name
106
+
```
107
+
and the resulting TAR file can be published by uploading the bundle to Posit
108
+
Connect, then it is piece of simple content.
109
+
:::
110
+
111
+
To add simple content look for the [`simple-extension-changes` section in the `.github/workflows/extensions.yml`](https://github.com/posit-dev/connect-extensions/blob/main/.github/workflows/extensions.yml#L31)
112
+
file and add a new filter:
113
+
114
+
```yml
115
+
filters: |
116
+
...
117
+
my-content-name: extensions/my-content-name/**
118
+
```
119
+
120
+
A good example is how `reaper` is setup.
121
+
122
+
This will make any code changes to your content trigger a few things:
123
+
124
+
- lint: ensuring your content has everything it needs to be added to the
125
+
gallery
126
+
- package: creating a TAR file of the content's directory to test in pull
127
+
requests and to be released
128
+
- release: When the `version` in the `manifest.json` is incrased and merged to
129
+
`main`, releases the content to users of Posit Connect
130
+
131
+
Lastly set the `version` in the `manifest.json` file to your initial release.
132
+
133
+
When the changes above are merged the first release will be kicked off, and
134
+
your content will be in the gallery. 🚀
135
+
136
+
### Adding custom built content
137
+
138
+
"Custom built content"refers to content that requires additional steps prior to
139
+
be being packaged into a TAR file.
140
+
141
+
Setting up custom built content is a bit more complex since it involves
142
+
setting up the environment needed to build the content.
143
+
144
+
#### Creating a custom workflow
145
+
146
+
To faciliate control over how the content is being built we utilize custom
147
+
GitHub Workflows. See the [Creating a custom workflow](docs/creating-a-custom-workflow.qmd)
148
+
guide how to get started.
149
+
150
+
#### Calling the custom workflow
151
+
152
+
Once the custom workflow is created we need to head back to the general
A good place to start is looking at examples of custom workflows already in the
10
+
repository like the [Publisher Command Center workflow](https://github.com/posit-dev/connect-extensions/blob/main/.github/workflows/publisher-command-center.yml).
11
+
12
+
## Custom Workflow Template
13
+
14
+
Use the template below to get started. It contains inline comments to explain
15
+
each section.
16
+
17
+
Replace the `EXTENSION_NAME` variable with your content's name, and add the
18
+
custom build steps needed for your content. The custom steps will entirely
19
+
depend on your content and what environment it needs to setup.
0 commit comments