我正在运行以下 yaml 脚本来构建 docker 镜像并推送到 kubernetes 集群,但同时我想在构建 yaml 脚本时在 azure DevOps 中启用 docker 层缓存。请解释一下如何启用或如何添加azure devops 中的任务来做到这一点。
亚姆:
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
tag: 'web'
DockerImageName: 'boiyaa/google-cloud-sdk-nodejs'
steps:
- task: Docker@2
inputs:
command: 'build'
Dockerfile: '**/Dockerfile'
tags: 'web'
- script: |
echo ${GCLOUD_SERVICE_KEY_STAGING} > ${HOME}/gcp-key.json
gcloud auth activate-service-account …Run Code Online (Sandbox Code Playgroud) 我想在发布版本时访问VSTS源代码存储库(Git)中的约10个文件。我已将PowerShell脚本保存在VSTS源存储库中,并且在部署后,我需要运行这些脚本文件。
所以我在发布定义中添加了部署后的Power Shell任务,但不确定如何访问这些脚本文件以及如何运行这些脚本文件?我可以从VSTS构建定义中发布这些脚本文件,并且可以在发布定义时使用,但是我不想以这种方式使用。
我希望发布定义独立运行。
git azure-devops azure-pipelines azure-pipelines-release-pipeline