← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/lp-signing:charm-drop-resource into lp-signing:master

 

Colin Watson has proposed merging ~cjwatson/lp-signing:charm-drop-resource into lp-signing:master.

Commit message:
charm: Drop resource from lp-signing charm

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/lp-signing/+git/lp-signing/+merge/440862

This was only ever for local development convenience, and it's usually much easier to just fetch the resource from Swift.  Now that we're trying to upload the charm to Charmhub, having a resource attached to it is an active impediment, because Charmhub doesn't have a good way to deal with optional resources; so just drop it.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lp-signing:charm-drop-resource into lp-signing:master.
diff --git a/charm/Makefile b/charm/Makefile
index 927f2a5..7331993 100644
--- a/charm/Makefile
+++ b/charm/Makefile
@@ -10,8 +10,6 @@ export INTERFACE_PATH := $(TMPDIR)/deps/ols-layers/interface
 CHARM_WHEELS_DIR := $(TMPDIR)/deps/charm-wheels
 
 BUILD_LABEL = $(shell git rev-parse HEAD)
-TARBALL = $(APP_NAME).tar.gz
-ASSET = ../build/$(BUILD_LABEL)/$(TARBALL)
 
 CHARMS := lp-signing
 
@@ -77,15 +75,10 @@ bundle.yaml: bundle.yaml.in tmp/signing.launchpad.test.crt tmp/service-private-k
 	     -e "s,%KEY_STORAGE_PRIVATE_KEY%,$$(cat tmp/key-storage-private-key),g" \
 	     bundle.yaml.in >bundle.yaml
 
-deploy: build payload bundle.yaml
+deploy: build bundle.yaml
 	@echo "Deploying $(APP_NAME)..."
 	@juju deploy ./bundle.yaml
 
-payload: $(ASSET)
-$(ASSET):
-	@echo "Building asset for $(BUILD_LABEL)..."
-	@$(MAKE) -C .. build-tarball
-
 clean:
 	@find . -name \*.pyc -delete
 	@find . -depth -name '__pycache__' -exec rm -rf '{}' \;
@@ -134,4 +127,4 @@ setup-jenkaas:
 	sudo snap install --classic charm
 
 .PHONY: $(foreach charm,$(CHARMS),build-$(charm))
-.PHONY: all build clean deploy lint payload publish setup-jenkaas
+.PHONY: all build clean deploy lint publish setup-jenkaas
diff --git a/charm/bundle.yaml.in b/charm/bundle.yaml.in
index 6ebf77e..8f16084 100644
--- a/charm/bundle.yaml.in
+++ b/charm/bundle.yaml.in
@@ -18,8 +18,8 @@ applications:
       build_label: "%BUILD_LABEL%"
       key_storage_private_keys: '["%KEY_STORAGE_PRIVATE_KEY%"]'
       service_private_keys: '["%SERVICE_PRIVATE_KEY%"]'
-    resources:
-      lp-signing: "../build/%BUILD_LABEL%/lp-signing.tar.gz"
+      swift_container_name: "lp-signing-builds"
+      swift_storage_url: "https://objectstorage.prodstack5.canonical.com/swift/v1/AUTH_4f122c9c86d641cca1406b862ea56ad2";
 relations:
   - ["haproxy", "lp-signing"]
   - ["postgresql:db", "lp-signing:db"]
diff --git a/charm/lp-signing/metadata.yaml b/charm/lp-signing/metadata.yaml
index 0a6bd38..00d6bab 100644
--- a/charm/lp-signing/metadata.yaml
+++ b/charm/lp-signing/metadata.yaml
@@ -6,8 +6,3 @@ description: A service for storing keys and signing messages.
 series:
   - bionic
 subordinate: false
-resources:
-  lp-signing:
-    type: file
-    filename: lp-signing.tar.gz
-    description: Launchpad signing code