Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] cleanup local dev ux #11

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Conversation

detiber
Copy link
Member

@detiber detiber commented Dec 19, 2024

WIP refactor of some of the local dev experience

Example run from my fork (fails on cosign): https://github.com/detiber/chonky-main/actions/runs/12405816581/job/34633290193


concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.brand_name}}-${{ inputs.stream_name }}
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping this for now, we can re-add it if needed in the future

Comment on lines -82 to -100
alias_tags="$(just generate-build-tags \
"latest" \
"1" \
"$(podman inspect ${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }} | jq -r '.[].Config.Labels["org.opencontainers.image.version"]')" \
"${{ github.event_name }}" \
"${{ github.event.number }}")"

echo "Tags for this Action..."
echo "$alias_tags"
echo "alias_tags=${alias_tags}" >> $GITHUB_OUTPUT

# Tag Images
- name: Tag Images
shell: bash
run: |
set -eoux pipefail
just tag-images "${{ env.IMAGE_NAME }}" \
"${{ env.DEFAULT_TAG }}" \
"${{ steps.generate-tags.outputs.alias_tags }}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulled this back into the github action workflow, since it's not needed for local dev.

Comment on lines +1 to +4
export repo_organization := env("GITHUB_REPOSITORY_OWNER", "centos-workstation")
export image_name := env("IMAGE_NAME", "main")
export centos_version := env("CENTOS_VERSION", "stream10")
export default_tag := env("DEFAULT_TAG", "latest")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

streamline variable config between what's being set in github actions and here.

shell: bash
run: |
IMAGE_FULL="${{ steps.registry_case.outputs.lowercase }}/${IMAGE_NAME}"
just build "${IMAGE_FULL}" "${DEFAULT_TAG}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to refactor the build-vm and run-vm ones after this gets merged. This will kind of break it I think..?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the main reason this is still wip, but wanted to get this pushed before I called it a night

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worst case dont worry we can work on it outside of this PR. I want to keep the achillobator just run-vm 1 raw workflow, it is super cleeeean!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build-vm and run-vm recipes are working now. I did refactor run-vm to run in a container (blatantly stolen from the bluefin run-iso job)

@detiber detiber marked this pull request as ready for review December 19, 2024 20:21
@castrojo castrojo merged commit 637064f into centos-workstation:main Dec 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants