Jenkins没有标签Linux

时间:2018-10-04 10:27:28

标签: linux docker jenkins appharbor

我正在尝试运行Jenkins管道,而我一直在收到错误消息;

'詹金斯(Jenkins)没有标签'lunux'

有人知道为什么会这样吗?是我缺少的插件吗? thnx

pipeline {
    agent{
        label 'linux'
    }
    stages {
        stage('Checkout Code') {
            steps {
                checkout scm
            }
        }
        stage('Build Docker Container') {
            steps {
                script {
                    sh "ls -ltr"
                    env.HARBORHOST ="harbour.com"
                    env.REGISTRY = "securewbs"
                    env.IMAGE = "${env.HARBORHOST}/${env.REGISTRY}/securewbs:${env.BUILD_NUMBER}"
                    wbs = docker.build("${env.IMAGE}")
                }
            }
        }

2 个答案:

答案 0 :(得分:2)

请查看您的Jenkins实例(https://your-jenkins/configure)的配置部分。有一个名为Lockable Resources Manager的部分,您的'linux'标签应在此处列出。
标签是一个选择字段。

答案 1 :(得分:0)

转到管理詹金斯-> 管理节点。您可以选择这些节点之一作为代理。从“名称”列中获取字符串。例如,如果您的节点之一的名称是“ master”,则可以输入:

Sub pulldata()

    Dim tod As String
    Dim IE As Object
    Dim doc As HTMLDocument

    Dim Tbl As HTMLTable, Cel As HTMLTableCell, Rw As HTMLTableRow, Col As HTMLTableCol
    Dim TrgRw As Long, TrgCol As Long

    Set IE = CreateObject("InternetExplorer.Application")
    IE.Visible = True

    IE.navigate "https://nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?segmentLink=17&instrument=OPTIDX&symbol=NIFTY&date=25APR2019"

    Do While IE.Busy Or IE.readyState <> 4
        Application.Wait DateAdd("s", 1, Now)
    Loop

    tod = ThisWorkbook.Sheets("URLList").Range("C2").Value
    Sheets.Add After:=Sheets(Sheets.Count)

    ActiveSheet.Name = tod

    Set doc = IE.document

    For nurl = 2 To 191
        lCol = Range("IV2").End(xlToLeft).Offset(0, 0).Column

        doc.getElementById("underlyStock").Value = ThisWorkbook.Sheets("URLList").Range("A" & nurl).Value
        doc.parentWindow.execScript "goBtnClick('stock');", "javascript"

        Do While IE.Busy Or IE.readyState <> 4
            Application.Wait DateAdd("s", 1, Now)
        Loop

        strVal = Range("IV1").End(xlToLeft).Offset(0, 0).Select
        Set Tbl = doc.getElementById("octable")

        TrgRw = 1
        For Each Rw In Tbl.Rows
            TrgCol = 1
            For Each Cel In Rw.Cells
                ThisWorkbook.Sheets(tod).Cells(1, lCol).Cells(TrgRw, TrgCol).Value = Cel.innerText
                TrgCol = TrgCol + Cel.colSpan   ' if Column span is > 1 multiple
            Next Cel
            TrgRw = TrgRw + 1
        Next Rw
    Next
End Sub