Initial commit: Spicy CDK automation framework
Jenkins shared library and CDK constructs for AWS infrastructure. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
46
docs/JENKINSFILE_EXAMPLE_NPM.md
Normal file
46
docs/JENKINSFILE_EXAMPLE_NPM.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Example Jenkinsfile for NPM Package Publishing
|
||||
|
||||
## Basic Usage
|
||||
|
||||
Create a `Jenkinsfile` in your repository root:
|
||||
|
||||
```groovy
|
||||
@Library(["spicy-automation@main"]) _
|
||||
|
||||
publishNpmPackage()
|
||||
```
|
||||
|
||||
## With Scoped Package
|
||||
|
||||
```groovy
|
||||
@Library(["spicy-automation@main"]) _
|
||||
|
||||
publishNpmPackage(
|
||||
packageName: '@kodeniks/my-package',
|
||||
)
|
||||
```
|
||||
|
||||
## With Custom Options
|
||||
|
||||
```groovy
|
||||
@Library(["spicy-automation@main"]) _
|
||||
|
||||
publishNpmPackage(
|
||||
packageName: '@kodeniks/my-package',
|
||||
buildScript: 'build.sh',
|
||||
versionScript: './scripts/docker-ensure-version.sh',
|
||||
registry: 'nexus.kodeniks.com',
|
||||
repository: 'npm-hosted',
|
||||
credentialsId: 'kodeniks-nexus-repository',
|
||||
agentLabel: 'docker',
|
||||
nodeImage: 'node:24-alpine',
|
||||
)
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
1. **No comments at the top** - Jenkinsfiles should start directly with `@Library` or the function call
|
||||
2. **Package name is optional** - It will be read from `package.json` if not provided
|
||||
3. **Scoped packages are supported** - Use format `@scope/package-name`
|
||||
4. **Requires Docker agent** - The agent must have Docker available to run Node containers
|
||||
|
||||
Reference in New Issue
Block a user