From d4dc7cbc213f1fbb0e20ad08c571dfc2f8c22e68 Mon Sep 17 00:00:00 2001 From: donsizemore Date: Wed, 19 Sep 2018 14:15:18 -0400 Subject: [PATCH] assign branch name to build.number --- site.yml | 8 ++++++++ tasks/dataverse-build.yml | 8 +++++++- tests/group_vars/vagrant.yml | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 site.yml diff --git a/site.yml b/site.yml new file mode 100644 index 00000000..54bdcc06 --- /dev/null +++ b/site.yml @@ -0,0 +1,8 @@ +--- +# dataverse.pb + +- name: Install Dataverse + hosts: dataverse + become: true + roles: + - role: dataverse diff --git a/tasks/dataverse-build.yml b/tasks/dataverse-build.yml index f1b2f13d..292468f8 100644 --- a/tasks/dataverse-build.yml +++ b/tasks/dataverse-build.yml @@ -40,6 +40,12 @@ - "{{ dataverse.srcdir }}/conf/jhove/jhove.conf" - "{{ dataverse.srcdir }}/conf/jhove/jhoveConfig.xsd" +- name: add branch name to Build.number + lineinfile: + path: "{{ dataverse.srcdir }}/src/main/java/BuildNumber.properties" + line: "build.number={{ dataverse.git.branch }}" + create: yes + - name: build warfile. tail /tmp/dataverse/mvn.out for gory details. shell: "mvn -Dmaven.test.skip=true package > mvn.out" args: @@ -48,6 +54,6 @@ - name: copy warfile over release copy: src: "{{ dataverse.srcdir }}/target/dataverse-{{ dataverse.version }}.war" - dest: "/tmp/dvinstall/dataverse-{{ dataverse.version }}.war" + dest: "/tmp/dvinstall/dataverse.war" backup: yes remote_src: yes diff --git a/tests/group_vars/vagrant.yml b/tests/group_vars/vagrant.yml index 0fe72f71..acf2d66c 100644 --- a/tests/group_vars/vagrant.yml +++ b/tests/group_vars/vagrant.yml @@ -23,7 +23,7 @@ dataverse: provider: EZID filesdir: /usr/local/dvn/data git: - branch: develop + branch: repo: https://github.com/IQSS/dataverse.git glassfish: user: glassfish