MOVED TO: https://hackmd.io/9ZezLZshR2OE65JD9YcjYg
Repository | Code src | Usage | Where |
---|---|---|---|
openstack/tripleo-ci | roles/build-containers | Retrieve the hash to build containers | container build jobs (check/periodic) |
openstack/tripleo-ci | emit_releases_file.py |
Image Not Showing
Possible Reasons
|
Image Not Showing
Possible Reasons
|
openstack/tripleo-quickstart | roles/repo-setup | retrieve hash to set repo up |
Image Not Showing
Possible Reasons
|
rdo-infra/ci-config | roles/get-hash | get hash for component/integration pipelines | centos8 & component jobs |
rdo-infra/review.rdoproject.org-config | get-hash.sh | old/deprecated get-hash script | (must be) replaced by get-hash role in ci-config |
rdo-infra/ci-config | promoter code | promoter bits that get dlrn hash? | promoter code |
There are many different get-hash code functions spread across tripleo projects/repos w/ their respective unique ways of getting the hash from dlrn api. All these bits must be consolidated in one single code.
Some bits in bash are hard to test, or even untestable.
Some of these methods are no longer used and should be removed from the code base.
Once you get dlrnapi_client installed in the virtualenv, you can use dlrn_api ansible module like in the example here. You may also import the python module dlrnapi_client, which comes from the same pip packages installed.
Tested example:
- name: check reported results
hosts: localhost
vars:
dlrnapi_user: <obfuscated>
dlrnapi_pass: <obfuscated>
dlrn_server_url: https://trunk.rdoproject.org/api-centos8-master-uc
get_hash:
commit_hash: 364d07fa857eb87caa6717f4d063dc84e5e2842a
distro_hash: f6f9a73b2565b441813c54aa1e44730f9bde9c2e
tasks:
- pip:
name: dlrnapi_client
- command: "{{ ansible_python_interpreter }} -c 'import dlrnapi_client'"
- dlrn_api:
action: repo-status
host: "{{ dlrn_server_url }}"
user: "{{ dlrnapi_user }}"
password: "{{ dlrnapi_pass }}"
job_id: "{{ item }}"
commit_hash: "{{ get_hash.commit_hash }}"
distro_hash: "{{ get_hash.distro_hash }}"
success: true
notes: 'Tested from ansible'
register: dlrnout
with_items:
- periodic-tripleo-ci-centos-8-standalone
- debug:
var: dlrnout
Note: This works pretty well on py3
The bits that interact with dlrn api (like check_dlrn_reports
task and promote-hash
role) are written in bash and should be replaced w/ python/ansible modules. These are not directly related to get-hash
code.
Even w/ the new role, the code that interacts w/ dlrnapi is a bash script. And it sources files w/ env vars. This is how hash_info files are created and sourced in the get-hash role.
Another piece of code that is in bash and must be converted to ansible is the promote-hash role in config repo.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing