-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
86 lines (74 loc) · 2.51 KB
/
azure-pipelines.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Gradle
# Build your Java project and run tests with Gradle using a Gradle wrapper script.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle
sdsds: dsd
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: 'Start-Sleep -Seconds 30'
- task: Bash@3
inputs:
targetType: 'inline'
script: |
temp=$(git describe --tags --abbrev=0)
echo "##vso[task.setvariable variable=tag]$temp"
echo "$temp"
echo $temp
- task: Cache@2
inputs:
key: 'version2 | gradle | "$(Agent.OS)"'
restoreKeys: gradle
path: $(GRADLE_USER_HOME)
displayName: Gradle build cache
- script: |
./gradlew --build-cache build
# stop the Gradle daemon to ensure no files are left open (impacting the save cache operation later)
./gradlew --stop
displayName: Build
- task: Gradle@2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
tasks: 'build'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Pipeline.Workspace)/s/build/libs/'
publishLocation: 'pipeline'
- task: DiscordPublisher@1
inputs:
channelId: '$(wehook_id)'
webhookKey: '$(webhook_token)'
embeds: |
{
"embeds": [
{
"title": "Version $(tag)",
"url": "https://tincrayon.visualstudio.com/DeepWaters/_build/results?buildId=$(Build.BuildId)&view=artifacts&type=publishedArtifacts",
"description": "A new build was just created because of a push to the github.\nYou must install Minecraft 1.15.2 and all dependencies in order to run the mod.\n\n",
"color": 3120127,
"thumbnail": {
"url": "https://cdn.discordapp.com/icons/695117761956937779/4e5dde3ad1c8254fb27e8316cdc30a37.webp"
},
"fields": [
{
"name": "Dependencies:",
"value": "**Minecraft Forge** >= [31.0.0](https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.15.2.html)\n**Obfuscate Library** >= [0.4.2](https://www.curseforge.com/minecraft/mc-mods/obfuscate/files/2936616)"
}
]
}
]
}