An opinionated frontend devops util
Install
pnpm i @bryce-loskie/devops -D
Post Install Effect
After install will generate devops
and scripts
folder and .dockerignore
in your project working dir
Usage
- Add script in
package.json
{
"sciprts": {
"prebuild": "node scripts/pre-build.mjs"
}
}
-
Optional If you use
pnpm
as package manager, create.npmrc
in your project root path and add flowing key into it.
enable-pre-post-scripts=true
- CI/CD pipline
set -e
npx pnpm i && npx pnpm build
dockerTag=$(cat scripts/tag.txt)
dockerImage=docker-registory/docker-image-name:${dockerTag}
docker build -t $dockerImage -f devops/Dockerfile .
docker push $dockerImage