Skip to content

Commit

Permalink
Merge branch 'main' into update-metadata-DAS
Browse files Browse the repository at this point in the history
  • Loading branch information
MVrachev authored Oct 10, 2023
2 parents 48e8189 + 681dfda commit 28113ee
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 24 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,53 @@ jobs:
with:
image_version: ${{ github.sha }}

set-component-versions:
needs: publish-container-image
runs-on: ubuntu-latest
outputs:
api_version: ${{ steps.api_version.outputs.VERSION }}
cli_version: ${{ steps.cli_version.outputs.VERSION }}

steps:
- id: api_version
name: dynamic input worker version
run: |
if [[ "${{ inputs.api_version }}" == "" ]]; then echo "VERSION=latest" >> $GITHUB_OUTPUT; else echo "VERSION=${{ inputs.api_version }}" >> $GITHUB_OUTPUT;fi
- id: cli_version
name: dynamic input cli version
run: |
if [[ "${{ inputs.cli_version }}" == "" ]]; then echo "VERSION=latest" >> $GITHUB_OUTPUT; else echo "VERSION=${{ inputs.cli_version }}" >> $GITHUB_OUTPUT;fi
functional-tests-local:
needs: set-component-versions
name: FT Deploy Local Services
uses: ./.github/workflows/functional-tests.yml
with:
api_version: ${{ inputs.api_version }}
cli_version: ${{ inputs.cli_version }}
api_version: ${{ needs.set-component-versions.outputs.api_version }}
cli_version: ${{ needs.set-component-versions.outputs.cli_version }}

functional-tests-local-redis:
needs: set-component-versions
name: FT Deploy Local Services with Redis as Broker
uses: ./.github/workflows/functional-tests.yml
with:
docker_compose: docker-compose-redis.yml
api_version: ${{ inputs.api_version }}
cli_version: ${{ inputs.cli_version }}
api_version: ${{ needs.set-component-versions.outputs.api_version }}
cli_version: ${{ needs.set-component-versions.outputs.cli_version }}

functional-tests-aws:
needs: set-component-versions
name: FT Deploy AWS Services
uses: ./.github/workflows/functional-aws.yml
uses: ./.github/workflows/functional-tests.yml
with:
docker_compose: docker-compose-aws.yml
api_version: ${{ inputs.api_version }}
cli_version: ${{ inputs.cli_version }}
api_version: ${{ needs.set-component-versions.outputs.api_version }}
cli_version: ${{ needs.set-component-versions.outputs.cli_version }}

prepare-rc:
runs-on: ubuntu-latest
needs: functional-tests
needs: [functional-tests-local, functional-tests-local-redis, functional-tests-aws]
outputs:
release_id: ${{ steps.gh-release.outputs.id }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion repository_service_tuf_worker/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#
# SPDX-License-Identifier: MIT

version = "0.8.0b1"
version = "0.9.0b1"
copyright = "Copyright (c) 2022-2023 VMware Inc"
author = "Kairo de Araujo"
17 changes: 2 additions & 15 deletions repository_service_tuf_worker/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,22 +1123,9 @@ def _trusted_root_update(
new_root.verify_delegate(Root.type, new_root)

def _root_metadata_update(
self,
new_root: Metadata[Root],
update_state: Optional[
Task.update_state
] = None, # It is required (see: app.py)
self, new_root: Metadata[Root]
) -> Dict[str, Any]:
"""
Update Root metadata.
It checks if the new root metadata is trusted and runs a specific
process for updating the Root Metadata.
Args:
new_root: contains new metadata
example: {"metadata": {"root": Any}}
update_state: not used, but required argument by `app.py`
"""
"""Updates to new root metadata, if it is trusted."""
current_root: Metadata[Root] = self._storage_backend.get(Root.type)

try:
Expand Down

0 comments on commit 28113ee

Please sign in to comment.