UNPKG

6.88 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://developer.adobelaunch.com/extensions/).
11
12## Usage
13
14Before running the uploader tool, you must first have [Node.js](https://nodejs.org/en/) installed on your computer. Your npm version (npm comes bundled with Node.js) will need to be at least 5.2.0. You can check the installed version by running the following command from a command line:
15
16```
17npm -v
18```
19
20You 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.
21
22Finally, 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.
23
24Once 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.
25
26### Question-Answer Format
27
28To 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:
29
30```
31npx @adobe/reactor-uploader
32```
33
34The uploader tool will ask for any information necessary to upload the zip file.
35
36### Command Line Arguments
37
38To 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:
39
40```
41npx @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
42```
43
44The 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.
45
46The named parameters are as follows:
47
48##### --private-key (for authentication using an Adobe I/O integration)
49
50The 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.
51
52Optionally, 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`.
53
54##### --org-id (for authentication using an Adobe I/O integration)
55
56Your 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).
57
58##### --tech-account-id (for authentication using an Adobe I/O integration)
59
60Your 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).
61
62##### --api-key (for authentication using an Adobe I/O integration)
63
64Your 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).
65
66##### --client-secret (for authentication using an Adobe I/O integration)
67
68Your 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).
69
70Optionally, 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`.
71
72##### --environment (for Adobe internal use only)
73
74The 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.
75
76Private 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:
77
78* `REACTOR_IO_INTEGRATION_PRIVATE_KEY_DEVELOPMENT`
79* `REACTOR_IO_INTEGRATION_PRIVATE_KEY_QE`
80* `REACTOR_IO_INTEGRATION_PRIVATE_KEY_INTEGRATION`
81
82Client 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:
83
84* `REACTOR_IO_INTEGRATION_CLIENT_SECRET_DEVELOPMENT`
85* `REACTOR_IO_INTEGRATION_CLIENT_SECRET_QE`
86* `REACTOR_IO_INTEGRATION_CLIENT_SECRET_INTEGRATION`
87
88##### --verbose
89
90Logs additional information useful for debugging.
91
92## Contributing
93
94Contributions are welcomed! Read the [Contributing Guide](CONTRIBUTING.md) for more information.
95
96To get started:
97
981. Install [node.js](https://nodejs.org/).
993. Clone the repository.
1004. After navigating into the project directory, install project dependencies by running `npm install`.
101
102To manually test your changes, first run the following command from the uploader tool directory:
103
104```
105npm link
106```
107
108Then, in a directory where you would like to use the uploader tool, run the following command:
109
110```
111npx @adobe/reactor-uploader
112```
113
114Npx will execute the uploader tool using your locally linked code rather than the code published on the public npm repository.
115
116### Scripts
117
118To run tests a single time, run the following command:
119
120`npm run test`
121
122To run tests continually while developing, run the following command:
123
124`npm run test:watch`
125
126## Licensing
127
128This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.