fix: (issues/7): Code is loading. Will test to see if it is being sent to router. Also adding build for arm.

This commit is contained in:
James Wells 2021-04-03 13:49:56 -07:00
parent 8bb01d0266
commit 139e99a196
Signed by: jwells
GPG key ID: 73196D10B8E65666
2 changed files with 59 additions and 6 deletions

View file

@ -4,7 +4,6 @@ type: docker
name: default
platform:
os: linux
arch: amd64
# trigger:
@ -21,7 +20,7 @@ volumes:
path: /run/docker.sock
steps:
- name: Build ${DRONE_REPO} Container Image
- name: Build ${DRONE_REPO} Container Image On amd64
image: plugins/docker
volumes:
- name: dockersock
@ -46,7 +45,61 @@ steps:
api_key:
from_secret: Datadog
events:
- title: "Build failure"
- title: "Build failure on amd64"
text: "Build ${DRONE_BUILD_NUMBER}"
alert_type: "error"
when:
status:
- failure
---
kind: pipeline
type: docker
name: default
platform:
arch: arm
# trigger:
# branch:
# exclude:
# - main
clone:
depth: 1
volumes:
- name: dockersock
host:
path: /run/docker.sock
steps:
- name: Build ${DRONE_REPO} Container Image On arm
image: plugins/docker
volumes:
- name: dockersock
path: /var/run/docker.sock
settings:
auto_tag: false
daemon_off: true
debug: false
dockerfile: docker/Dockerfile
mirror: "https://registry.dragonheim.net/"
purge: true
repo: ${DRONE_REPO}
# target: development
username:
from_secret: docker_username
password:
from_secret: docker_auth
- name: Send Status To Datadog
image: masci/drone-datadog
settings:
api_key:
from_secret: Datadog
events:
- title: "Build failure on arm"
text: "Build ${DRONE_BUILD_NUMBER}"
alert_type: "error"
when:

View file

@ -11,7 +11,7 @@ import (
gs "git.dragonheim.net/dragonheim/gagent/src/gstructs"
// client "git.dragonheim.net/dragonheim/gagent/src/client"
gc "git.dragonheim.net/dragonheim/gagent/src/client"
gr "git.dragonheim.net/dragonheim/gagent/src/router"
gw "git.dragonheim.net/dragonheim/gagent/src/worker"
@ -132,9 +132,9 @@ func main() {
}
agent, err := ioutil.ReadFile(arguments["--agent"].(string))
if err == nil {
log.Printf("Agent containts %v\n", string(agent))
// log.Printf("Agent containts %v\n", string(agent))
log.Printf("Forking...\n")
// go client.Main(config, string(agent))
go gc.Main(config, string(agent))
log.Printf("Forked thread has completed\n")
time.Sleep(10 * time.Second)
} else {