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

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

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

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

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.

Despite having "AUTH" in the URL, the Swift storage URL isn't actually a 
secret, and doesn't confer any write access.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/lp-codeimport:charm-drop-resource into lp-codeimport:master.
diff --git a/charm/Makefile b/charm/Makefile
index 9002ea5..4de6bc0 100644
--- a/charm/Makefile
+++ b/charm/Makefile
@@ -10,8 +10,6 @@ export CHARM_INTERFACES_DIR := $(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-codeimport
 
@@ -71,15 +69,10 @@ bundle.yaml: bundle.yaml.in tmp/ssh-key tmp/gpg-key.sec
 	    -e "s/%PUBLIC_GPG_KEY%/$$(base64 -w 0 <tmp/gpg-key.pub)/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 '{}' \;
@@ -128,4 +121,4 @@ setup-jenkaas:
 	sudo snap install --classic --channel 2.x/stable 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 6ebcbdd..9aa5d8d 100644
--- a/charm/bundle.yaml.in
+++ b/charm/bundle.yaml.in
@@ -11,5 +11,7 @@ applications:
       bzr_identity: "VCS Imports <[email protected]>"
       private_gpg_key: "%PRIVATE_GPG_KEY%"
       public_gpg_key: "%PUBLIC_GPG_KEY%"
+      swift_container_name: "lp-codeimport-builds"
+      swift_storage_url: "https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_f32a0503483444aa8dd95cbdbca7846f";
     resources:
       lp-codeimport: "../build/%BUILD_LABEL%/lp-codeimport.tar.gz"
diff --git a/charm/lp-codeimport/metadata.yaml b/charm/lp-codeimport/metadata.yaml
index 6edc5b9..0c4ee40 100644
--- a/charm/lp-codeimport/metadata.yaml
+++ b/charm/lp-codeimport/metadata.yaml
@@ -9,8 +9,3 @@ tags:
 series:
   - bionic
 subordinate: false
-resources:
-  lp-codeimport:
-    type: file
-    filename: lp-codeimport.tar.gz
-    description: lp-codeimport code
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to