mirror of
https://github.com/thegeeklab/wp-ansible.git
synced 2024-11-21 23:50:40 +00:00
add release step
This commit is contained in:
parent
0656f5ac4a
commit
5bfb3318cb
45
.drone.star
45
.drone.star
@ -7,7 +7,7 @@ def main(ctx):
|
|||||||
linux(ctx, "arm"),
|
linux(ctx, "arm"),
|
||||||
]
|
]
|
||||||
|
|
||||||
after = manifest(ctx) + notification(ctx)
|
after = manifest(ctx) + release(ctx) + notification(ctx)
|
||||||
|
|
||||||
for b in before:
|
for b in before:
|
||||||
for s in stages:
|
for s in stages:
|
||||||
@ -206,6 +206,35 @@ def manifest(ctx):
|
|||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
def release(ctx):
|
||||||
|
return [{
|
||||||
|
"kind": "pipeline",
|
||||||
|
"type": "docker",
|
||||||
|
"name": "release",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"name": "release",
|
||||||
|
"image": "plugins/github-release",
|
||||||
|
"settings": {
|
||||||
|
"api_key": {
|
||||||
|
"from_secret": "github_token",
|
||||||
|
},
|
||||||
|
"note": "CHANGELOG.md",
|
||||||
|
"overwrite": True,
|
||||||
|
"title": ctx.build.ref.replace("refs/tags/", ""),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"depends_on": [
|
||||||
|
"manifest",
|
||||||
|
],
|
||||||
|
"trigger": {
|
||||||
|
"ref": [
|
||||||
|
"refs/tags/**",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
|
||||||
def notification(ctx):
|
def notification(ctx):
|
||||||
return [{
|
return [{
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
@ -216,18 +245,18 @@ def notification(ctx):
|
|||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
'name': 'notify',
|
"name": "notify",
|
||||||
'image': 'plugins/slack',
|
"image": "plugins/slack",
|
||||||
'settings': {
|
"settings": {
|
||||||
'webhook': {
|
"webhook": {
|
||||||
'from_secret': 'private_rocketchat',
|
"from_secret": "private_rocketchat",
|
||||||
},
|
},
|
||||||
'channel': 'builds',
|
"channel": "builds",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"depends_on": [
|
"depends_on": [
|
||||||
"manifest",
|
"release",
|
||||||
],
|
],
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"ref": [
|
"ref": [
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ release/
|
|||||||
|
|
||||||
coverage.out
|
coverage.out
|
||||||
drone-ansible
|
drone-ansible
|
||||||
|
.drone.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user