Skip to content

Commit a80daf1

Browse files
committed
fix(publish): use helix-publish@v2 with new dispatch flow
1 parent 5080a9d commit a80daf1

11 files changed

+25
-25
lines changed

src/publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function strain() {
4141
alias: 'apiPublish',
4242
describe: 'API URL for helix-publish service',
4343
type: 'string',
44-
default: 'https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1',
44+
default: 'https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2',
4545
})
4646
.option('api-config-purge', {
4747
alias: 'apiConfigPurge',

src/remotepublish.cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class RemotePublishCommand extends AbstractCommand {
3434
this._fastly_namespace = null;
3535
this._fastly_auth = null;
3636
this._dryRun = false;
37-
this._publishAPI = 'https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1';
37+
this._publishAPI = 'https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2';
3838
this._githubToken = '';
3939
this._updateBotConfig = false;
4040
this._configPurgeAPI = 'https://app.project-helix.io/config/purge';

test/testRemotePublishCmd.botconfig.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('hlx publish --remote (default)', () => {
5555
nock.activate();
5656

5757
scope = nock('https://adobeioruntime.net')
58-
.post('/api/v1/web/helix/helix-services/publish@v1')
58+
.post('/api/v1/web/helix/helix-services/publish@v2')
5959
.reply(200, {})
6060
.post('/api/v1/web/helix/default/addlogger')
6161
.reply(200, {});
@@ -124,7 +124,7 @@ describe('hlx publish --remote (default)', () => {
124124
.withFastlyAuth('fake_auth')
125125
.withFastlyNamespace('fake_name')
126126
.withWskHost('doesn.t.matter')
127-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
127+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
128128
.withConfigFile(path.resolve(__dirname, 'fixtures/deployed.yaml'))
129129
.withUpdateBotConfig(true)
130130
.withGithubToken('github-token-foobar')
@@ -178,7 +178,7 @@ describe('hlx publish --remote (default)', () => {
178178
.withFastlyAuth('fake_auth')
179179
.withFastlyNamespace('fake_name')
180180
.withWskHost('doesn.t.matter')
181-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
181+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
182182
.withConfigFile(path.resolve(__dirname, 'fixtures/deployed.yaml'))
183183
.withUpdateBotConfig(true)
184184
.withGithubToken('github-token-foobar')
@@ -219,7 +219,7 @@ describe('hlx publish --remote (default)', () => {
219219
.withFastlyAuth('fake_auth')
220220
.withFastlyNamespace('fake_name')
221221
.withWskHost('doesn.t.matter')
222-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
222+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
223223
.withConfigFile(path.resolve(__dirname, 'fixtures/deployed.yaml'))
224224
.withUpdateBotConfig(true)
225225
.withGithubToken('github-token-foobar')
@@ -279,7 +279,7 @@ describe('hlx publish --remote (default)', () => {
279279
.withFastlyAuth('fake_auth')
280280
.withFastlyNamespace('fake_name')
281281
.withWskHost('doesn.t.matter')
282-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
282+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
283283
.withConfigFile(path.resolve(__dirname, 'fixtures/deployed.yaml'))
284284
.withUpdateBotConfig(true)
285285
.withGithubToken('github-token-foobar')
@@ -329,7 +329,7 @@ describe('hlx publish --remote (default)', () => {
329329
.withFastlyAuth('fake_auth')
330330
.withFastlyNamespace('fake_name')
331331
.withWskHost('doesn.t.matter')
332-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
332+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
333333
.withConfigFile(path.resolve(__dirname, 'fixtures/deployed.yaml'))
334334
.withUpdateBotConfig(true)
335335
.withGithubToken('github-token-foobar')
@@ -403,7 +403,7 @@ describe('hlx publish --remote (default)', () => {
403403
.withFastlyAuth('fake_auth')
404404
.withFastlyNamespace('fake_name')
405405
.withWskHost('doesn.t.matter')
406-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
406+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
407407
.withConfigFile(path.resolve(__dirname, 'fixtures/deployed.yaml'))
408408
.withUpdateBotConfig(true)
409409
.withGithubToken('github-token-foobar')

test/testRemotePublishCmd.customvcl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('hlx publish --custom-vcl (check requests)', () => {
9696
nock.activate();
9797

9898
scope = nock('https://adobeioruntime.net')
99-
.post('/api/v1/web/helix/helix-services/publish@v1', (body) => {
99+
.post('/api/v1/web/helix/helix-services/publish@v2', (body) => {
100100
({ vcl } = body);
101101
return true;
102102
})
@@ -126,7 +126,7 @@ describe('hlx publish --custom-vcl (check requests)', () => {
126126
.withFastlyAuth('fake_auth')
127127
.withFastlyNamespace('fake_name')
128128
.withWskHost('doesn.t.matter')
129-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
129+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
130130
.withConfigFile(path.resolve(__dirname, 'fixtures/filtered.yaml'))
131131
.withDryRun(false);
132132
});

test/testRemotePublishCmd.dryrun.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('hlx publish --remote --dry-run (default)', () => {
4343

4444
it('publishing makes HTTP requests', async function test() {
4545
const { server } = this.polly;
46-
server.post('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1').intercept((req, res) => res.sendStatus(200).json({}));
46+
server.post('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2').intercept((req, res) => res.sendStatus(200).json({}));
4747
server.post('https://adobeioruntime.net/api/v1/web/helix/default/addlogger').intercept((req, res) => res.sendStatus(200).json({}));
4848

4949
const remote = await new RemotePublishCommand()

test/testRemotePublishCmd.faillogging.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('hlx publish --remote (fail log setup)', () => {
4444
nock.activate();
4545

4646
scope = nock('https://adobeioruntime.net')
47-
.post('/api/v1/web/helix/helix-services/publish@v1')
47+
.post('/api/v1/web/helix/helix-services/publish@v2')
4848
.reply(200, {})
4949
.post('/api/v1/web/helix/default/addlogger')
5050
.reply(400, {});

test/testRemotePublishCmd.failprepare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('hlx publish --remote (fail prepare service config)', () => {
4444
nock.activate();
4545

4646
scope = nock('https://adobeioruntime.net')
47-
.post('/api/v1/web/helix/helix-services/publish@v1')
47+
.post('/api/v1/web/helix/helix-services/publish@v2')
4848
.reply(400, {});
4949
});
5050

test/testRemotePublishCmd.failpurge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('hlx publish --remote (fail purge)', () => {
4444
nock.activate();
4545

4646
scope = nock('https://adobeioruntime.net')
47-
.post('/api/v1/web/helix/helix-services/publish@v1')
47+
.post('/api/v1/web/helix/helix-services/publish@v2')
4848
.reply(200, {})
4949
.post('/api/v1/web/helix/default/addlogger')
5050
.reply(200, {});

test/testRemotePublishCmd.failsecrets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('hlx publish --remote (fail secrets)', () => {
4444
nock.activate();
4545

4646
scope = nock('https://adobeioruntime.net')
47-
.post('/api/v1/web/helix/helix-services/publish@v1')
47+
.post('/api/v1/web/helix/helix-services/publish@v2')
4848
.reply(200, {})
4949
.post('/api/v1/web/helix/default/addlogger')
5050
.reply(200, {});

test/testRemotePublishCmd.filter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('hlx publish --remote (with filters)', () => {
5252
nock.activate();
5353

5454
scope = nock('https://adobeioruntime.net')
55-
.post('/api/v1/web/helix/helix-services/publish@v1', (body) => {
55+
.post('/api/v1/web/helix/helix-services/publish@v2', (body) => {
5656
publishedstrains = body.configuration.strains.reduce((o, strain) => {
5757
if (strain.origin) {
5858
// eslint-disable-next-line no-param-reassign
@@ -91,7 +91,7 @@ describe('hlx publish --remote (with filters)', () => {
9191
.withFastlyAuth('fake_auth')
9292
.withFastlyNamespace('fake_name')
9393
.withWskHost('doesn.t.matter')
94-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
94+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
9595
.withConfigFile(path.resolve(__dirname, 'fixtures/filtered.yaml'))
9696
.withDryRun(false);
9797
});
@@ -175,7 +175,7 @@ describe('hlx publish --remote (with filters, but without config)', () => {
175175
nock.activate();
176176

177177
nock('https://adobeioruntime.net')
178-
.post('/api/v1/web/helix/helix-services/publish@v1', (body) => {
178+
.post('/api/v1/web/helix/helix-services/publish@v2', (body) => {
179179
publishedstrains = body.configuration.strains.reduce((o, strain) => {
180180
if (strain.origin) {
181181
// eslint-disable-next-line no-param-reassign
@@ -214,7 +214,7 @@ describe('hlx publish --remote (with filters, but without config)', () => {
214214
.withFastlyAuth('fake_auth')
215215
.withFastlyNamespace('fake_name')
216216
.withWskHost('doesn.t.matter')
217-
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v1')
217+
.withPublishAPI('https://adobeioruntime.net/api/v1/web/helix/helix-services/publish@v2')
218218
.withConfigFile(path.resolve(__dirname, 'fixtures/filtered.yaml'))
219219
.withDryRun(false);
220220
});

0 commit comments

Comments
 (0)