Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

pulls in DRONE_RUNNER_ANNOTATONS and puts it on the job spec #61

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

whereismyjetpack
Copy link

This pulls in config from harness/harness#2639 and then injects it into the pod job spec

This is to hopefully work towards resolving #38

Thanks!

@CLAassistant
Copy link

CLAassistant commented Mar 28, 2019

CLA assistant check
All committers have signed the CLA.

config, err := config.Environ()

if err != nil {
logrus.WithError(err).Fatalln("invalid configuration")
Copy link
Member

@bradrydzewski bradrydzewski Mar 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should return an error. Fatalln will kill the program.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been removed in refactoring to use step config!


"github.com/drone/drone-runtime/engine"
"github.com/drone/drone/cmd/drone-controller/config"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a standalone package and should not link to the main Drone repository as a dependency.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering about this. I couldn't find a better way to pull the config in without copy-pasting the config code.. :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you would typically pass these through the Engine Constructor from Drone https://github.com/drone/drone-runtime/blob/master/engine/kube/kube.go#L34

I recommend looking at how the controller passes the Node to the Engine, for example.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip. I will work on this tonight

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, too has been removed in recent commits!

@whereismyjetpack whereismyjetpack changed the title pulls in KUBE_RUNNER_ANNOTATONS and puts it on the job spec pulls in DRONE_RUNNER_ANNOTATONS and puts it on the job spec Mar 28, 2019
engine/spec.go Outdated
@@ -40,6 +40,7 @@ type (
// Step defines a pipeline step.
Step struct {
Metadata Metadata `json:"metadata,omitempty"`
Annotations map[string]string `json:annotations,omitempty"`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a double quote missing here.

@whereismyjetpack
Copy link
Author

This should be all fixed up!

@whereismyjetpack
Copy link
Author

Any update on this one?

@zzq889
Copy link

zzq889 commented Aug 12, 2019

May I ask when will this pr be merged?

@tboerger
Copy link

I can't talk about the plans from @bradrydzewski, but I would guess that he prefers a dedicated kubernetes runner like he already started to provide for exec and ssh.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants