├── .github └── workflows │ └── copyright-update.yml ├── .gitignore ├── LICENSE.txt ├── NOTICE ├── README.md └── playbooks ├── clone-fork.yml ├── clone-jhipster-projects.yml ├── documentation-archive-prepare.yml ├── documentation-archive-release.yml ├── generator-jhipster-prepare.yml ├── generator-jhipster-release.yml ├── jhcc-prepare.yml ├── jhcc-release.yml ├── jhipster-bom-prepare.yml ├── jhipster-bom-release.yml ├── react-jhipster-prepare.yml ├── react-jhipster-release.yml └── roles ├── clone-fork └── tasks │ └── main.yml ├── documentation-archive-prepare └── tasks │ └── main.yml ├── documentation-archive-release └── tasks │ └── main.yml ├── generator-jhipster-prepare └── tasks │ └── main.yml ├── generator-jhipster-release └── tasks │ └── main.yml ├── jhcc-prepare └── tasks │ └── main.yml ├── jhcc-release └── tasks │ └── main.yml ├── jhipster-bom-prepare └── tasks │ └── main.yml ├── jhipster-bom-release └── tasks │ └── main.yml ├── react-jhipster-prepare └── tasks │ └── main.yml └── react-jhipster-release └── tasks └── main.yml /.github/workflows/copyright-update.yml: -------------------------------------------------------------------------------- 1 | name: Copyright Update 2 | on: 3 | schedule: 4 | - cron: '0 0 31 12 *' # Repeats December 31st every year 5 | 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | build: 11 | permissions: 12 | contents: write # for peter-evans/create-pull-request to create branch 13 | pull-requests: write # for peter-evans/create-pull-request to create a PR 14 | name: copyright update 15 | if: github.repository == 'jhipster/jhipster-ansible' 16 | runs-on: ubuntu-latest 17 | timeout-minutes: 40 18 | steps: 19 | # Checkout 20 | - uses: actions/checkout@v3 21 | with: 22 | ref: main 23 | fetch-depth: 0 24 | # Update the copyright headers 25 | - name: Find and Replace 26 | run: | 27 | CURRENT_YEAR=$(date +'%Y') 28 | NEW_YEAR=$(($CURRENT_YEAR + 1)) 29 | grep -rlZE "Copyright ([0-9]+)-$CURRENT_YEAR" . | xargs -0 sed -i -E "s/Copyright ([0-9]+)-$CURRENT_YEAR/Copyright \1-$NEW_YEAR/g" 30 | # Create PR 31 | - name: Create Pull Request 32 | uses: peter-evans/create-pull-request@v4 33 | with: 34 | token: ${{ secrets.GITHUB_TOKEN }} 35 | commit-message: 'Update copyright headers' 36 | title: 'Update Copyright Headers' 37 | body: 'This is an automated pull request to update the copyright headers' 38 | branch: 'copyright-date-update' 39 | author: 'jhipster-bot ' 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | playbooks/roles/documentation-archive-prepare/docker/tmp 2 | /.idea/ 3 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright 2019-2025 the original author or authors from the JHipster project 3 | 4 | Apache License 5 | Version 2.0, January 2004 6 | http://www.apache.org/licenses/ 7 | 8 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 9 | 10 | 1. Definitions. 11 | 12 | "License" shall mean the terms and conditions for use, reproduction, 13 | and distribution as defined by Sections 1 through 9 of this document. 14 | 15 | "Licensor" shall mean the copyright owner or entity authorized by 16 | the copyright owner that is granting the License. 17 | 18 | "Legal Entity" shall mean the union of the acting entity and all 19 | other entities that control, are controlled by, or are under common 20 | control with that entity. For the purposes of this definition, 21 | "control" means (i) the power, direct or indirect, to cause the 22 | direction or management of such entity, whether by contract or 23 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 24 | outstanding shares, or (iii) beneficial ownership of such entity. 25 | 26 | "You" (or "Your") shall mean an individual or Legal Entity 27 | exercising permissions granted by this License. 28 | 29 | "Source" form shall mean the preferred form for making modifications, 30 | including but not limited to software source code, documentation 31 | source, and configuration files. 32 | 33 | "Object" form shall mean any form resulting from mechanical 34 | transformation or translation of a Source form, including but 35 | not limited to compiled object code, generated documentation, 36 | and conversions to other media types. 37 | 38 | "Work" shall mean the work of authorship, whether in Source or 39 | Object form, made available under the License, as indicated by a 40 | copyright notice that is included in or attached to the work 41 | (an example is provided in the Appendix below). 42 | 43 | "Derivative Works" shall mean any work, whether in Source or Object 44 | form, that is based on (or derived from) the Work and for which the 45 | editorial revisions, annotations, elaborations, or other modifications 46 | represent, as a whole, an original work of authorship. For the purposes 47 | of this License, Derivative Works shall not include works that remain 48 | separable from, or merely link (or bind by name) to the interfaces of, 49 | the Work and Derivative Works thereof. 50 | 51 | "Contribution" shall mean any work of authorship, including 52 | the original version of the Work and any modifications or additions 53 | to that Work or Derivative Works thereof, that is intentionally 54 | submitted to Licensor for inclusion in the Work by the copyright owner 55 | or by an individual or Legal Entity authorized to submit on behalf of 56 | the copyright owner. For the purposes of this definition, "submitted" 57 | means any form of electronic, verbal, or written communication sent 58 | to the Licensor or its representatives, including but not limited to 59 | communication on electronic mailing lists, source code control systems, 60 | and issue tracking systems that are managed by, or on behalf of, the 61 | Licensor for the purpose of discussing and improving the Work, but 62 | excluding communication that is conspicuously marked or otherwise 63 | designated in writing by the copyright owner as "Not a Contribution." 64 | 65 | "Contributor" shall mean Licensor and any individual or Legal Entity 66 | on behalf of whom a Contribution has been received by Licensor and 67 | subsequently incorporated within the Work. 68 | 69 | 2. Grant of Copyright License. Subject to the terms and conditions of 70 | this License, each Contributor hereby grants to You a perpetual, 71 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 72 | copyright license to reproduce, prepare Derivative Works of, 73 | publicly display, publicly perform, sublicense, and distribute the 74 | Work and such Derivative Works in Source or Object form. 75 | 76 | 3. Grant of Patent License. Subject to the terms and conditions of 77 | this License, each Contributor hereby grants to You a perpetual, 78 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 79 | (except as stated in this section) patent license to make, have made, 80 | use, offer to sell, sell, import, and otherwise transfer the Work, 81 | where such license applies only to those patent claims licensable 82 | by such Contributor that are necessarily infringed by their 83 | Contribution(s) alone or by combination of their Contribution(s) 84 | with the Work to which such Contribution(s) was submitted. If You 85 | institute patent litigation against any entity (including a 86 | cross-claim or counterclaim in a lawsuit) alleging that the Work 87 | or a Contribution incorporated within the Work constitutes direct 88 | or contributory patent infringement, then any patent licenses 89 | granted to You under this License for that Work shall terminate 90 | as of the date such litigation is filed. 91 | 92 | 4. Redistribution. You may reproduce and distribute copies of the 93 | Work or Derivative Works thereof in any medium, with or without 94 | modifications, and in Source or Object form, provided that You 95 | meet the following conditions: 96 | 97 | (a) You must give any other recipients of the Work or 98 | Derivative Works a copy of this License; and 99 | 100 | (b) You must cause any modified files to carry prominent notices 101 | stating that You changed the files; and 102 | 103 | (c) You must retain, in the Source form of any Derivative Works 104 | that You distribute, all copyright, patent, trademark, and 105 | attribution notices from the Source form of the Work, 106 | excluding those notices that do not pertain to any part of 107 | the Derivative Works; and 108 | 109 | (d) If the Work includes a "NOTICE" text file as part of its 110 | distribution, then any Derivative Works that You distribute must 111 | include a readable copy of the attribution notices contained 112 | within such NOTICE file, excluding those notices that do not 113 | pertain to any part of the Derivative Works, in at least one 114 | of the following places: within a NOTICE text file distributed 115 | as part of the Derivative Works; within the Source form or 116 | documentation, if provided along with the Derivative Works; or, 117 | within a display generated by the Derivative Works, if and 118 | wherever such third-party notices normally appear. The contents 119 | of the NOTICE file are for informational purposes only and 120 | do not modify the License. You may add Your own attribution 121 | notices within Derivative Works that You distribute, alongside 122 | or as an addendum to the NOTICE text from the Work, provided 123 | that such additional attribution notices cannot be construed 124 | as modifying the License. 125 | 126 | You may add Your own copyright statement to Your modifications and 127 | may provide additional or different license terms and conditions 128 | for use, reproduction, or distribution of Your modifications, or 129 | for any such Derivative Works as a whole, provided Your use, 130 | reproduction, and distribution of the Work otherwise complies with 131 | the conditions stated in this License. 132 | 133 | 5. Submission of Contributions. Unless You explicitly state otherwise, 134 | any Contribution intentionally submitted for inclusion in the Work 135 | by You to the Licensor shall be under the terms and conditions of 136 | this License, without any additional terms or conditions. 137 | Notwithstanding the above, nothing herein shall supersede or modify 138 | the terms of any separate license agreement you may have executed 139 | with Licensor regarding such Contributions. 140 | 141 | 6. Trademarks. This License does not grant permission to use the trade 142 | names, trademarks, service marks, or product names of the Licensor, 143 | except as required for reasonable and customary use in describing the 144 | origin of the Work and reproducing the content of the NOTICE file. 145 | 146 | 7. Disclaimer of Warranty. Unless required by applicable law or 147 | agreed to in writing, Licensor provides the Work (and each 148 | Contributor provides its Contributions) on an "AS IS" BASIS, 149 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 150 | implied, including, without limitation, any warranties or conditions 151 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 152 | PARTICULAR PURPOSE. You are solely responsible for determining the 153 | appropriateness of using or redistributing the Work and assume any 154 | risks associated with Your exercise of permissions under this License. 155 | 156 | 8. Limitation of Liability. In no event and under no legal theory, 157 | whether in tort (including negligence), contract, or otherwise, 158 | unless required by applicable law (such as deliberate and grossly 159 | negligent acts) or agreed to in writing, shall any Contributor be 160 | liable to You for damages, including any direct, indirect, special, 161 | incidental, or consequential damages of any character arising as a 162 | result of this License or out of the use or inability to use the 163 | Work (including but not limited to damages for loss of goodwill, 164 | work stoppage, computer failure or malfunction, or any and all 165 | other commercial damages or losses), even if such Contributor 166 | has been advised of the possibility of such damages. 167 | 168 | 9. Accepting Warranty or Additional Liability. While redistributing 169 | the Work or Derivative Works thereof, You may choose to offer, 170 | and charge a fee for, acceptance of support, warranty, indemnity, 171 | or other liability obligations and/or rights consistent with this 172 | License. However, in accepting such obligations, You may act only 173 | on Your own behalf and on Your sole responsibility, not on behalf 174 | of any other Contributor, and only if You agree to indemnify, 175 | defend, and hold each Contributor harmless for any liability 176 | incurred by, or claims asserted against, such Contributor by reason 177 | of your accepting any such warranty or additional liability. 178 | 179 | END OF TERMS AND CONDITIONS 180 | 181 | APPENDIX: How to apply the Apache License to your work. 182 | 183 | To apply the Apache License to your work, attach the following 184 | boilerplate notice, with the fields enclosed by brackets "[]" 185 | replaced with your own identifying information. (Don't include 186 | the brackets!) The text should be enclosed in the appropriate 187 | comment syntax for the file format. We also recommend that a 188 | file or class name and description of purpose be included on the 189 | same "printed page" as the copyright notice for easier 190 | identification within third-party archives. 191 | 192 | Copyright [yyyy] [name of copyright owner] 193 | 194 | Licensed under the Apache License, Version 2.0 (the "License"); 195 | you may not use this file except in compliance with the License. 196 | You may obtain a copy of the License at 197 | 198 | https://www.apache.org/licenses/LICENSE-2.0 199 | 200 | Unless required by applicable law or agreed to in writing, software 201 | distributed under the License is distributed on an "AS IS" BASIS, 202 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 203 | See the License for the specific language governing permissions and 204 | limitations under the License. 205 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | JHipster 2 | Copyright 2019-2025 the original author or authors from the JHipster project. 3 | 4 | For more information on the JHipster project, see https://www.jhipster.tech/ 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JHipster Ansible 2 | 3 | ## Prerequisites 4 | 5 | ### Ansible 6 | 7 | You have to install Ansible: 8 | 9 | ``` 10 | sudo apt-add-repository -y ppa:ansible/ansible && \ 11 | sudo apt-get update && \ 12 | sudo apt-get install -y ansible 13 | ``` 14 | 15 | Or, if you prefer Homebrew: 16 | 17 | ``` 18 | brew install ansible 19 | ``` 20 | 21 | ### Projects 22 | 23 | Before cloning a project, be sure you already forked it, under GitHub. 24 | Then, all projects are cloned with: 25 | - `origin`: your fork 26 | - `upstream`: the original project 27 | 28 | 29 | ## Roles for cloning project 30 | 31 | ### Clone single repository 32 | 33 | ``` 34 | ansible-playbook -v playbooks/clone-fork.yml 35 | ``` 36 | 37 | ### Clone JHipster projects 38 | 39 | ``` 40 | ansible-playbook -v playbooks/clone-jhipster-projects.yml 41 | ``` 42 | 43 | 44 | ## Roles for Releases 45 | 46 | ### jhipster-bom 47 | 48 | To prepare locally the release: 49 | 50 | ``` 51 | ansible-playbook -v playbooks/jhipster-bom-prepare.yml 52 | ``` 53 | 54 | To publish the release: 55 | 56 | ``` 57 | ansible-playbook -v playbooks/jhipster-bom-release.yml 58 | ``` 59 | 60 | 61 | ### react-jhipster 62 | 63 | To prepare locally the release: 64 | 65 | ``` 66 | ansible-playbook -v playbooks/react-jhipster-prepare.yml 67 | ``` 68 | 69 | To publish the release: 70 | 71 | ``` 72 | ansible-playbook -v playbooks/react-jhipster-release.yml 73 | ``` 74 | 75 | 76 | ### generator-jhipster 77 | 78 | To prepare locally the release: 79 | 80 | ``` 81 | ansible-playbook -v playbooks/generator-jhipster-prepare.yml 82 | ``` 83 | 84 | To publish the release: 85 | 86 | ``` 87 | ansible-playbook -v playbooks/generator-jhipster-release.yml 88 | ``` 89 | 90 | ### documentation-archive 91 | 92 | To prepare locally the release: 93 | 94 | ``` 95 | ansible-playbook -v playbooks/documentation-archive-prepare.yml 96 | ``` 97 | 98 | To publish the release: 99 | 100 | ``` 101 | ansible-playbook -v playbooks/documentation-archive-release.yml 102 | ``` 103 | 104 | 105 | ### jhipster-control-center 106 | 107 | To prepare locally the release: 108 | 109 | ``` 110 | ansible-playbook -v playbooks/jhcc-prepare.yml 111 | ``` 112 | 113 | To publish the release: 114 | 115 | ``` 116 | ansible-playbook -v playbooks/jhcc-release.yml 117 | ``` 118 | -------------------------------------------------------------------------------- /playbooks/clone-fork.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: clone-fork } 5 | vars_prompt: 6 | - name: github_baseurl 7 | prompt: 'What is your GitHub base URL ?' 8 | default: 'git@github.com:' 9 | private: no 10 | - name: github_username 11 | prompt: 'What is your GitHub username ?' 12 | default: 'jhipster' 13 | private: no 14 | - name: github_upstream 15 | prompt: 'What is the GitHub upstream ?' 16 | private: no 17 | - name: github_repository 18 | prompt: 'Which repository you want to clone ?' 19 | private: no 20 | - name: github_folder 21 | prompt: 'Where do you want to clone the project ?' 22 | default: '~/projects/github/' 23 | private: no 24 | -------------------------------------------------------------------------------- /playbooks/clone-jhipster-projects.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'generator-jhipster' } 5 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'jhipster.github.io' } 6 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'documentation-archive' } 7 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'jhipster' } 8 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'jhipster-core' } 9 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'react-jhipster' } 10 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'jhipster-registry' } 11 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'jhipster-online' } 12 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'jhipster-kotlin' } 13 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'generator-jhipster-blueprint' } 14 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'generator-jhipster-module' } 15 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'jhipster-devbox' } 16 | - { role: clone-fork, github_upstream: 'jhipster', github_repository: 'jdl-samples' } 17 | vars_prompt: 18 | - name: github_baseurl 19 | prompt: 'What is your GitHub base URL ?' 20 | default: 'git@github.com:' 21 | private: no 22 | - name: github_username 23 | prompt: 'What is your GitHub username ?' 24 | default: 'jhipster' 25 | private: no 26 | - name: github_folder 27 | prompt: 'Where do you want to clone all the JHipster projects ?' 28 | default: '~/projects/github/jhipster/' 29 | private: no 30 | -------------------------------------------------------------------------------- /playbooks/documentation-archive-prepare.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: documentation-archive-prepare } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: release_version 11 | prompt: 'Choose your release version (ex: X.Y.Z, without v)' 12 | private: no 13 | -------------------------------------------------------------------------------- /playbooks/documentation-archive-release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: documentation-archive-release } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | -------------------------------------------------------------------------------- /playbooks/generator-jhipster-prepare.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: generator-jhipster-prepare, github_repository: 'generator-jhipster' } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: release_type 11 | prompt: 'What type of release do you want ? (patch / minor / major)' 12 | private: no 13 | -------------------------------------------------------------------------------- /playbooks/generator-jhipster-release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: generator-jhipster-release, github_repository: 'generator-jhipster' } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: release_version 11 | prompt: 'What is the version of the release ?' 12 | default: 'vX.X.X' 13 | private: no 14 | - name: npm_otp 15 | prompt: 'Enter one-time password from your authenticator app' 16 | private: no 17 | -------------------------------------------------------------------------------- /playbooks/jhcc-prepare.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: jhcc-prepare, github_repository: 'jhipster-control-center' } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: release_version 11 | prompt: 'Choose your release version (ex: X.Y.Z, without v)' 12 | private: no 13 | - name: next_version 14 | prompt: 'Choose your next version (ex: X.Y.Z-SNAPSHOT)' 15 | private: no 16 | -------------------------------------------------------------------------------- /playbooks/jhcc-release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: jhcc-release, github_repository: 'jhipster-control-center' } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: release_version 11 | prompt: 'Choose your release version (ex: X.Y.Z, without v)' 12 | private: no 13 | -------------------------------------------------------------------------------- /playbooks/jhipster-bom-prepare.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: jhipster-bom-prepare, github_repository: 'jhipster-bom' } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: release_version 11 | prompt: 'Choose your release version (ex: X.Y.Z, without v)' 12 | private: no 13 | - name: next_version 14 | prompt: 'Choose your next version (ex: X.Y.Z-SNAPSHOT)' 15 | private: no 16 | -------------------------------------------------------------------------------- /playbooks/jhipster-bom-release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: jhipster-bom-release, github_repository: 'jhipster-bom' } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: release_version 11 | prompt: 'Choose your release version (ex: X.Y.Z, without v)' 12 | private: no 13 | -------------------------------------------------------------------------------- /playbooks/react-jhipster-prepare.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: react-jhipster-prepare, github_repository: 'react-jhipster' } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project **react-jhipster** ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: release_type 11 | prompt: 'What type of release do you want ? (patch / minor / major)' 12 | private: no 13 | -------------------------------------------------------------------------------- /playbooks/react-jhipster-release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | roles: 4 | - { role: react-jhipster-release, github_repository: 'react-jhipster' } 5 | vars_prompt: 6 | - name: github_folder 7 | prompt: 'In which folder is the project **react-jhipster** ?' 8 | default: '~/projects/jhipster/' 9 | private: no 10 | - name: npm_otp 11 | prompt: 'Enter one-time password from your authenticator app' 12 | private: no 13 | -------------------------------------------------------------------------------- /playbooks/roles/clone-fork/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create {{github_folder}} folder 3 | file: 4 | path: '{{github_folder}}' 5 | state: directory 6 | 7 | - name: Clone {{github_baseurl}}{{github_username}}/{{github_repository}}.git 8 | git: 9 | repo: '{{github_baseurl}}{{github_username}}/{{github_repository}}.git' 10 | dest: '{{github_folder}}/{{github_repository}}' 11 | clone: yes 12 | accept_hostkey: yes 13 | update: yes 14 | 15 | - name: Set upstream to {{github_baseurl}}{{github_upstream}}/{{github_repository}}.git 16 | shell: git remote add upstream {{github_baseurl}}{{github_upstream}}/{{github_repository}}.git 17 | args: 18 | chdir: '{{github_folder}}/{{github_repository}}' 19 | ignore_errors: yes 20 | 21 | - name: Config for having pull requests locally 22 | lineinfile: 23 | path: '{{github_folder}}/{{github_repository}}/.git/config' 24 | regexp: '^ fetch = \+refs/pull/\*/head:refs/remotes/upstream/pr/\*' 25 | insertafter: '^ fetch = +refs/heads/*:refs/remotes/upstream/*' 26 | line: ' fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*' 27 | 28 | - name: Fetch upstream and rebase 29 | shell: git checkout main && git fetch upstream && git rebase upstream/main 30 | args: 31 | chdir: '{{github_folder}}/{{github_repository}}' 32 | ignore_errors: yes 33 | -------------------------------------------------------------------------------- /playbooks/roles/documentation-archive-prepare/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Update with upstream 3 | - name: "Fetch upstream and rebase" 4 | shell: git checkout gh-pages && git fetch upstream && git rebase upstream/gh-pages 5 | args: 6 | chdir: "{{ github_folder }}/documentation-archive" 7 | ignore_errors: false 8 | 9 | - name: "Change version to {{ release_version }}" 10 | shell: git checkout v{{ release_version }} 11 | args: 12 | chdir: "{{ github_folder }}/jhipster.github.io/" 13 | 14 | - name: "Install dependencies for website" 15 | shell: npm i 16 | args: 17 | chdir: "{{ github_folder }}/jhipster.github.io/" 18 | 19 | - name: "Cleanup previous website build if exists" 20 | shell: npm run clear 21 | args: 22 | chdir: "{{ github_folder }}/jhipster.github.io/" 23 | 24 | - name: "Build website for archive" 25 | shell: SITE_BASE_URL=/documentation-archive/v{{ release_version }}/ IS_DOCS_ARCHIVE=true npm run build 26 | args: 27 | chdir: "{{ github_folder }}/jhipster.github.io/" 28 | 29 | - name: "Cleanup previous website archive with same version if exists" 30 | shell: rm -rf {{ github_folder }}/documentation-archive/v{{ release_version }} 31 | args: 32 | chdir: "{{ github_folder }}/documentation-archive/" 33 | 34 | - name: "Copy the documentation archive" 35 | shell: cp -R ./build {{ github_folder }}/documentation-archive/v{{ release_version }} 36 | args: 37 | chdir: "{{ github_folder }}/jhipster.github.io/" 38 | 39 | - name: "Switch back to main branch" 40 | shell: git checkout main && git checkout -- . && git clean -fd 41 | args: 42 | chdir: "{{ github_folder }}/jhipster.github.io/" 43 | 44 | - name: "Insert/Update version in index.html" 45 | lineinfile: 46 | path: "{{ github_folder }}/documentation-archive/index.html" 47 | regexp: '
  • v{{ release_version }}/
  • ' 48 | insertbefore: "" 49 | line: '
  • v{{ release_version }}/
  • ' 50 | 51 | - name: "Commit Release {{ release_version }}" 52 | shell: git add . && git commit -m 'Release v{{ release_version }}' 53 | args: 54 | chdir: "{{ github_folder }}/documentation-archive/" 55 | -------------------------------------------------------------------------------- /playbooks/roles/documentation-archive-release/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Push 3 | shell: git push upstream gh-pages 4 | args: 5 | chdir: "{{ github_folder }}/documentation-archive" 6 | -------------------------------------------------------------------------------- /playbooks/roles/generator-jhipster-prepare/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Update with upstream 4 | - name: Fetch upstream and rebase 5 | shell: git checkout main && git fetch upstream && git rebase upstream/main 6 | args: 7 | chdir: '{{github_folder}}/{{github_repository}}' 8 | ignore_errors: no 9 | 10 | # Release 11 | - name: Install node_modules 12 | shell: npm ci 13 | args: 14 | chdir: '{{github_folder}}/{{github_repository}}' 15 | 16 | # Release 17 | - name: Release {{release_type}} 18 | shell: npm version {{release_type}} -a -m 'Release v%s' 19 | args: 20 | chdir: '{{github_folder}}/{{github_repository}}' 21 | -------------------------------------------------------------------------------- /playbooks/roles/generator-jhipster-release/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Publish 4 | - name: 'NPM: publish to NPM' 5 | shell: npm publish --otp {{npm_otp}} 6 | args: 7 | chdir: '{{github_folder}}/{{github_repository}}' 8 | 9 | # Push to GitHub 10 | - name: 'GitHub: push tag' 11 | shell: git push upstream {{release_version}} 12 | args: 13 | chdir: '{{github_folder}}/{{github_repository}}' 14 | 15 | - name: 'GitHub: push to main' 16 | shell: git checkout main && git push upstream main 17 | args: 18 | chdir: '{{github_folder}}/{{github_repository}}' 19 | -------------------------------------------------------------------------------- /playbooks/roles/jhcc-prepare/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # update GitHub project 3 | - name: 'Local: git checkout main' 4 | shell: git checkout main 5 | args: 6 | chdir: '{{github_folder}}/{{github_repository}}' 7 | ignore_errors: no 8 | - name: 'Local: git fetch upstream' 9 | shell: git fetch upstream 10 | args: 11 | chdir: '{{github_folder}}/{{github_repository}}' 12 | ignore_errors: no 13 | - name: 'Local: git rebase upstream/main' 14 | shell: git rebase upstream/main 15 | args: 16 | chdir: '{{github_folder}}/{{github_repository}}' 17 | ignore_errors: no 18 | 19 | # Prepare the release 20 | - name: Change version to {{release_version}} 21 | shell: ./jhipster-version.sh {{release_version}} 22 | args: 23 | chdir: '{{github_folder}}/{{github_repository}}' 24 | 25 | - name: Packaging 26 | shell: ./mvnw clean verify -Pprod 27 | args: 28 | chdir: '{{github_folder}}/{{github_repository}}' 29 | 30 | - name: Commit Release {{release_version}} 31 | shell: git add . && git commit -m 'Release v{{release_version}}' 32 | args: 33 | chdir: '{{github_folder}}/{{github_repository}}' 34 | 35 | - name: Create jhipster tag {{release_version}} 36 | shell: git tag -a v{{release_version}} -m 'Release v{{release_version}}' 37 | args: 38 | chdir: '{{github_folder}}/{{github_repository}}' 39 | 40 | # Change version for development 41 | - name: Change version to {{next_version}} 42 | shell: ./jhipster-version.sh {{next_version}} 43 | args: 44 | chdir: '{{github_folder}}/{{github_repository}}' 45 | - name: Commit Release {{next_version}} 46 | shell: git add . && git commit -m 'Change version for development v{{next_version}}' 47 | args: 48 | chdir: '{{github_folder}}/{{github_repository}}' 49 | -------------------------------------------------------------------------------- /playbooks/roles/jhcc-release/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Push 4 | shell: git push upstream v{{release_version}} 5 | args: 6 | chdir: '{{github_folder}}/{{github_repository}}' 7 | 8 | - name: Push 9 | shell: git checkout main && git push upstream main 10 | args: 11 | chdir: '{{github_folder}}/{{github_repository}}' 12 | -------------------------------------------------------------------------------- /playbooks/roles/jhipster-bom-prepare/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # update GitHub project 3 | - name: 'Local: git checkout main' 4 | shell: git checkout main 5 | args: 6 | chdir: '{{github_folder}}/{{github_repository}}' 7 | ignore_errors: no 8 | - name: 'Local: git fetch upstream' 9 | shell: git fetch upstream 10 | args: 11 | chdir: '{{github_folder}}/{{github_repository}}' 12 | ignore_errors: no 13 | - name: 'Local: git rebase upstream/main' 14 | shell: git rebase upstream/main 15 | args: 16 | chdir: '{{github_folder}}/{{github_repository}}' 17 | ignore_errors: no 18 | 19 | # Prepare the release 20 | - name: Change version to {{release_version}} 21 | shell: ./jhipster-version.sh {{release_version}} 22 | args: 23 | chdir: '{{github_folder}}/{{github_repository}}' 24 | 25 | - name: Clean install 26 | shell: ./mvnw clean install -Dgpg.skip 27 | args: 28 | chdir: '{{github_folder}}/{{github_repository}}' 29 | 30 | - name: Commit Release {{release_version}} 31 | shell: git add . && git commit -m 'Release {{release_version}}' 32 | args: 33 | chdir: '{{github_folder}}/{{github_repository}}' 34 | 35 | - name: Create jhipster tag {{release_version}} 36 | shell: git tag -a {{release_version}} -m 'Release {{release_version}}' 37 | args: 38 | chdir: '{{github_folder}}/{{github_repository}}' 39 | 40 | # Change version for development 41 | - name: Change version to {{next_version}} 42 | shell: ./jhipster-version.sh {{next_version}} 43 | args: 44 | chdir: '{{github_folder}}/{{github_repository}}' 45 | - name: Commit Release {{next_version}} 46 | shell: git add . && git commit -m 'Change version for development {{next_version}}' 47 | args: 48 | chdir: '{{github_folder}}/{{github_repository}}' 49 | -------------------------------------------------------------------------------- /playbooks/roles/jhipster-bom-release/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Change version to {{release_version}} 4 | shell: git checkout {{release_version}} 5 | args: 6 | chdir: '{{github_folder}}/{{github_repository}}' 7 | 8 | # Deployment to Maven Central 9 | 10 | - name: Save current settings.xml if exists 11 | shell: mv settings.xml save.settings.xml 12 | args: 13 | chdir: '~/.m2/' 14 | ignore_errors: yes 15 | 16 | - name: Put the correct settings.xml 17 | shell: cp jhipster.settings.xml settings.xml 18 | args: 19 | chdir: '~/.m2/' 20 | 21 | - name: Build locally with GPG key 22 | shell: ./mvnw clean install 23 | args: 24 | chdir: '{{github_folder}}/{{github_repository}}' 25 | 26 | - name: Deploy to Maven Central 27 | shell: ./mvnw deploy 28 | args: 29 | chdir: '{{github_folder}}/{{github_repository}}' 30 | 31 | - name: Remove current settings.xml 32 | shell: rm settings.xml 33 | args: 34 | chdir: '~/.m2/' 35 | ignore_errors: yes 36 | 37 | - name: Put back the previous settings.xml 38 | shell: mv save.settings.xml settings.xml 39 | args: 40 | chdir: '~/.m2/' 41 | ignore_errors: yes 42 | 43 | - name: Push 44 | shell: git push upstream {{release_version}} 45 | args: 46 | chdir: '{{github_folder}}/{{github_repository}}' 47 | 48 | # Change version for development 49 | 50 | - name: Push 51 | shell: git checkout main && git push upstream main 52 | args: 53 | chdir: '{{github_folder}}/{{github_repository}}' 54 | -------------------------------------------------------------------------------- /playbooks/roles/react-jhipster-prepare/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # update GitHub project 3 | - name: 'Local: git checkout main' 4 | shell: git checkout main 5 | args: 6 | chdir: '{{github_folder}}/{{github_repository}}' 7 | ignore_errors: no 8 | - name: 'Local: git fetch upstream' 9 | shell: git fetch upstream 10 | args: 11 | chdir: '{{github_folder}}/{{github_repository}}' 12 | ignore_errors: no 13 | - name: 'Local: git rebase upstream/main' 14 | shell: git rebase upstream/main 15 | args: 16 | chdir: '{{github_folder}}/{{github_repository}}' 17 | ignore_errors: no 18 | 19 | # Install node_modules 20 | - name: Install node_modules 21 | shell: npm ci 22 | args: 23 | chdir: '{{github_folder}}/{{github_repository}}' 24 | 25 | # Prepare the release 26 | - name: npm run build 27 | shell: npm run build 28 | args: 29 | chdir: '{{github_folder}}/{{github_repository}}' 30 | - name: Release {{release_type}} 31 | shell: npm version {{release_type}} -a -m 'Release v%s' 32 | args: 33 | chdir: '{{github_folder}}/{{github_repository}}' 34 | - name: Run test 35 | shell: npm test 36 | args: 37 | chdir: '{{github_folder}}/{{github_repository}}' 38 | -------------------------------------------------------------------------------- /playbooks/roles/react-jhipster-release/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Launch the release 3 | - name: 'NPM: publish' 4 | shell: npm publish --otp {{npm_otp}} 5 | args: 6 | chdir: '{{github_folder}}/{{github_repository}}' 7 | 8 | # Push tag 9 | - name: 'GitHub: push tags' 10 | shell: git push upstream --tags 11 | args: 12 | chdir: '{{github_folder}}/{{github_repository}}' 13 | 14 | # Push to main 15 | - name: 'GitHub: push to main' 16 | shell: git checkout main && git push upstream main 17 | args: 18 | chdir: '{{github_folder}}/{{github_repository}}' 19 | --------------------------------------------------------------------------------