Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 19564dc

Browse files
committed
Removed Ansible uri workarounds from release playbook
1 parent c176752 commit 19564dc

File tree

1 file changed

+28
-38
lines changed

1 file changed

+28
-38
lines changed

‎release.yml‎

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,85 +9,72 @@
99
- hosts: localhost
1010
connection: local
1111
vars_files:
12-
12+
1313
- release_vars.yml
14-
14+
1515
vars_prompt:
16-
16+
1717
- name: "release_version"
1818
prompt: "Release version"
1919
private: no
20-
20+
2121
- name: "release_description"
2222
prompt: "Description"
2323
private: no
24-
24+
2525
vars:
26-
27-
# TODO These body objects can be moved into the uri tasks, once this issue is resolved:
28-
# https://github.com/ansible/ansible-modules-core/issues/265
29-
#
30-
create_version_body:
31-
name: "{{ release_version }}"
32-
desc: "{{ release_description }}"
33-
github_release_notes_file: "CHANGELOG.md"
34-
github_use_tag_release_notes: True
35-
vcs_tag: "java-object-diff-{{ release_version }}"
36-
_hack: null # an extra key with null value, which fails `utils.safe_eval`
37-
38-
maven_central_sync_body:
39-
username: "{{ sonatype.user }}"
40-
password: "{{ sonatype.token }}"
41-
close: "1"
42-
_hack: null # an extra key with null value, which fails `utils.safe_eval`
43-
4426
files_with_version_reference:
4527
- "README.md"
4628
- "docs/maven.md"
47-
29+
4830
tasks:
49-
31+
5032
# TODO The versions could be easily updated via Ansible; changelog warning may be removed
5133
- pause:
5234
prompt: Make sure the changelog is up-to-date (Press ENTER to continue)
53-
35+
5436
- name: replace maven version in readme and docs
5537
replace:
5638
dest: "{{ item }}"
5739
regexp: '<version>[0-9\.]+</version>'
5840
replace: "<version>{{ release_version }}</version>"
5941
with_items: files_with_version_reference
60-
42+
6143
- name: replace gradle version in readme and docs
6244
replace:
6345
dest: "{{ item }}"
6446
regexp: 'de.danielbechler:java-object-diff:[0-9\.]+'
6547
replace: "de.danielbechler:java-object-diff:{{ release_version }}"
6648
with_items: files_with_version_reference
67-
49+
6850
# TODO: I'm not quite sure if the changes above need to be commited before performing a mvn release
6951
# Guess I'll find out with the next release...
70-
52+
7153
# TODO Automate via command or shell module
7254
- pause:
7355
prompt: Perform mvn release:prepare (Press ENTER to continue)
74-
56+
7557
- name: create new version on bintray
7658
uri:
7759
url: "https://api.bintray.com/packages/sqisher/maven/java-object-diff/versions"
7860
method: POST
7961
user: "{{ bintray.user }}"
8062
password: "{{ bintray.password }}"
8163
force_basic_auth: yes
82-
"HEADER_Content-Type": "application/json"
83-
body: "{{ create_version_body | to_json }}"
64+
body:
65+
name: "{{ release_version }}"
66+
desc: "{{ release_description }}"
67+
github_release_notes_file: "CHANGELOG.md"
68+
github_use_tag_release_notes: True
69+
vcs_tag: "java-object-diff-{{ release_version }}"
70+
body_format: json
8471
timeout: 120
8572
status_code: 201
86-
73+
8774
# TODO Automate via command or shell module
8875
- pause:
8976
prompt: Perform mvn release:perform (Press ENTER to continue)
90-
77+
9178
- name: sign version artifacts
9279
uri:
9380
url: "https://api.bintray.com/gpg/sqisher/maven/java-object-diff/versions/{{ release_version }}"
@@ -96,22 +83,25 @@
9683
password: "{{ bintray.password }}"
9784
force_basic_auth: yes
9885
"HEADER_X-GPG-PASSPHRASE": "{{ gpg.passphrase }}"
99-
86+
10087
- name: publish artifacts
10188
uri:
10289
url: "https://api.bintray.com/content/sqisher/maven/java-object-diff/{{ release_version }}/publish"
10390
method: POST
10491
user: "{{ bintray.user }}"
10592
password: "{{ bintray.password }}"
10693
force_basic_auth: yes
107-
94+
10895
- name: sync to maven central
10996
uri:
11097
url: "https://api.bintray.com/maven_central_sync/sqisher/maven/java-object-diff/versions/{{ release_version }}"
11198
method: POST
11299
user: "{{ bintray.user }}"
113100
password: "{{ bintray.password }}"
114101
force_basic_auth: yes
115-
"HEADER_Content-Type": "application/json"
116-
body: "{{ maven_central_sync_body | to_json }}"
102+
body_format: json
103+
body:
104+
username: "{{ sonatype.user }}"
105+
password: "{{ sonatype.token }}"
106+
close: "1"
117107
timeout: 120

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /