Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajouter le déploiement de Privatebin depuis slack #340

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions run/deploy-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ module.exports = [
'master',
),
},
{
slashCommand: {
command: '/deploy-privatebin',
description: 'Déploie privatebin',
usage_hint: '/deploy-privatebin',
},
slackReturnText: 'Commande de déploiement de PrivateBin en production bien reçue.',
deployFunction: fromBranch('privatebin-deploy', ['pix-privatebin-production'], 'main'),
},
{
slashCommand: {
command: '/deploy-pix-apim',
Expand Down
7 changes: 7 additions & 0 deletions test/acceptance/run/manifest_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ describe('Acceptance | Run | Manifest', function () {
url: `http://${hostname}/slack/commands/deploy-metabase`,
usage_hint: '/deploy-metabase',
},
{
command: '/deploy-privatebin',
description: 'Déploie privatebin',
should_escape: false,
url: `http://${hostname}/slack/commands/deploy-privatebin`,
usage_hint: '/deploy-privatebin',
},
{
command: '/deploy-pix-apim',
description: 'Pour déployer les applications Pix APIM depuis la branche main',
Expand Down
13 changes: 13 additions & 0 deletions test/acceptance/run/slashcommand_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ describe('Acceptance | Run | SlashCommand', function () {
expect(res.result.text).to.equal('Commande de déploiement de Metabase en production bien reçue.');
});
});
describe('POST /slack/commands/deploy-privatebin', function () {
it('responds with 200', async function () {
const body = {};
const res = await server.inject({
method: 'POST',
url: '/slack/commands/deploy-privatebin',
headers: createSlackWebhookSignatureHeaders(JSON.stringify(body)),
payload: body,
});
expect(res.statusCode).to.equal(200);
expect(res.result.text).to.equal('Commande de déploiement de PrivateBin en production bien reçue.');
});
});

describe('POST /slack/commands/deploy-pix-apim', function () {
it('responds with 200', async function () {
Expand Down