5.2.1 • Published 9 months ago
lugger v5.2.1
Lugger
Lugger is an automation framework running on customizable Typescript DSL
Here are some characteristics we desire in this framework:
- Superset of Typescript (normal TS flow should run identically)
- Provide frequently used toolchains as strongly-typed library
- SCM (e.g. git), docker (containerized workloads)
- SSH, Shell scripting
- Infrastructure automation (e.g. AWS, Azure, GCP, etc.)
- Ability to define workflow declaratively
- No need for `await` when using DSL (statements are auto awaited)
- Easy concurrency (parallel)
- All DSL processes are serializable (pause, stash, resume workflow)
- Built-in control against flakiness (e.g. retry, timeout, backoff, repeat, etc.)
import { workflow, params, stage, echo, docker, file } from 'lugger';
class MyCiCdWorkFlow extends Workflow {
setup() {
git.clone({
repo: `${env.REPO_URL}`,
branch: 'mybranch',
folder: './sourcecode'
});
sh `mkdir -p metadata`;
echo `set-up comeplete`;
}
@stage
'Build Docker Images'() {
docker.pull(`nginx:latest`)
.try(5).backoff('auto').timeout(10, 'm')
docker.build(`myapp:${BUILD_NUMBER}`, 'sourcecode/Dockerfile')
.try(2).timeout(10, 'm')
}
@stage
'Run Tests'() {
chdir(`./sourcecode`);
parallel; {
stage('Unit Tests'); {
sh `python tests/unit_test_entrypont.py`
echo `Unit Tests ended`
}
stage('Integration Tests'); {
sh `bash tests/integration_suites.sh`
echo `Integration Tests ended`
}
}
}
@stage
'Deploy'() {
const { user, pass } = SecretManager.resolve({
user: '<secret.docker.deployerAccount.user>',
pass: '<secret.docker.deployerAccount.pass>',
})
const deployedImage = `myregistry.com/myapp:${BUILD_NUMBER}`;
docker.login('myregistry.com', user, pass)
docker.tag(`myapp:${BUILD_NUMBER}`, deployedImage)
docker.push(`myapp:${BUILD_NUMBER}`).try(3)
}
cleanup() {
// release resources
}
success() {
console.log(`I've succeeded`);
}
failure() {
console.log(`I've failed!`);
}
}
// entrypoint
runWorkflow(MyCiCdWorkFlow)
5.1.4
9 months ago
5.1.3
12 months ago
5.2.1
9 months ago
5.1.2
12 months ago
5.1.1
12 months ago
5.0.16
12 months ago
5.0.6
1 year ago
5.0.5
1 year ago
5.0.4
1 year ago
5.0.10
1 year ago
5.0.11
1 year ago
5.0.12
1 year ago
5.0.13
1 year ago
5.0.14
1 year ago
5.0.15
1 year ago
5.0.9
1 year ago
5.0.8
1 year ago
5.0.7
1 year ago
0.5.27
1 year ago
0.5.25
1 year ago
0.5.26
1 year ago
0.5.23
2 years ago
0.5.24
1 year ago
0.5.21
2 years ago
0.5.10
2 years ago
0.5.22
2 years ago
0.5.11
2 years ago
0.5.20
2 years ago
0.5.8
2 years ago
0.5.7
2 years ago
0.5.9
2 years ago
0.5.18
2 years ago
0.5.19
2 years ago
0.5.16
2 years ago
0.5.14
2 years ago
0.5.15
2 years ago
0.5.12
2 years ago
0.5.13
2 years ago
0.5.4
2 years ago
0.5.3
2 years ago
0.5.6
2 years ago
0.5.5
2 years ago
0.5.2
2 years ago
0.5.1
2 years ago
0.0.0
2 years ago