簡體   English   中英

VSTS Cordova Android Build Job卡住了

[英]VSTS Cordova Android Build Job stuck

使用Hosted VS2017機器進行離子/科爾多瓦構建工作,無論我如何更改,都會卡住:

Queueing build for platform android w/options: --release,--device,--gradleArg=--no-daemon
Processing res/native for android
add to body class: platform-android
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172
Welcome to Gradle 4.8!
Here are the highlights of this release:
 - Dependency locking
 - Maven Publish and Ivy Publish plugins improved and marked stable
 - Incremental annotation processing enhancements
 - APIs to configure tasks at creation time
For more details see https://docs.gradle.org/4.8/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :wrapper
BUILD SUCCESSFUL in 34s
1 actionable task: 1 executed

我在VSTS文檔中讀到gradle守護程序將被卡住,因此您應該將一個鈎子添加到after_compile文件夾中

IF EXIST platforms\android platforms\android\gradlew --stop

但這似乎也不起作用。 我嘗試刪除build.json中的代碼簽名,但這似乎也無濟於事,甚至嘗試通過npm引導整個過程

npm run cordova -- build android --release --device --gradleArg=--no-daemon

同樣的問題。 我已經在我的taco.json中嘗試過Cordova 6.5.0、7.1.0和8.0.0,同樣的問題。 我真的感覺是gradle守護進程被卡住了,但是鈎子被忽略了,或者它們被更改了,我只是現在找不到應該去的地方或位置。

構建定義:

