feat: ajout de la CI
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
45da8ae055
commit
a576e01b17
|
@ -0,0 +1,38 @@
|
||||||
|
---
|
||||||
|
# drone encrypt Weko/lestoitsduval-alerting $MJ_APIKEY_PUBLIC
|
||||||
|
kind: secret
|
||||||
|
name: MJ_APIKEY_PUBLIC
|
||||||
|
data: 08pr801Ep2WSQyE8xA/xSOCQedcq050eMt/XCXEgp7pCo21DVWGcrgmk8+77p15EJ0r1ToWWcizAO8A7
|
||||||
|
|
||||||
|
---
|
||||||
|
# drone encrypt Weko/lestoitsduval-alerting $MJ_APIKEY_PRIVATE
|
||||||
|
kind: secret
|
||||||
|
name: MJ_APIKEY_PRIVATE
|
||||||
|
data: FgCqJJHfmQ8L504tfjxyRcHY1K5IV5WqV346ajhIEt/Ahwds3WAUcvTI5UB+0vR5m8YekrIF1qe8cmkv
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: prod
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Test en prod
|
||||||
|
image: node:current-alpine
|
||||||
|
environment:
|
||||||
|
MJ_APIKEY_PUBLIC:
|
||||||
|
from_secret: MJ_APIKEY_PUBLIC
|
||||||
|
MJ_APIKEY_PRIVATE:
|
||||||
|
from_secret: MJ_APIKEY_PRIVATE
|
||||||
|
commands:
|
||||||
|
- TZ=Europe/Paris node index.js
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f
|
||||||
|
settings:
|
||||||
|
homeserver: https://converser.eu
|
||||||
|
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu"
|
||||||
|
userid: "resilien:converser.eu"
|
||||||
|
accesstoken:
|
||||||
|
from_secret: MATRIX_ACCESSTOKEN
|
||||||
|
when:
|
||||||
|
status: [ failure ]
|
1
index.js
1
index.js
|
@ -71,3 +71,4 @@ if (secondDifference > (6 * 60)) {
|
||||||
} else {
|
} else {
|
||||||
console.log(`✅ L'installation répond correctement dernière mise à jour il y a ${secondDifference} secondes.`);
|
console.log(`✅ L'installation répond correctement dernière mise à jour il y a ${secondDifference} secondes.`);
|
||||||
}
|
}
|
||||||
|
await sendAlert();
|
||||||
|
|
Loading…
Reference in New Issue