Skip to content

Commit e86980d

Browse files
authored
Merge pull request #174 from OpenPathfinder/feat/distribution
2 parents 30485f0 + 8f257bb commit e86980d

File tree

10 files changed

+247
-21
lines changed

10 files changed

+247
-21
lines changed

.dockerignore

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
131+
132+
133+
# CUSTOM
134+
IGNORE/
135+
output
136+
.vscode

.github/OTHER/header.png

-489 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,7 @@ jobs:
4949
run: npm run db:seed
5050

5151
- name: Run tests
52-
run: npm run test:ci
52+
run: npm run test:ci
53+
54+
- name: Build Docker image
55+
run: docker build -t visionboard .
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish Docker Image on Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
jobs:
13+
build-and-push:
14+
name: Build and Push Multi-Platform Docker Image
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout Code
19+
uses: actions/checkout@v3
20+
21+
- name: Log in to GitHub Container Registry
22+
uses: docker/login-action@v2
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v2
30+
with:
31+
install: true
32+
33+
- name: Set Lowercase Repository Info
34+
id: repo_info
35+
run: |
36+
echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
37+
echo "REPO_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
38+
39+
- name: Build and Push Multi-Platform Docker Image
40+
uses: docker/build-push-action@v5
41+
with:
42+
context: .
43+
push: true
44+
platforms: linux/amd64,linux/arm64
45+
tags: |
46+
ghcr.io/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:latest
47+
ghcr.io/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ github.event.release.tag_name }}
48+
labels: |
49+
org.opencontainers.image.title=visionboard
50+
org.opencontainers.image.description=Transforming Data into Actionable Insights"
51+
org.opencontainers.image.url=https://github.com/OpenPathfinder/visionBoard
52+
org.opencontainers.image.source=https://github.com/OpenPathfinder/visionBoard.git
53+
org.opencontainers.image.version=${{ github.event.release.tag_name }}
54+
org.opencontainers.image.licenses=MIT
55+
maintainer="Ulises Gascón <[email protected]>"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,5 @@ dist
132132

133133
# CUSTOM
134134
IGNORE/
135-
output
135+
output
136+
.vscode

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:22-alpine
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY package.json package-lock.json ./
6+
7+
RUN npm install --only=production --no-cache
8+
9+
COPY . .
10+
11+
RUN chmod -R 755 /usr/src/app
12+
13+
USER node
14+
15+
ENV NODE_ENV=production
16+
17+
ENTRYPOINT ["node", "./visionboard.js"]

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![VisionBoard logo with a gold compass emblem and the tagline 'Transforming Data into Actionable Insights' on a black background](.github/OTHER/header.png)
1+
![VisionBoard logo with a gold compass emblem and the tagline 'Transforming Data into Actionable Insights' on a black background](https://raw.githubusercontent.com/OpenPathfinder/branding/refs/heads/main/visionBoard/variation_header.png)
22

33
# VisionBoard
44

@@ -100,7 +100,7 @@ GITHUB_TOKEN=your_github_token_here
100100
Then load it using:
101101

102102
```bash
103-
node --env-file=.env index.js workflow run --name populate-repos-list
103+
node --env-file=.env visionboard.js workflow run --name populate-repos-list
104104
```
105105

106106
## Usage
@@ -110,67 +110,67 @@ node --env-file=.env index.js workflow run --name populate-repos-list
110110
Add a new project:
111111

112112
```bash
113-
node index.js project add [--name <name>] [--github-urls <urls...>]
113+
node visionboard.js project add [--name <name>] [--github-urls <urls...>]
114114
```
115115

116116
Example:
117117

118118
```bash
119-
node index.js project add --name express --github-urls https://github.com/expressjs https://github.com/pillarjs https://github.com/jshttp
119+
node visionboard.js project add --name express --github-urls https://github.com/expressjs https://github.com/pillarjs https://github.com/jshttp
120120
```
121121

122122
### Workflows
123123

124124
Run a workflow:
125125

126126
```bash
127-
node index.js workflow run [--name <name>]
127+
node visionboard.js workflow run [--name <name>]
128128
```
129129

130130
List workflows:
131131

132132
```bash
133-
node index.js workflow list
133+
node visionboard.js workflow list
134134
```
135135

136136
### Checks
137137

138138
List all checks:
139139

140140
```bash
141-
node index.js check list
141+
node visionboard.js check list
142142
```
143143
Run a specific check:
144144

145145
```bash
146-
node index.js check run [--name <name>]
146+
node visionboard.js check run [--name <name>]
147147
```
148148

149149
There is an specific workflow that runs all the checks sequentially:
150150

151151
```bash
152-
node index.js workflow run run-all-checks
152+
node visionboard.js workflow run run-all-checks
153153
```
154154

155155
### Checklist
156156

157157
The checklist are collections of checks. You can list the available list by running:
158158

159159
```bash
160-
node index.js checklist list
160+
node visionboard.js checklist list
161161
```
162162

163163
Run a specific checklist:
164164

165165
```bash
166-
node index.js checklist run [--name <name>]
166+
node visionboard.js checklist run [--name <name>]
167167
```
168168

169169

170170
It is possible also to define a project scope:
171171

172172
```bash
173-
node index.js checklist run [--name <name>] [--project-scope <name1,name2,...>]
173+
node visionboard.js checklist run [--name <name>] [--project-scope <name1,name2,...>]
174174
```
175175

176176
## Report Management
@@ -186,7 +186,7 @@ _Not yet implemented_
186186
The simplest option is to run the workflow `show-reports`, which will start an HTTP server that lists the content in the `output` folder. Any asset previously generated can be accessed via a web browser using this approach. You can start the server by running:
187187

188188
```bash
189-
node index.js workflow run --name show-reports
189+
node visionboard.js workflow run --name show-reports
190190
```
191191

192192
You can customize the IP and port using the environment variables `PORT` and `IP`. By default, it uses `localhost:3000`.
@@ -235,7 +235,7 @@ npm run db:generate-schema
235235
Enable debug logs using the `DEBUG` environment variable:
236236

237237
```bash
238-
DEBUG=* node index.js
238+
DEBUG=* node visionboard.js
239239
```
240240

241241
### Linting

package-lock.json

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"name": "visionBoard",
3-
"version": "1.0.0",
3+
"version": "0.1.0-beta2",
44
"description": "Transforming Data into Actionable insights",
5-
"main": "index.js",
5+
"bin": {
6+
"visionBoard": "visionboard.js"
7+
},
68
"scripts": {
79
"lint": "standard",
810
"lint:fix": "standard --fix",
@@ -18,7 +20,14 @@
1820
"db:export-checklists": "node scripts/export-checklists.js",
1921
"db:seed": "knex seed:run"
2022
},
21-
"keywords": [],
23+
"keywords": [
24+
"security",
25+
"CLI"
26+
],
27+
"repository": {
28+
"type": "git",
29+
"url": "https://github.com/OpenPathfinder/visionBoard"
30+
},
2231
"author": "Ulises Gascón",
2332
"license": "MIT",
2433
"standard": {

0 commit comments

Comments
 (0)