GithubHelp home page GithubHelp logo

jenkins-travis-yml-plugin's People

Contributors

masaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jenkins-travis-yml-plugin's Issues

env 対応

env:
  - FOO: bar
  - BAZ: quux

をスクリプトの export で追加する

Broken by slightly sophisticated shell code in .travis.yml

This .travis.yml:


---
script: |
    if true; then
        true
    fi
...

produces the following error:

/var/lib/jenkins/workspace/JAVIS/hudson.20141201122107.920.sh: line 39: syntax error near unexpected token `then'
/var/lib/jenkins/workspace/JAVIS/hudson.20141201122107.920.sh: line 39: `echo $ if true; then'
ERROR:  (Java::Hudson::AbortException)
sun.reflect.GeneratedConstructorAccessor127.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
org.jruby.javasupport.JavaConstructor.newInstanceDirect(JavaConstructor.java:275)
org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:91)
org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:178)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:336)
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:179)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:183)
org.jruby.java.proxies.ConcreteJavaProxy$2.call(ConcreteJavaProxy.java:52)
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:177)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:183)
org.jruby.RubyClass.newInstance(RubyClass.java:855)
org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(JavaMethod.java:278)
org.jruby.java.proxies.ConcreteJavaProxy$3.call(ConcreteJavaProxy.java:148)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:172)
rubyjit.TravisYmlBuilder$$perform_4A06EDC1D08D2E7DE9267BC005E417035E798D8A1695017752.__file__(/var/lib/jenkins/plugins/travis-yml/WEB-INF/classes/models/travis_yml_builder.rb:34)
java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:599)
org.jruby.runtime.invokedynamic.InvocationLinker.invocationFallback(InvocationLinker.java:183)
rubyjit.Jenkins::Tasks::BuildStepProxy$$perform_5A3B002C7CA27A9DAFD502D73F0A034D55A627421695017752.block_0$RUBY$__file__(/var/lib/jenkins/plugins/travis-yml/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb:14)
rubyjit$Jenkins::Tasks::BuildStepProxy$$perform_5A3B002C7CA27A9DAFD502D73F0A034D55A627421695017752$block_0$RUBY$__file__.call(rubyjit$Jenkins::Tasks::BuildStepProxy$$perform_5A3B002C7CA27A9DAFD502D73F0A034D55A627421695017752$block_0$RUBY$__file__)
org.jruby.runtime.CompiledBlock19.yieldSpecificInternal(CompiledBlock19.java:121)
org.jruby.runtime.CompiledBlock19.yieldSpecific(CompiledBlock19.java:96)
org.jruby.runtime.Block.yieldSpecific(Block.java:99)
org.jruby.runtime.invokedynamic.InvocationLinker.yieldSpecificFallback(InvocationLinker.java:404)
rubyjit.Jenkins::Tasks::BuildStepProxy$$boolean_result_D074B6AB5339B2940C00AF05958432465EDE52701695017752.chained_0_rescue_1$RUBY$SYNTHETIC__file__(/var/lib/jenkins/plugins/travis-yml/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb:22)
rubyjit.Jenkins::Tasks::BuildStepProxy$$boolean_result_D074B6AB5339B2940C00AF05958432465EDE52701695017752.__file__(/var/lib/jenkins/plugins/travis-yml/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb:21)
rubyjit.Jenkins::Tasks::BuildStepProxy$$perform_5A3B002C7CA27A9DAFD502D73F0A034D55A627421695017752.__file__(/var/lib/jenkins/plugins/travis-yml/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb:13)
rubyjit.Jenkins::Tasks::BuildStepProxy$$perform_5A3B002C7CA27A9DAFD502D73F0A034D55A627421695017752.__file__(/var/lib/jenkins/plugins/travis-yml/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb)
rubyjit.Jenkins::Tasks::BuildStepProxy$$perform_5A3B002C7CA27A9DAFD502D73F0A034D55A627421695017752.__file__(/var/lib/jenkins/plugins/travis-yml/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/tasks/build_step_proxy.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:121)
org.jruby.javasupport.proxy.JavaProxyConstructor$2.invoke(JavaProxyConstructor.java:224)
org.jruby.proxy.hudson.tasks.Builder$Proxy1.perform(Unknown Source)
hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
hudson.model.Build$BuildExecution.build(Build.java:199)
hudson.model.Build$BuildExecution.doRun(Build.java:160)
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
hudson.model.Run.execute(Run.java:1759)
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
hudson.model.ResourceController.execute(ResourceController.java:89)
hudson.model.Executor.run(Executor.java:240)

Here is the generated build script:

#!/usr/bin/env bash

capture_result() {
  local result=$1
  export TRAVIS_JENKINS_RESULT=$(( ${TRAVIS_JENKINS_RESULT:-0} | $(($result != 0)) ))
}

export CI=1
export CONTINUOUS_INTEGRATION=1
export TRAVIS_JENKINS_RESULT=0


if [ $TRAVIS_JENKINS_RESULT -eq 0 ]; then
echo $ if true; then
    true
fi

if test true; then
    true
fi

fi
exit $TRAVIS_JENKINS_RESULT

There we can clearly see that the bug is caused by not quoting
and escaping script from .travis.yml when it is used as an
argument to echo. Without that the generated lines are
treated as a shell commands. Which is bad in itself, but in
this case the commands even have an invalid syntax. Which
ultimately leads to failed builds.

after_script is run before after_success

The documentation for the Travis Build-Livecycle mentions that after_script is executed after after_success and after_failure.

However this plugin executes after_script immediately after script, even before after_success and after_failure.

I think this plugin should execute them in the same way as Travis does.

テスト追加

ロジック分離したので、テストも書こう。

How does it work?

Hi,

I don't really know how to use this plugin?
It's installed on my Jenkins server but nothing is happening. How do I get it to run on my jobs?

Thanks a lot

.tavis.yml build step doesn't work on jenkins v1.598

Hi, trying to figure out how to use your plugin.

I'm getting the following message in my jenkins log when I save a build using the .travis.yml builder:

getConfigPage -> /travis_yml_builder/config

This is all it logs, and when I go to reconfigure the build the build step is now gone, so it is removed on saves. Any ideas?

travis.yml $PATH not inheriting build $PATH

Issue:
.travis.yml parser doesn't inherit job path.

env path is /bin:/usr/bin:/sbin:/usr/sbin on builds (got this from a build of mine). This path doesn't work with OSX because everything outside of core install is in /usr/local/sbin so node etc will not be useable unless you specify the full path.

SSH_AUTH_SOCK from SSH Agent Plugin is not preserved

I want to use the SSH Agent Plugin in order to allow a composer install build step to fetch my custom bundles from my private repositories.

The environment variable SSH_AUTH_SOCK then is present during usual Jenkins build steps. This will make Git use the defined credentials. However during the individual actions like install and script defined in .travis.yml the environment variable is missing.

This prevents me from fully describing the build process in .travis.yml. Therefore i think the environment variable SSH_AUTH_SOCK should be whitelisted and be pass the individual Travis actions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.