提交 10d460f3 编写于 作者: Y yaron2

Merge branch 'master' into release-0.1.0

......@@ -110,6 +110,10 @@ cd $GOPATH/src/github.com/actionscore/actions/cmd/action
go build -o action
```
**Note**: There is a known issue with a Document DB package that may cause build issues. If building throws an error containing `Cannot find package "github.com/a8m/documentdb-go"`, you'll need to get that package by running `go get -u github.com/a8m/documentdb-go`.
**Windows Users**: Actions currently takes a dependency on gcc. If building throws an error containing: `"gcc": executable file not found in %PATH%`, you'll need to install gcc through the [Cygwin Project](https://sourceware.org/cygwin/) or the [MinGW Project](http://mingw-w64.org/doku.php).
## Usage
Check out the following tutorials:
......
......@@ -2,6 +2,7 @@
trigger:
- master
- release-*
variables:
GOPATH: '$(system.defaultWorkingDirectory)/gopath'
......@@ -100,7 +101,6 @@ jobs:
condition: |
and
(
eq(variables['Build.SourceBranch'], 'refs/heads/master'),
eq(dependencies.build_darwin_amd64_action.result, 'Succeeded'),
eq(dependencies.build_darwin_amd64_assigner.result, 'Succeeded'),
eq(dependencies.build_darwin_amd64_controller.result, 'Succeeded'),
......@@ -116,14 +116,38 @@ jobs:
)
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download pipeline artifacts to workspace'
inputs:
buildType: 'current'
itemPattern: '**/*.zip'
targetPath: '$(Pipeline.Workspace)'
- task: AzureFileCopy@3
displayName: 'Publish archives to blob storage'
inputs:
SourcePath: '$(Pipeline.Workspace)/drop'
azureSubscription: 'Actions Releases'
Destination: 'AzureBlob'
storage: 'actionsreleases'
ContainerName: 'bin'
\ No newline at end of file
ContainerName: 'bin'
- job: 'build_and_push_amd64_docker_image'
pool:
vmImage: 'ubuntu-latest'
dependsOn:
- publish_edge_binaries
condition: |
eq(dependencies.publish_edge_binaries.result, 'Succeeded')
steps:
- template: 'build-and-push-image-template.yml'
parameters:
targetArch: amd64
- job: 'build_and_push_arm_docker_image'
pool:
vmImage: 'ubuntu-latest'
dependsOn:
- publish_edge_binaries
condition: |
eq(dependencies.publish_edge_binaries.result, 'Succeeded')
steps:
- template: 'build-and-push-image-template.yml'
parameters:
targetArch: arm
\ No newline at end of file
# actionscore/actions build and push image template
parameters:
targetArch: 'amd64'
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download pipeline artifacts to workspace'
inputs:
buildType: 'current'
itemPattern: '**/*_linux_${{ parameters.targetArch }}.zip'
targetPath: '$(Pipeline.Workspace)'
- task: CopyFiles@2
displayName: 'Copy Dockerfile to workspace'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: 'Dockerfile'
TargetFolder: '$(Pipeline.Workspace)'
OverWrite: true
flattenFolders: true
- task: ExtractFiles@1
displayName: 'Extract linux ${{ parameters.targetArch }} binaries'
inputs:
archiveFilePatterns: '$(Pipeline.Workspace)/drop/*_linux_${{ parameters.targetArch }}.zip'
destinationFolder: '$(Pipeline.Workspace)/dist'
cleanDestinationFolder: false
- task: Docker@2
displayName: 'Build and push ${{ parameters.targetArch }} Docker image'
condition: eq('${{ parameters.targetArch }}', 'amd64')
inputs:
containerRegistry: 'ACR Actions Core'
repository: 'actions'
command: 'buildAndPush'
Dockerfile: '$(Pipeline.Workspace)/Dockerfile'
tags: 'latest'
- task: Docker@2
displayName: 'Build and push ${{ parameters.targetArch }} Docker image'
condition: ne('${{ parameters.targetArch }}', 'amd64')
inputs:
containerRegistry: 'ACR Actions Core'
repository: 'actions'
command: 'buildAndPush'
Dockerfile: '$(Pipeline.Workspace)/Dockerfile'
tags: 'latest-${{ parameters.targetArch }}'
\ No newline at end of file
# actionscore/actions github release pipeline
variables:
ReleaseIteration: ''
ReleaseVersion: ''
ReleaseTitle: 'Actions Runtime $(ReleaseVersion) Release'
ReleaseTitle: 'Actions Runtime $(REL_VERSION) Release'
pool:
vmImage: 'macOS-latest'
......@@ -17,17 +15,17 @@ steps:
specificBuildWithTriggering: true
buildVersionToDownload: 'latest'
artifactName: 'drop'
itemPattern: '**/.zip'
itemPattern: 'drop/*.zip'
targetPath: '$(Pipeline.Workspace)'
- task: GitHubRelease@0
inputs:
gitHubConnection: 'GitHub'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(ReleaseVersion)'
target: '$(REL_VERSION)'
tagSource: 'manual'
tag: '$(ReleaseIteration)'
tag: '$(REL_ITERATION)'
title: '$(ReleaseTitle)'
assets: $(Pipeline.Workspace)
releaseNotesFile: '$(ReleaseNotesFilePath)'
releaseNotesFile: 'docs/release_notes/v$(REL_VERSION).md'
isPreRelease: true
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册