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

Delete publish action #31

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Delete publish action #31

merged 2 commits into from
Jun 18, 2024

Conversation

javierdelapuente
Copy link
Collaborator

@javierdelapuente javierdelapuente commented Jun 5, 2024

Overview

Unfortunately, publish_charm from operator-workflows does not work for NetBox. The main reason is that we used charmcraft build from a branch (last valid one is this one), and the action canonical/charming-actions/upload-charm does not build charmcraft from source.

The workflow was created manually before the operator-workflow refactor for better-build. Now it has to be fixed again.

However, as charmcraft Django extension should be merged soon (see this PR), I believe it is better to just publish the charm manually until that is merged, instead of rewriting again the publish_charm action to change it again when charmcraft is merged.

Uploading the charm manually is done with:

# put the image in docker, whether with skopeo from a local image or with docker pull if from other place
rockcraft.skopeo --insecure-policy copy --dest-tls-verify=false oci-archive:netbox_0.1_amd64.rock docker-daemon:netbox:latest

image_id=$(docker images netbox:latest --format "{{.ID}}")
charmcraft upload-resource netbox django-app-image --image=${image_id} --verbosity=brief
charmcraft resource-revisions netbox django-app-image
MAX_REV=$(charmcraft resource-revisions netbox django-app-image --format=json | jq 'map( .revision) | max')
echo max_rev ${MAX_REV}
charmcraft upload --format json --release latest/edge ./charm/netbox_ubuntu-22.04-amd64.charm --resource=django-app-image:${MAX_REV}

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

@javierdelapuente javierdelapuente added bug Something isn't working trivial and removed bug Something isn't working labels Jun 5, 2024
@javierdelapuente javierdelapuente marked this pull request as ready for review June 5, 2024 14:35
@javierdelapuente javierdelapuente requested a review from a team as a code owner June 5, 2024 14:35
Copy link
Contributor

github-actions bot commented Jun 7, 2024

Test coverage for 799f5d5

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py     134     64     28      2    47%   67-69, 101-106, 124-135, 146-151, 159-188, 201, 209, 213, 217, 221, 238-246, 253-259, 269-279, 294, 302, 318, 379
----------------------------------------------------------
TOTAL            134     64     28      2    47%

Static code analysis report

Run started:2024-06-07 10:44:34.505485

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 1057
  Total lines skipped (#nosec): 1
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@javierdelapuente javierdelapuente merged commit fcc7a34 into main Jun 18, 2024
18 checks passed
@javierdelapuente javierdelapuente deleted the delete-publish-action branch June 18, 2024 11:23
javierdelapuente added a commit that referenced this pull request Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants