Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Feat/cli deployment #1

Merged
merged 15 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,42 @@ jobs:
java-version: '17'
distribution: 'adopt'

- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
- name: Build and Test with maven
run: mvn --batch-mode --update-snapshots verify

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '16'

- name: Install Dependencies
run: |
npm install -g bpmnlint dmnlint

- name: Run BPMN Lint
# Find all BPMN files in subdirectories and lint them
run: |
find . -type f -name '*.bpmn' -exec sh -c 'bpmnlint -c "${0%/*}/.bpmnlintrc" "$0"' {} \;
if [ $? -eq 0 ]; then
echo "BPMN linting passed"
else
echo "BPMN linting failed"
exit 1
fi

- name: Run DMN Lint
# Find all DMN files in subdirectories and lint them
run: |
find . -type f -name '*.dmn' -exec sh -c 'dmnlint -c "${0%/*}/.dmnlintrc" "$0"' {} \;
if [ $? -eq 0 ]; then
echo "DMN linting passed"
else
echo "DMN linting failed"
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/deploy_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- name: Pull image
run: docker pull miragon/process-ide-cli
- name: Deploy process
run: docker run miragon/process-ide-cli node main.js deploy -d order-example/order-example-camunda7/src/main/resources -t dev
run: docker run -v $PWD/order-example/order-example-camunda7/src/main/resources:/app/artifacts miragon/process-ide-cli node main.js deploy -d artifacts -t test
18 changes: 18 additions & 0 deletions .github/workflows/publish_artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: publish artifacts
on: [workflow_dispatch]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm lint
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "bpmnlint:recommended"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "dmnlint:recommended"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# UnifiedArtifact npm Package

## Overview
Welcome to the Git repository for the UnifiedArtifact npm package. This package serves as a showcase, demonstrating how npm packages can be effectively used to introduce versioning to process artifacts. It provides a centralized hub for sharing a consistent artifact base across development projects, simplifying versioning, streamlining collaboration, and enhancing dependency management.

## Key Benefits
- **Version Consistency:** Ensure uniform versioning across projects for a cohesive development experience.
- **Artifact Sharing:** Share a common foundation for projects, fostering collaboration and reliability.
- **Seamless Integration:** Easily integrate UnifiedArtifact into your development workflow for consistent results.

## How to Use
1. Install the npm package: `npm install unified-artifact`
2. Access JSON files directly: `const artifact = require('unified-artifact/your-file.json');`

## Contributing
We welcome contributions! Feel free to open issues, submit pull requests, or join the discussion.

## License
This repository is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Maintainer
Amin Yacine <[email protected]>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "unified-artifact",
"version": "1.0.0",
"description": "This npm package offers a centralized solution for sharing a consistent artifact base.",
"files": ["*.json"],
"repository": {
"type": "git",
"url": "git+https://github.com/AminYacine/element-templates.git"
},
"author": "Amin Yacine",
"license": "MIT",
"bugs": {
"url": "https://github.com/AminYacine/element-templates/issues"
},
"homepage": "https://github.com/AminYacine/element-templates#readme"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"targetEnvironments": [
{
"name": "local",
"url": "http://localhost:8090/engine-rest"
"url": "https://miranum.miragon.dev/deployment"
},
{
"name": "dev",
"url": "https://miranum.miragon.dev/rest"
"url": "https://miranum.miragon.dev/deployment"
},
{
"name": "test",
"url": "http://localhost:8090"
"url": "https://miranum.miragon.dev/deployment"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surfire.plugin.version}</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<testFailureIgnore>false</testFailureIgnore>
<includes>
<include>**/*Test.java</include>
</includes>
Expand Down