forked from newrelic/newrelic-fluentd-output
-
Notifications
You must be signed in to change notification settings - Fork 0
/
merge-to-master-pipeline.yml
57 lines (48 loc) · 1.27 KB
/
merge-to-master-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Run any time a commit is merged to the 'master' branch
trigger:
- master
# There is a separate pipeline for PRs (it does not do deploys)
pr: none
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DownloadSecureFile@1
name: "rubyGemsCredentials"
inputs:
secureFile: 'credentials'
- task: UseRubyVersion@0
inputs:
versionSpec: '>= 2.5'
- script: |
gem install bundler
bundle update
bundle install --retry=3 --jobs=4
displayName: 'bundle install'
- task: Bash@3
displayName: 'Run tests'
inputs:
targetType: 'inline'
script: |
bundle exec rake
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
mergeTestResults: true
failTaskOnFailedTests: true
testRunTitle: 'Publish tests'
- task: Bash@3
displayName: 'Build gem'
inputs:
targetType: 'inline'
script: |
gem build newrelic-fluentd-output.gemspec
- task: Bash@3
displayName: 'Publish gem to RubyGems'
inputs:
targetType: 'inline'
script: |
eval "$(rbenv init -)"
mv $(rubyGemsCredentials.secureFilePath) ~/.gem/credentials
sudo chmod 600 ~/.gem/credentials
gem push fluent-plugin-newrelic-*.gem