UNPKG

6.74 kBMarkdownView Raw
1# Launch Extension Uploader Tool
2
3[![Build Status](https://travis-ci.com/adobe/reactor-uploader.svg?branch=master)](https://travis-ci.com/adobe/reactor-uploader)
4[![npm (scoped)](https://img.shields.io/npm/v/@adobe/reactor-uploader.svg?style=flat)](https://www.npmjs.com/package/@adobe/reactor-uploader)
5
6Launch, by Adobe, is a next-generation tag management solution enabling simplified deployment of marketing technologies. For more information regarding Launch, please visit our [product website](http://www.adobe.com/enterprise/cloud-platform/launch.html).
7
8The uploader tool allows extension developers to easily upload their Launch extension to the Launch extension marketplace. It can be used for uploading brand new extension packages or new versions of existing extension packages.
9
10For more information about developing an extension for Launch, please visit our [extension development guide](https://experienceleague.adobe.com/docs/launch/using/extension-dev/overview.html#extension-dev).
11
12## Usage
13
14Before running the uploader tool, you must first have [Node.js](https://nodejs.org/en/) installed on your computer.
15
16You will also need to have already created a zip file containing your extension package. The [@adobe/reactor-packager](https://www.npmjs.com/package/@adobe/reactor-packager) tool can be used to create such a zip file.
17
18Finally, you will need to be authorized to upload extensions to Launch. This is done by first creating an integration through Adobe I/O. Please see the [Access Tokens documentation](https://developer.adobelaunch.com/api/guides/access_tokens/) for detailed steps on creating an integration and procuring extension management rights.
19
20Once your zip file is ready to upload and you've been granted extension management rights, you can use the uploader tool in either a question-answer format or by passing information through command line arguments.
21
22### Question-Answer Format
23
24To use the uploader in a question-answer format, run the uploader tool by executing the following command from the command line within the directory containing your extension package zip file:
25
26```
27npx @adobe/reactor-uploader
28```
29
30The uploader tool will ask for any information necessary to upload the zip file.
31
32### Command Line Arguments
33
34To skip any of the questions the uploader would typically ask, you can pass the respective information as command line arguments. An example is as follows:
35
36```
37npx @adobe/reactor-uploader package-myextension-1.0.0.zip --private-key=/Users/jane/launchkeys/reactor_integration_private.key --org-id=01C20D883A7D42080A494212@AdobeOrg --tech-account-id=14A533A72B181CF90A44410D@techacct.adobe.com --api-key=192ce541b1144160941a83vb74e0e74d --client-secret=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
38```
39
40The first positional parameter is the path (relative or absolute) to the zip file you wish to upload. In the example, `package-myextension-1.0.0.zip` is passed as an argument for this parameter.
41
42The named parameters are as follows:
43
44##### --private-key (for authentication using an Adobe I/O integration)
45
46The local path (relative or absolute) to the RSA private key. Instructions on how to generate this key can be found in the [Access Tokens documentation](https://developer.adobelaunch.com/api/guides/access_tokens/) and should have been used when creating your integration through the Adobe I/O console.
47
48Optionally, rather than passing the private key path as a command line argument, it can instead be provided by setting an environment variable. The environment variable should be named `REACTOR_IO_INTEGRATION_PRIVATE_KEY`.
49
50##### --org-id (for authentication using an Adobe I/O integration)
51
52Your organization ID. You can find this on the overview screen for the integration you have created within the [Adobe I/O console](https://console.adobe.io).
53
54##### --tech-account-id (for authentication using an Adobe I/O integration)
55
56Your technical account ID. You can find this on the overview screen for the integration you have created within the [Adobe I/O console](https://console.adobe.io).
57
58##### --api-key (for authentication using an Adobe I/O integration)
59
60Your API key/Client ID. You can find this on the overview screen for the integration you have created within the [Adobe I/O console](https://console.adobe.io).
61
62##### --client-secret (for authentication using an Adobe I/O integration)
63
64Your client secret. You can find this on the overview screen for the integration you have created within the [Adobe I/O console](https://console.adobe.io).
65
66Optionally, rather than passing the client secret as a command line argument, it can instead be provided by setting an environment variable. The environment variable should be named `REACTOR_IO_INTEGRATION_CLIENT_SECRET`.
67
68##### --environment (for Adobe internal use only)
69
70The environment to which the extension package should be uploaded. Valid options are `development`, `qe`, `integration`. Users outside of Adobe don't need to use this flag.
71
72Private key path can also be provided by setting an environment variable. The environment variable should be named one of the following, depending on which Launch environment will be receiving the extension package:
73
74* `REACTOR_IO_INTEGRATION_PRIVATE_KEY_DEVELOPMENT`
75* `REACTOR_IO_INTEGRATION_PRIVATE_KEY_QE`
76* `REACTOR_IO_INTEGRATION_PRIVATE_KEY_INTEGRATION`
77
78Client secret can also be provided by setting an environment variable. The environment variable should be named one of the following, depending on which Launch environment will be receiving the extension package:
79
80* `REACTOR_IO_INTEGRATION_CLIENT_SECRET_DEVELOPMENT`
81* `REACTOR_IO_INTEGRATION_CLIENT_SECRET_QE`
82* `REACTOR_IO_INTEGRATION_CLIENT_SECRET_INTEGRATION`
83
84##### --verbose
85
86Logs additional information useful for debugging.
87
88## Contributing
89
90Contributions are welcomed! Read the [Contributing Guide](CONTRIBUTING.md) for more information.
91
92To get started:
93
941. Install [node.js](https://nodejs.org/).
953. Clone the repository.
964. After navigating into the project directory, install project dependencies by running `npm install`.
97
98To manually test your changes, first run the following command from the uploader tool directory:
99
100```
101npm link
102```
103
104Then, in a directory where you would like to use the uploader tool, run the following command:
105
106```
107npx @adobe/reactor-uploader
108```
109
110Npx will execute the uploader tool using your locally linked code rather than the code published on the public npm repository.
111
112### Scripts
113
114To run tests a single time, run the following command:
115
116`npm run test`
117
118To run tests continually while developing, run the following command:
119
120`npm run test:watch`
121
122## Licensing
123
124This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.