add deploy
ci.vdhsn.com/push Build is passing Details

trunk
Adam Veldhousen 3 years ago
parent 3b935243e6
commit d613ed0bfd
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B

@ -2,6 +2,11 @@ kind: pipeline
type: docker
name: docker build
environment:
CONSUL_HTTP_ADDR: http://192.168.1.15:8500
NOMAD_ADDR: http://192.168.1.15:4646
volumes:
- name: dockersock
host:
@ -26,6 +31,40 @@ steps:
DOCKER_PASSWORD:
from_secret: DOCKER_PASS
- name: deploy
image: adamveld12/nomad:1.0.4
commands:
- git clone https://git.vdhsn.com/adam/SunnyHomeLab.git repo
- cd ./repo/jobs
- nomad job run ./git.job
when:
branch:
- trunk
event:
- promote
target:
- production
depends_on:
- docker build
- name: post deploy
image: plugins/matrix
settings:
homeserver: https://matrix.vdhsn.com
password:
from_secret: MATRIX_PASSWORD
roomid: UwldmBPwrgpoXYozVG:matrix.vdhsn.com
template: "Build promoted to deploy on {{ build.branch }} {{ build.status }}. See @ [{{ repo.Owner }}/{{ repo.Name }}#{{ truncate build.commit 8 }}]({{ build.link }}). Triggered by {{ build.author }}"
username:
from_secret: MATRIX_USER
failure: ignore
when:
status:
- failure
- success
depends_on:
- deploy
- name: post update
image: plugins/matrix
settings:

@ -111,7 +111,7 @@ func (ss *Sqlite) GetLogAggregate(la LogAggregateInput) (LogAggregate, error) {
timeIndex := int(l.Started.Sub(la.Start)/time.Second) / la.IntervalSeconds
if AssertIfFail(timeIndex >= len(dataset), "ERROR TIME INDEX OUT OF RANGE %d/%d with interval %d - time index: %s", timeIndex, len(dataset), la.IntervalSeconds, l.Started.Sub(la.Start)/time.Second) {
if Assert(timeIndex >= len(dataset), "ERROR TIME INDEX OUT OF RANGE %d/%d with interval %d - time index: %s", timeIndex, len(dataset), la.IntervalSeconds, l.Started.Sub(la.Start)/time.Second) {
continue
}

@ -8,7 +8,7 @@ func AssertFail(condition bool, fmtStr string, params ...interface{}) {
}
}
func AssertIfFail(condition bool, fmtStr string, params ...interface{}) bool {
func Assert(condition bool, fmtStr string, params ...interface{}) bool {
if condition {
log.Printf(fmtStr, params...)
}

Loading…
Cancel
Save