{
  "badgeEnabled": null,
  "buildNumberFormat": null,
  "comment": null,
  "createdDate": "2018-07-18T15:31:11.333000+00:00",
  "demands": null,
  "description": null,
  "draftOf": null,
  "dropLocation": null,
  "id": ,
  "jobAuthorizationScope": "projectCollection",
  "jobCancelTimeoutInMinutes": 5,
  "jobTimeoutInMinutes": 60,
  "latestBuild": null,
  "latestCompletedBuild": null,
  "metrics": null,
  "name": "Mobile Builds",
  "path": "\\project",
  "process": {
    "phases": [
      {
        "condition": "succeeded()",
        "jobAuthorizationScope": "projectCollection",
        "jobCancelTimeoutInMinutes": 1,
        "name": "Android",
        "refName": "Phase_1",
        "steps": [
          {
            "alwaysRun": false,
            "condition": "succeeded()",
            "continueOnError": false,
            "displayName": "install",
            "enabled": true,
            "environment": {},
            "inputs": {
              "command": "install",
              "customCommand": "",
              "customEndpoint": "",
              "customFeed": "",
              "customRegistry": "useNpmrc",
              "publishEndpoint": "",
              "publishFeed": "",
              "publishRegistry": "useExternalRegistry",
              "verbose": "false",
              "workingDir": "WorkDir"
            },
            "task": {
              "definitionType": "task",
              "id": "fe47e961-9fa8-4106-8639-368c022d43ad",
              "versionSpec": "1.*"
            },
            "timeoutInMinutes": 0
          },
          {
            "alwaysRun": false,
            "condition": "succeeded()",
            "continueOnError": false,
            "displayName": "gulp sass",
            "enabled": true,
            "environment": {},
            "inputs": {
              "command": "custom",
              "customCommand": "run gulp -- sass",
              "customEndpoint": "",
              "customFeed": "",
              "customRegistry": "useNpmrc",
              "publishEndpoint": "",
              "publishFeed": "",
              "publishRegistry": "useExternalRegistry",
              "verbose": "false",
              "workingDir": "WorkDir"
            },
            "task": {
              "definitionType": "task",
              "id": "fe47e961-9fa8-4106-8639-368c022d43ad",
              "versionSpec": "1.*"
            },
            "timeoutInMinutes": 0
          },
          {
            "alwaysRun": false,
            "condition": "succeeded()",
            "continueOnError": false,
            "displayName": "Cordova Build android",
            "enabled": true,
            "environment": {},
            "inputs": {
              "antBuild": "false",
              "archs": "",
              "configuration": "release",
              "cordovaArgs": "",
              "cordovaVersion": "",
              "cwd": "WorkDir",
              "defaultKeychainPassword": "",
              "iosSignMethod": "file",
              "iosSigningIdentity": "",
              "keyPass": "",
              "keystoreAlias": "",
              "keystoreFile": "",
              "keystorePass": "",
              "outputPattern": "bin",
              "p12": "",
              "p12pwd": "",
              "platform": "android",
              "provProfile": "",
              "provProfileUuid": "",
              "removeProfile": "false",
              "targetEmulator": "false",
              "unlockDefaultKeychain": "false",
              "windowsAppx": "",
              "windowsOnly": "false",
              "windowsPhoneOnly": "false",
              "xcodeDeveloperDir": ""
            },
            "task": {
              "definitionType": "task",
              "id": "70e94267-15dc-434d-8973-023d766825d7",
              "versionSpec": "1.*"
            },
            "timeoutInMinutes": 0
          },
          {
            "alwaysRun": false,
            "condition": "succeeded()",
            "continueOnError": false,
            "displayName": "Copy Release Notes to Android Build Folder",
            "enabled": true,
            "environment": {},
            "inputs": {
              "CleanTargetFolder": "false",
              "Contents": "release-notes.txt",
              "OverWrite": "false",
              "SourceFolder": "WorkDir",
              "TargetFolder": "bin/Android/Release",
              "flattenFolders": "false"
            },
            "task": {
              "definitionType": "task",
              "id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c",
              "versionSpec": "2.*"
            },
            "timeoutInMinutes": 0
          },
          {
            "alwaysRun": false,
            "condition": "succeeded()",
            "continueOnError": false,
            "displayName": "Publish Artifact: Android",
            "enabled": true,
            "environment": {},
            "inputs": {
              "ArtifactName": "Android",
              "ArtifactType": "Container",
              "Parallel": "false",
              "ParallelCount": "8",
              "PathtoPublish": "WorkDir/bin/Android/Release",
              "TargetPath": ""
            },
            "task": {
              "definitionType": "task",
              "id": "2ff763a7-ce83-4e1f-bc89-0ae63477cebe",
              "versionSpec": "1.*"
            },
            "timeoutInMinutes": 0
          }
        ],
        "target": {
          "allowScriptsAuthAccessOption": false,
          "executionOptions": {
            "type": 0
          },
          "type": 1
        }
      }
    ],
    "type": 1
  },
  "processParameters": {
    "additionalProperties": {},
    "dataSourceBindings": null,
    "inputs": null,
    "sourceDefinitions": null
  },
  "properties": {},
  "quality": "definition",
  "queue": {
    "additionalProperties": {},
    "id": 288,
    "name": "Hosted VS2017",
    "pool": {
      "additionalProperties": {},
      "id": 10,
      "isHosted": true,
      "name": "Hosted VS2017"
    },
    "url": "https://account.visualstudio.com/_apis/build/Queues/288"
  },
  "queueStatus": "enabled",
  "repository": {
    "additionalProperties": {},
    "checkoutSubmodules": false,
    "clean": "false",
    "defaultBranch": "refs/heads/master",
    "id": "ce667db8-941e-47a6-b191-3cb5cf478f69",
    "name": "repo",
    "properties": {
      "checkoutNestedSubmodules": "false",
      "cleanOptions": "0",
      "fetchDepth": "0",
      "gitLfsSupport": "false",
      "labelSources": "0",
      "labelSourcesFormat": "$(build.buildNumber)",
      "reportBuildStatus": "true",
      "skipSyncSource": "false"
    },
    "rootFolder": null,
    "type": "TfsGit",
    "url": "https://account.visualstudio.com/project/_git/repo"
  },
  "revision": 15,
  "tags": [],
  "triggers": null,
  "type": "build",
  "uri": "vstfs:///Build/Definition/160",
  "url": "https://account.visualstudio.com/guid/_apis/build/Definitions/160?revision=15",
  "variableGroups": null,
  "variables": {
    "system.debug": {
      "additionalProperties": {},
      "allowOverride": true,
      "isSecret": null,
      "value": "false"
    }
  }
}

我們的ionic 1項目在hooks目錄中有一堆怪異的鈎子腳本,我認為這時已經在cordova構建過程中實現了。 清理我們的hooks目錄,只解決需要解決的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM