initial commit
This commit is contained in:
commit
0337268521
|
@ -0,0 +1,30 @@
|
|||
[
|
||||
{
|
||||
// test pipeline
|
||||
name: 'test pipe',
|
||||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
trigger: {
|
||||
event: ['tag'],
|
||||
},
|
||||
clone: {
|
||||
disable: false,
|
||||
depth: 0,
|
||||
},
|
||||
steps: [
|
||||
{
|
||||
name: 'step',
|
||||
image: 'alpine',
|
||||
when: {
|
||||
event: ['tag'],
|
||||
},
|
||||
commands: [
|
||||
'echo hello',
|
||||
'echo $${DRONE_COMMIT}',
|
||||
'echo $${DRONE_TAG}',
|
||||
],
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
]
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: test pipe
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: step
|
||||
image: alpine
|
||||
commands:
|
||||
- echo hello
|
||||
- echo $${DRONE_COMMIT}
|
||||
- echo $${DRONE_TAG}
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
...
|
|
@ -0,0 +1,19 @@
|
|||
# .drone
|
||||
|
||||
these files are used to build a yml file to specify the drone build.
|
||||
|
||||
To build you need to [install](https://docs.drone.io/cli/install/) drone utility.
|
||||
|
||||
```shell
|
||||
drone jsonnet --source .drone/.drone.jsonnet --target .drone/.drone.yml --stream
|
||||
```
|
||||
|
||||
make a pre commit hook to compile
|
||||
|
||||
```shell
|
||||
|
||||
echo `drone jsonnet --source .drone//.drone.jsonnet --target .drone//.drone.yml --stream` > .git/hooks/pre-commit
|
||||
echo `git add .drone//.drone.yml` > .git/hooks/pre-commit
|
||||
|
||||
chmod +x .git/hooks/pre-commit
|
||||
```
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
node_modules
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"compareUrlFormat": "{{repoUrl}}/compare/{{previousTag}}...{{currentTag}}"
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
MIT License Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,20 @@
|
|||
# compose
|
||||
|
||||
functional composition for jsonnet
|
||||
|
||||
```jsonnet
|
||||
local compose = import 'node_modules/jsonnet-compose/compose.libsonnet';
|
||||
|
||||
compose([
|
||||
function(x) x+1,
|
||||
function(x) x+2,
|
||||
])(1)
|
||||
```
|
||||
|
||||
use https://www.conventionalcommits.org/en/v1.0.0/ to control releases.
|
||||
|
||||
to release
|
||||
|
||||
```
|
||||
yarn release
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
// the tail of an array
|
||||
local tail(array) = std.makeArray(
|
||||
std.length(array) -1,
|
||||
function(x) array[x + 1],
|
||||
);
|
||||
local compose(functions) =
|
||||
if std.length(functions) == 0
|
||||
then
|
||||
function(object) object
|
||||
else
|
||||
function(object) compose(
|
||||
tail(
|
||||
functions,
|
||||
)
|
||||
)(
|
||||
functions[0](object)
|
||||
);
|
||||
// compose an array of functions
|
||||
compose
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "@sigyl/jsonnet-compose",
|
||||
"version": "0.0.2",
|
||||
"description": "function compose",
|
||||
"main": "compose.libsonnet",
|
||||
"scripts": {
|
||||
"publish": "git push --follow-tags origin master && npm publish",
|
||||
"release": "standard-version",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://sigyl.com/git/sigyl/jsonnet-compose.git"
|
||||
},
|
||||
"keywords": [
|
||||
"jsonnet",
|
||||
"functional",
|
||||
"compose"
|
||||
],
|
||||
"author": "giles bradshaw",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"standard-version": "^8.0.2"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue