2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2019 The Nordix Foundation. All rights reserved.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
20 # NOTE (fdegir): ansible-lint complains due to using command module for
21 # getting git sha and it is suppressed since it is not possible to get
22 # sha using ansible git module
23 - name: Fetch commit shas of repos
24 command: git rev-parse HEAD # noqa 303
33 chdir: "/tmp/autorelease/git/{{ item }}"
36 - name: Populate dictionary to map repos to shas
38 repos_shas: "{{ repos_shas|default({}) | combine( {item.item | upper | replace('-', '_') + '_SHA': item.stdout} ) }}"
39 with_items: "{{ commit_shas.results }}"
41 - name: Log repos and shas to console
43 msg: "{{ item.key }}={{ item.value }}"
44 with_dict: "{{ repos_shas }}"
46 - name: Record git SHAs to /tmp/release.properties file
48 path: /tmp/release.properties
51 line: "{{ item.key }}={{ item.value }}"
52 with_dict: "{{ repos_shas }}"
54 - name: Copy /tmp/release.properties into offline package
56 src: /tmp/release.properties
57 dest: "{{ offline_pkg_folder }}/release.properties"
60 # vim: set ts=2 sw=2 expandtab: