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

feat: bounce #96

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint -e $1
8 changes: 8 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

case "$2,$3" in
merge,)
ex "+%s/Merge branch '\([^']\+\)'/chore(merge): \1/i" -scwq $1 ;;
*) ;;
esac
2 changes: 1 addition & 1 deletion .mdeprc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"node": "12.15.0",
"node": "20.18.0",
"auto_compose": true,
"services": [
"rabbitmq"
Expand Down
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"prepare": [
"@semantic-release/changelog",
"@semantic-release/npm",
{ "path": "@semantic-release/exec", "cmd": "yarn docker-release" },
{ "path": "@semantic-release/exec", "cmd": "pnpm docker-release" },
"@semantic-release/git"
],
"publish": ["@semantic-release/npm", "@semantic-release/github"],
Expand Down
46 changes: 46 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: v1.0
name: makeomatic/ms-mailer
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004

fail_fast:
stop:
when: "branch != 'master'"

auto_cancel:
running:
when: "branch != 'master'"

global_job_config:
prologue:
commands:
- set -e
- sem-version node 20.18.0
- npm i -g [email protected]
- checkout
- cache restore node-$(checksum pnpm-lock.yaml)
- pnpm i --frozen-lockfile --prefer-offline
- cache store node-$(checksum pnpm-lock.yaml) $(pnpm store path)

blocks:
- name: test
dependencies: []
task:
jobs:
- name: test
commands:
- pnpm test

- name: release
dependencies: ["test"]
skip:
when: "branch != 'master'"
task:
secrets:
- name: semantic-release
jobs:
- name: release
commands:
- pnpm run semantic-release
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM makeomatic/node:$NODE_VERSION-onbuild
FROM makeomatic/node:$NODE_VERSION

ENV NCONF_NAMESPACE=MS_MAILER \
NODE_ENV=$NODE_ENV
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"version": "10.7.0",
"scripts": {
"compile": "babel -d ./lib ./src",
"prepublish": "yarn compile",
"test": "yarn lint && yarn test:e2e",
"test:e2e": "yarn compile && mdep test run",
"prepublish": "pnpm compile",
"test": "pnpm lint && pnpm test:e2e",
"test:e2e": "pnpm compile && mdep test run",
"lint": "eslint ./src",
"start": "mfleet",
"semantic-release": "semantic-release",
"docker-release": "mdep docker release",
"release": "yarn --frozen-lockfile && yarn semantic-release"
"release": "pnpm i --frozen-lockfile && pnpm semantic-release"
},
"keywords": [
"microservice",
Expand All @@ -38,7 +38,7 @@
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-transform-strict-mode": "^7.12.1",
"@babel/register": "^7.12.1",
"@makeomatic/deploy": "^10.3.2",
"@makeomatic/deploy": "^13.1.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
Expand All @@ -53,10 +53,12 @@
"eslint-plugin-unicorn": "^23.0.0",
"mocha": "^8.2.1",
"nyc": "^15.1.0",
"smtp-server": "^3.8.0"
"semantic-release": "^24.2.0",
"smtp-server": "^3.13.6"
},
"dependencies": {
"@hapi/hapi": "^20.0.2",
"@hapi/joi": "^17.1.1",
"@microfleet/core": "^17.5.3",
"@microfleet/transport-amqp": "^15.2.3",
"@microfleet/validation": "^9.0.1",
Expand All @@ -70,21 +72,15 @@
"nodemailer-html-to-text": "^3.1.0",
"nodemailer-mailgun-transport": "^2.0.1",
"nodemailer-plugin-inline-base64": "^2.1.1",
"nodemailer-sparkpost-transport": "^2.1.0",
"prom-client": "^12.0.0",
"sparkpost": "2.1.0",
"stdout-stream": "^1.4.1",
"yargs": "^16.1.1"
},
"engine": {
"node": ">= 12.14.0",
"npm": ">= 5.0.0"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS",
"prepare-commit-msg": "./node_modules/@makeomatic/deploy/git-hooks/prepare-commit-msg $HUSKY_GIT_PARAMS"
}
"node": ">= 20.18.0"
},
"packageManager": "[email protected]",
"mocha": {
"require": [
"@babel/register"
Expand Down
Loading