@logickernel/agileflow 0.4.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/docs/getting-started.md +2 -2
- package/docs/installation.md +5 -6
- package/package.json +1 -1
- package/src/gitlab-push.js +6 -1
- package/src/utils.js +1 -1
package/README.md
CHANGED
|
@@ -80,9 +80,9 @@ jobs:
|
|
|
80
80
|
**GitLab CI** (`.gitlab-ci.yml`):
|
|
81
81
|
```yaml
|
|
82
82
|
agileflow:
|
|
83
|
-
|
|
84
|
-
image: node:20-alpine
|
|
83
|
+
image: node:20
|
|
85
84
|
script:
|
|
85
|
+
- npm install -g @logickernel/agileflow
|
|
86
86
|
- npx @logickernel/agileflow gitlab
|
|
87
87
|
rules:
|
|
88
88
|
- if: '$CI_COMMIT_BRANCH == "main"'
|
package/docs/getting-started.md
CHANGED
|
@@ -121,9 +121,9 @@ jobs:
|
|
|
121
121
|
```yaml
|
|
122
122
|
# Runs on merge to main - creates the tag
|
|
123
123
|
agileflow:
|
|
124
|
-
|
|
125
|
-
image: node:20-alpine
|
|
124
|
+
image: node:20
|
|
126
125
|
script:
|
|
126
|
+
- npm install -g @logickernel/agileflow
|
|
127
127
|
- npx @logickernel/agileflow gitlab
|
|
128
128
|
rules:
|
|
129
129
|
- if: '$CI_COMMIT_BRANCH == "main"'
|
package/docs/installation.md
CHANGED
|
@@ -189,8 +189,9 @@ stages:
|
|
|
189
189
|
# Versioning job - runs on merge to main
|
|
190
190
|
agileflow:
|
|
191
191
|
stage: version
|
|
192
|
-
image: node:20
|
|
192
|
+
image: node:20
|
|
193
193
|
script:
|
|
194
|
+
- npm install @logickernel/agileflow
|
|
194
195
|
- npx @logickernel/agileflow gitlab
|
|
195
196
|
rules:
|
|
196
197
|
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
@@ -199,9 +200,7 @@ agileflow:
|
|
|
199
200
|
build:
|
|
200
201
|
stage: build
|
|
201
202
|
script:
|
|
202
|
-
|
|
203
|
-
- docker build -t myapp:$CI_COMMIT_TAG .
|
|
204
|
-
- docker push myapp:$CI_COMMIT_TAG
|
|
203
|
+
# Script to build your software, usually a docker image that is pulled to a registry
|
|
205
204
|
rules:
|
|
206
205
|
- if: '$CI_COMMIT_TAG =~ /^v/'
|
|
207
206
|
|
|
@@ -209,7 +208,7 @@ build:
|
|
|
209
208
|
deploy-staging:
|
|
210
209
|
stage: deploy
|
|
211
210
|
script:
|
|
212
|
-
|
|
211
|
+
# Script to deploy your software in staging
|
|
213
212
|
environment:
|
|
214
213
|
name: staging
|
|
215
214
|
rules:
|
|
@@ -218,7 +217,7 @@ deploy-staging:
|
|
|
218
217
|
deploy-production:
|
|
219
218
|
stage: deploy
|
|
220
219
|
script:
|
|
221
|
-
|
|
220
|
+
# Script to deploy your software in production
|
|
222
221
|
environment:
|
|
223
222
|
name: production
|
|
224
223
|
rules:
|
package/package.json
CHANGED
package/src/gitlab-push.js
CHANGED
|
@@ -91,7 +91,7 @@ function createTagViaAPI(tagName, message, projectPath, serverHost, accessToken,
|
|
|
91
91
|
* @param {string} message - The tag message
|
|
92
92
|
* @returns {Promise<void>}
|
|
93
93
|
*/
|
|
94
|
-
async function pushTag(tagName, message) {
|
|
94
|
+
async function pushTag(tagName, message, quiet = false) {
|
|
95
95
|
const accessToken = process.env.AGILEFLOW_TOKEN;
|
|
96
96
|
const serverHost = process.env.CI_SERVER_HOST;
|
|
97
97
|
const projectPath = process.env.CI_PROJECT_PATH;
|
|
@@ -128,6 +128,11 @@ async function pushTag(tagName, message) {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
await createTagViaAPI(tagName, message || tagName, projectPath, serverHost, accessToken, commitSha);
|
|
131
|
+
|
|
132
|
+
if (!quiet) {
|
|
133
|
+
const commitUrl = `https://${process.env.CI_SERVER_HOST}/${process.env.CI_PROJECT_PATH}/-/commit/${process.env.CI_COMMIT_SHA}/pipelines`;
|
|
134
|
+
console.log(`Tag ${tagName} created and pushed successfully.\nView the build pipelines at: ${commitUrl}`);
|
|
135
|
+
}
|
|
131
136
|
}
|
|
132
137
|
|
|
133
138
|
module.exports = {
|
package/src/utils.js
CHANGED
|
@@ -72,7 +72,7 @@ function getCurrentBranch() {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
// Conventional commit type configuration
|
|
75
|
-
const TYPE_ORDER = ['feat', 'fix', 'perf', 'refactor', 'style', 'test', '
|
|
75
|
+
const TYPE_ORDER = ['feat', 'fix', 'perf', 'refactor', 'style', 'test', 'build', 'ci', 'docs', 'chore', 'revert'];
|
|
76
76
|
const PATCH_TYPES = ['fix', 'perf', 'refactor', 'test', 'build', 'ci', 'revert'];
|
|
77
77
|
const SEMVER_PATTERN = /^v(\d+)\.(\d+)\.(\d+)(-[a-zA-Z0-9.-]+)?$/;
|
|
78
78
|
|