小编Flo*_*ane的帖子

Jenkins管道:返回构建步骤的值

在Jenkins的这个集成管道中,我使用构建步骤并行触发不同的构建,如下所示:

stage('trigger all builds')
{
  parallel
  {
    stage('componentA')
    {
      steps
      {
        script 
        {
          def myjob=build job: 'componentA', propagate: true, wait: true
        }
      }
    }
    stage('componentB')
    {
      steps 
      {
        script
        {
          def myjob=build job: 'componentB', propagate: true, wait: true
        }
      }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

我想访问该build步骤的返回值,以便我可以在我的Groovy脚本中知道哪个作业名称,数字被触发.

我在示例中发现返回的对象具有类似于getProjectName()或者getNumber()我可以用于此的getter .

但是,我如何知道返回对象的确切类以及我可以调用它的方法列表?管道文档中似乎缺少这一点.我特别要求这个案例,但一般来说,我怎么知道返回对象的类及其文档?

groovy jenkins jenkins-pipeline

14
推荐指数
2
解决办法
1万
查看次数

已被 CORS 策略阻止:请求客户端不是安全上下文,并且资源位于更私有的本地地址空间中

我有一个带有 http 加载内容的网页,以及带有 https 的字体页面:

https://fonts.googleapis.com/css?family=Oswald:300,700,regular&subset=latin-ext

我已将其嵌入到第一页中。

当我加载页面时,它显示以下错误:

已被 CORS 策略阻止:请求客户端不是安全上下文,并且资源位于更私有的本地地址空间中。

我可以在 Apache 上做些什么吗?

apache

6
推荐指数
2
解决办法
4万
查看次数

Artifactory aql:查找具有给定属性的作业构建

我正在尝试查询哪个版本号从foo带有 artifact property 的构建中生成了工件vcs.Revision=aabbccddee123456

在 Artifactory 5.1.3 中。

到目前为止我一直在尝试这样:

curl -u user:apikey -i -X POST https://artifactory.foobar.com/artifactory/api/search/aql -H "content-type:text/plain" -T query.json

查询.json:

builds.find(
{
  "module.artifact.item.repo":"snapshot-local",
  "name":"foo",
  "module.artifact.item.@vcs.Revision":"aabbccddee123456"
}
)
Run Code Online (Sandbox Code Playgroud)

然而,这三行似乎都不正确:

  • builds.find({"module.artifact.item.repo":"snapshot-local"}) 什么也不返回,

  • builds.find({"name":"foo"}) 返回相同的空响应,

  • builds.find({"module.artifact.item.@vcs.Revision":"aabbccddee123456"})还返回这个:

{ "results" : [ ], "range" : { "start_pos" : 0, "end_pos" : 0, "total" : 0 } }

我在这里做错了什么?我确实在 web 应用程序中看到了我使用此名称发布的版本以及正确的工件属性。

artifactory artifactory-query-lang

4
推荐指数
1
解决办法
4123
查看次数

CUDA错误:共享数据太多(0x4018字节,最大0x4000):额外的0x18bytes来自哪里?

我正在尝试实现这个CUDA示例:http: //devblogs.nvidia.com/parallelforall/efficient-matrix-transpose-cuda-cc/ 因为我有0x4000字节可用,所以我尝试使用TILE_DIM = 128,所以

shared unsigned char tile[TILE_DIM][TILE_DIM];

大小为0x4000字节= 16384字节= 128*128字节.

但是,这给了我以下错误:

CUDACOMPILE : ptxas error : Entry function '_Z18transposeCoalescedPh' uses too much shared data (0x4018 bytes, 0x4000 max)

所以我在共享内存中有额外的0x18(24)字节.它们来自哪里,是否可以将它们删除?

我可以编译为Compute版本2.0+更高以删除错误(我的硬件是版本3.0),但这将使用来自L1缓存的内存,这应该更慢.

c++ size pointers cuda

3
推荐指数
1
解决办法
1008
查看次数

使用Jenkins Job DSL在Jenkins中使用Artifactory配置作业

我正在尝试在使用Job DSL插件生成的Jenkins作业中设置Artifactory.

配置如下所示:

  wrappers {
    colorizeOutput 'xterm'
    buildName '#${BUILD_NUMBER}-release'
    artifactoryGenericConfigurator {
      // Repository to deploy to.
      details {
        artifactoryName('artifactory.foo.bar.com')
        artifactoryUrl('https://artifactory.foo.bar.com/artifactory')
        deployReleaseRepository {
          keyFromSelect('')
          keyFromText('')
          dynamicMode(false)
        }
        deploySnapshotRepository {
          keyFromSelect('')
          keyFromText('')
          dynamicMode(false)
        }
        resolveReleaseRepository() {
          keyFromText('')
          keyFromSelect('')
          dynamicMode(false)
        }
        resolveSnapshotRepository() {
          keyFromText('')
          keyFromSelect('')
          dynamicMode(false)
        }
        userPluginKey('')
        userPluginParams('')

        useSpecs(true)
        uploadSpec {
          spec('''{
            "files": [
              {
                  "pattern": "app.tar.gz",
                  "target": "myrepo/app/${BUILD_NUMBER}-release",
                  "flat" : "false"
              }
            ]
          }''')
          filePath(null)
        }
        downloadSpec {
          spec('')
          filePath(null)
        }
      }

      deployPattern('')
      deployBuildInfo(true)
      includeEnvVars(false)
      discardOldBuilds(false)
      discardBuildArtifacts(false) …
Run Code Online (Sandbox Code Playgroud)

groovy artifactory gradle jenkins jenkins-job-dsl

1
推荐指数
1
解决办法
1096
查看次数