definisi steps.publish

Kata publish kunci menerbitkan (mengunggah) file atau folder sebagai artefak alur yang dapat dikonsumsi oleh pekerjaan dan alur lain.

Kata publish kunci menerbitkan (mengunggah) file atau folder sebagai artefak alur yang dapat dikonsumsi oleh pekerjaan dan alur lain.

Penting

Langkah publish ini hanya didukung pada Layanan Azure DevOps. Jika Anda menggunakannya di Azure DevOps Server, Anda akan menerima pesan kesalahan yang mirip Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. dengan Gunakan Terbitkan Artefak Build jika Anda menggunakan Azure DevOps Server.

steps:
- publish: string # Required as first property. The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
  artifact: string # Artifact name.
  condition: string # Evaluate this condition expression to determine whether to run this task.
  continueOnError: boolean # Continue running even on failure?
  displayName: string # Human-readable name for the task.
  target: string | target # Environment in which to run this task.
  enabled: boolean # Run this task when the job runs?
  env: # Variables to map into the process's environment.
    string: string # Name/value pairs
  name: string # ID of the step.
  timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.
  retryCountOnTaskFailure: string # Number of retries if the task fails.
steps:
- publish: string # Required as first property. The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
  artifact: string # Artifact name.
  condition: string # Evaluate this condition expression to determine whether to run this task.
  continueOnError: boolean # Continue running even on failure?
  displayName: string # Human-readable name for the task.
  target: string | target # Environment in which to run this task.
  enabled: boolean # Run this task when the job runs?
  env: # Variables to map into the process's environment.
    string: string # Name/value pairs
  name: string # ID of the step.
  timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.
steps:
- publish: string # Required as first property. The publish step is a shortcut for the PublishPipelineArtifact@1 task. The task publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume.
  artifact: string # Artifact name.
  condition: string # Evaluate this condition expression to determine whether to run this task.
  continueOnError: boolean # Continue running even on failure?
  displayName: string # Human-readable name for the task.
  enabled: boolean # Run this task when the job runs?
  env: # Variables to map into the process's environment.
    string: string # Name/value pairs
  name: string # ID of the step.
  timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.

Definisi yang mereferensikan definisi ini: langkah-langkah

Properti

publish String. Diperlukan sebagai properti pertama.
Langkah terbitkan adalah pintasan untuk tugas PublishPipelineArtifact@1. Tugas menerbitkan (mengunggah) file atau folder sebagai artefak alur yang dapat dikonsumsi oleh pekerjaan dan alur lain.

artifact String.
Nama artefak.

condition String.
Evaluasi ekspresi kondisi ini untuk menentukan apakah akan menjalankan tugas ini.

continueOnErrorboolean.
Terus berjalan bahkan pada kegagalan?

displayName String.
Nama yang dapat dibaca manusia untuk tugas tersebut.

targettarget.
Lingkungan tempat menjalankan tugas ini.

enabledboolean.
Jalankan tugas ini ketika pekerjaan berjalan?

env kamus string.
Variabel untuk dipetakan ke lingkungan proses.

name String.
ID langkah. Nilai yang dapat diterima: [-_A-Za-z0-9]*.

timeoutInMinutes String.
Waktu untuk menunggu tugas ini selesai sebelum server mematikannya.

Catatan

Alur dapat dikonfigurasi dengan batas waktu tingkat pekerjaan. Jika interval batas waktu tingkat pekerjaan berlalu sebelum langkah Anda selesai, pekerjaan yang sedang berjalan (termasuk langkah Anda) dihentikan, bahkan jika langkah dikonfigurasi dengan interval yang lebih lama timeoutInMinutes . Untuk informasi selengkapnya, lihat Batas Waktu.

retryCountOnTaskFailure String.
Jumlah percobaan ulang jika tugas gagal.

Keterangan

Kata publish kunci adalah pintasan untuk tugas Terbitkan Artefak Alur.

Penting

Langkah publish ini hanya didukung pada Layanan Azure DevOps. Jika Anda menggunakannya di Azure DevOps Server, Anda akan menerima pesan kesalahan yang mirip Pipeline Artifact Task is not supported in on-premises. Please use Build Artifact Task instead. dengan Gunakan Terbitkan Artefak Build jika Anda menggunakan Azure DevOps Server.

Pelajari selengkapnya tentang menerbitkan artefak.

Contoh

steps:
- publish: $(Build.SourcesDirectory)/build
  artifact: WebApp
  displayName: Publish artifact WebApp

Lihat juga