Skip to content

Instantly share code, notes, and snippets.

View alirezabonab's full-sized avatar
🤠

Alireza Bonab alirezabonab

🤠
View GitHub Profile
@alirezabonab
alirezabonab / setup jenkins, portainer and registry on docker
Last active July 3, 2018 11:22
docker service with portainer jenkins and registry
#!/usr/bin/env bash
DOCKER_PATH=$(which docker)
# PORT Number Definition
# ----------------------------------------------
# system ports
PORT_JENKINS="9110"
PORT_PORTAINER="9120"
@alirezabonab
alirezabonab / jest.config.js
Created September 27, 2019 14:24 — forked from timosadchiy/jest.config.js
Jest + Typescript. Resolve tsconfig.json paths.
/**
* Converts paths defined in tsconfig.json to the format of
* moduleNameMapper in jest.config.js.
*
* For example, {'@alias/*': [ 'path/to/alias/*' ]}
* Becomes {'@alias/(.*)': [ '<rootDir>/path/to/alias/$1' ]}
*
* @param {string} srcPath
* @param {string} tsconfigPath
*/
{
"Use Non-ASCII Font" : true,
"Tags" : [
],
"Ansi 12 Color" : {
"Red Component" : 0.28794747591018677,
"Color Space" : "Calibrated",
"Blue Component" : 0.99877303838729858,
"Alpha Component" : 1,
version: 2
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:14.15.3
jobs:
test:
<<: *defaults
version: 2
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:14.15.3
jobs:
test:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm install
build:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm run build
- persist_to_workspace:
root: ~/repo
paths:
- .
release:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Add github.com to known hosts
command: mkdir ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
- run:
name: Versioning
workflows:
version: 2
test-deploy:
jobs:
- test
- build:
requires:
- test
- release:
filters:
src
.prettierrc
.gitignore
.eslintrc
.eslintignore
.editorconfig
.circleci
tsconfig.json
jest.config.js