codegenerator/zuul.d/rust.yaml
Artem Goncharov 5c27e5a7ac Fix undefined var in promote job
promote job missed to set the required download_artifact_job variable.

Change-Id: Ia9c7d643a86ddcfa8b7bf56a66766c50e81b5ccb
2024-07-31 13:33:16 +02:00

99 lines
3.8 KiB
YAML

---
- job:
name: codegenerator-rust-base
parent: unittests
description: |
Base job for generation of the Rust code
attempts: 1
timeout: 1800
pre-run:
- playbooks/codegenerator/pre.yaml
post-run:
- playbooks/rust/post.yaml
vars:
codegenerator_service_metadata_target_map:
- service: "block-storage"
metadata: "metadata/block-storage_metadata.yaml"
targets: ["rust-sdk", "rust-cli"]
- service: "compute"
metadata: "metadata/compute_metadata.yaml"
targets: ["rust-sdk", "rust-cli"]
- service: "identity"
metadata: "metadata/identity_metadata.yaml"
targets: ["rust-sdk", "rust-cli"]
# https://review.opendev.org/c/openstack/glance/+/882498 screwed us.
# Disable build for glance until we find way to deal with that
# - service: "image"
# metadata: "metadata/image_metadata.yaml"
# targets: ["rust-sdk", "rust-cli"]
- service: "load-balancer"
metadata: "metadata/load-balancer_metadata.yaml"
targets: ["rust-sdk", "rust-cli"]
- service: "network"
metadata: "metadata/network_metadata.yaml"
targets: ["rust-sdk", "rust-cli"]
- service: "object-store"
metadata: "metadata/object-store_metadata.yaml"
targets: ["rust-sdk"]
# - service: "shared-file-system"
# metadata: "metadata/shared-file-system_metadata.yaml"
# targets: ["rust-sdk"]
- job:
name: codegenerator-rust-all
parent: codegenerator-rust-base
# It takes a while to compile the project
timeout: 3600
description: |
Generate Rust SDK/CLI
dependencies:
- name: codegenerator-openapi-block-storage-tips-with-api-ref
soft: true
- name: codegenerator-openapi-compute-tips-with-api-ref
soft: true
- name: codegenerator-openapi-identity-tips-with-api-ref
soft: true
- name: codegenerator-openapi-image-tips-with-api-ref
soft: true
- name: codegenerator-openapi-load-balancing-tips-with-api-ref
soft: true
- name: codegenerator-openapi-network-tips-with-api-ref
soft: true
- name: codegenerator-openapi-object-store-static
soft: true
- name: codegenerator-openapi-placement-tips-with-api-ref
soft: true
- name: codegenerator-openapi-shared-file-system-tips-with-api-ref
soft: true
pre-run: playbooks/openapi/fetch.yaml
run: playbooks/rust/all.yaml
vars:
codegenerator_base_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
openapi_dest: "{{ codegenerator_base_dir }}/wrk/openapi_specs"
patch_path: "{{ ansible_user_dir }}/{{ zuul.change }}.patch"
rust_sdk_git_repo: "https://github.com/gtema/openstack"
rust_project_dir: "{{ ansible_user_dir }}/openstack"
- job:
name: codegenerator-propose-rust-openstack-change
description: |
Propose changes to the Rust OpenStack project with the code newly
generated in this change.
This job is applying the git patch created by the
`codegenerator-rust-all` job. It accesses target repository using SSH
and a public key of the project (`curl
https://zuul.opendev.org/api/tenant/openstack/project-ssh-key/openstack/codegenerator.pub`)
being added as a deploy key in GitHub repository with read/write access.
Pull Request itself is not opened, since it requires additionally API
token what would require hardcoding secret (and GitHub does everything
possible not to have long lasting tokens).
post-review: true
run: playbooks/rust/propose-github.yaml
nodeset:
nodes: []
vars:
rust_sdk_git_repo: "git@github.com:gtema/openstack.git"
rust_project_dir: "{{ ansible_user_dir }}/openstack"
download_artifact_job: "codegenerator-rust-all"