Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented python support #78

Merged
merged 3 commits into from
Aug 18, 2018

Conversation

michelvocks
Copy link
Member

Fixes #68

This feature will set the minimum golang version to 1.10 because I had to switch to x509.MarshalPKCS8PrivateKey which was introduced with go 1.10.

@michelvocks michelvocks added the Needs Work The PR still requires some work from the submitter. label Aug 17, 2018
@michelvocks michelvocks self-assigned this Aug 17, 2018
@codecov-io
Copy link

codecov-io commented Aug 17, 2018

Codecov Report

Merging #78 into master will increase coverage by 0.22%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
+ Coverage   63.84%   64.07%   +0.22%     
==========================================
  Files          19       21       +2     
  Lines        1668     1751      +83     
==========================================
+ Hits         1065     1122      +57     
- Misses        493      512      +19     
- Partials      110      117       +7
Impacted Files Coverage Δ
pipeline/ticker.go 0% <0%> (ø) ⬆️
pipeline/build_java.go 92.5% <100%> (ø) ⬆️
security/ca.go 70.64% <100%> (-1.78%) ⬇️
pipeline/pipeline.go 95.16% <100%> (+2.59%) ⬆️
scheduler/scheduler.go 74.08% <100%> (+0.02%) ⬆️
pipeline/build_golang.go 100% <100%> (ø) ⬆️
pipeline/update_pipeline.go 57.89% <57.89%> (ø)
pipeline/build_python.go 83.67% <83.67%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c57eea...322b703. Read the comment docs.

@michelvocks michelvocks added Ready To Merge PR is ready to be merged into master and removed Needs Work The PR still requires some work from the submitter. labels Aug 17, 2018
@michelvocks michelvocks changed the title [WIP] Implemented python support Implemented python support Aug 17, 2018
@michelvocks michelvocks requested a review from Skarlso August 17, 2018 15:38
@michelvocks
Copy link
Member Author

@Skarlso This should be fine like it is.

This was a bit more complicated compared to go and java and I had to add some extra stuff like extracting the pipelines in their own virtual environment.
If you want to test it you can use my python test pipeline: https://github.com/michelvocks/gaia-test-pipeline-python
Important You need python 2.7+, pip (easy_install pip), and virtualenv (pip install virtualenv).

Also have a look at the SDK if you want: https://github.com/gaia-pipeline/pythonsdk

}

// install plugin in this environment
cmd = exec.Command("/bin/sh", "-c", fmt.Sprintf(pythonPipInstallCmd, filepath.Join(virtualEnvPath, p.Name)))
Copy link
Member

Choose a reason for hiding this comment

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

Uh. This will make supporting windows harder.

Copy link
Member Author

Choose a reason for hiding this comment

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

True. I guess we have to add later a decision making here: e.g. if windows do this otherwise use this.

// Build start command
c.Path = "/bin/sh"
c.Args = []string{
"/bin/sh",
Copy link
Member

Choose a reason for hiding this comment

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

This too.

Not a blocker for now, but we might want to start thinking about abstracting this.

Even if you put it into a function to compartmentalise it, it will be easier to change later? Cause it's on place only.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can refactor this later. I don't want to hold back the new release because of this 🤗

@@ -204,7 +203,7 @@ func (c *CA) CreateSignedCert() (string, string, error) {
}

// Write out key file in PKCS#8 format
privateKey, err := marshalPKCS8PrivateKey(priv)
privateKey, err := x509.MarshalPKCS8PrivateKey(priv)
Copy link
Member

Choose a reason for hiding this comment

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

Noice! :)

Copy link
Member

@Skarlso Skarlso left a comment

Choose a reason for hiding this comment

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

LGTM :)

@michelvocks michelvocks merged commit 312ae68 into gaia-pipeline:master Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready To Merge PR is ready to be merged into master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants