← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:charm-remove-old-build-system into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:charm-remove-old-build-system into launchpad:master.

Commit message:
charm: Remove the old build system

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/450473

We use `charmcraft` and Launchpad charm recipes now, so we can get rid of some cruft.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-remove-old-build-system into launchpad:master.
diff --git a/charm/.gitignore b/charm/.gitignore
index da831d3..f795aeb 100644
--- a/charm/.gitignore
+++ b/charm/.gitignore
@@ -1,4 +1 @@
 *.charm
-bundle.yaml
-dist
-tmp
diff --git a/charm/Makefile b/charm/Makefile
deleted file mode 100644
index 9c9fd26..0000000
--- a/charm/Makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-# The charmcraft tool is shipped as a snap, so make sure it's on $PATH.
-export PATH := $(PATH):/snap/bin
-
-APP_NAME := launchpad
-
-BUILDDIR := $(CURDIR)/dist
-
-CHARM_SERIES ?= 20.04
-ARCH := $(shell dpkg --print-architecture)
-charm_file = $(1)_ubuntu-$(CHARM_SERIES)-$(ARCH).charm
-
-BUILD_LABEL = $(shell git rev-parse HEAD)
-TARBALL = $(APP_NAME).tar.gz
-ASSET = ../build/$(BUILD_LABEL)/$(TARBALL)
-
-CHARMS := \
-	launchpad-admin \
-	launchpad-appserver \
-	launchpad-assets \
-	launchpad-buildd-manager \
-	launchpad-debian-importer \
-	launchpad-frontend-extras \
-	launchpad-librarian
-
-all: ## alias to build
-all: build
-
-help: ## display this help message
-	@echo "Please use \`make <target>' where <target> is one of"
-	@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf "\033[36m  %-25s\033[0m %s\n", $$1, $$2}'
-
-$(BUILDDIR):
-	@mkdir -p $@
-
-build: ## build all the charms
-build: $(foreach charm,$(CHARMS),build-$(charm))
-
-build-launchpad-admin: ## build the launchpad-admin charm
-build-launchpad-admin: dist/$(call charm_file,launchpad-admin)
-
-build-launchpad-appserver: ## build the launchpad-appserver charm
-build-launchpad-appserver: dist/$(call charm_file,launchpad-appserver)
-
-dist/%_ubuntu-$(CHARM_SERIES)-$(ARCH).charm: $(BUILDDIR)
-	echo "Building $*..."
-	cd $* && charmcraft pack
-	cp -a $*/$(call charm_file,$*) dist/
-
-clean: ## clean the build environment
-clean: $(foreach charm,$(CHARMS),clean-$(charm))
-	@find . -name \*.pyc -delete
-	@find . -depth -name '__pycache__' -exec rm -rf '{}' \;
-	@rm -f bundle.yaml
-	@rm -rf $(BUILDDIR)
-
-clean-%:
-	@echo "Cleaning $*..."
-	@cd $* && charmcraft clean
-	@rm -f dist/$(call charm_file,$*)
-
-bundle.yaml: ## create the bundle.yaml file from the bundle.yaml.in template
-bundle.yaml: bundle.yaml.in
-	sed \
-	    -e 's/%BUILD_LABEL%/$(BUILD_LABEL)/g' \
-	    bundle.yaml.in >bundle.yaml
-
-deploy: ## deploy the built charm
-deploy: build bundle.yaml
-	@echo "Deploying $(APP_NAME)..."
-	@juju deploy ./bundle.yaml
-
-payload: ## build a launchpad tarball
-payload: $(ASSET)
-$(ASSET):
-	@echo "Building asset for $(BUILD_LABEL)..."
-	@$(MAKE) -C .. build-tarball
-
-
-setup-jenkaas: ## prepare a Jenkins-as-a-service container for charm building
-setup-jenkaas:
-	sudo systemctl stop snapd.socket
-	sudo systemctl stop snapd
-	echo SNAPPY_STORE_NO_CDN=1 | sudo tee -a /etc/environment >/dev/null
-	echo SNAPPY_TESTING=1 | sudo tee -a /etc/environment >/dev/null
-	sudo systemctl start snapd.socket
-	sudo snap install --classic charm
-
-.PHONY: $(foreach charm,$(CHARMS),build-$(charm))
-.PHONY: all build clean deploy payload setup-jenkaas
diff --git a/charm/bundle.yaml.in b/charm/bundle.yaml.in
deleted file mode 100644
index ea92c02..0000000
--- a/charm/bundle.yaml.in
+++ /dev/null
@@ -1,10 +0,0 @@
-series: focal
-description: "Launchpad development bundle"
-applications:
-  launchpad-appserver:
-    charm: ./dist/launchpad-appserver_ubuntu-20.04-amd64.charm
-    num_units: 1
-    options:
-      build_label: "%BUILD_LABEL%"
-      swift_storage_url: "https://objectstorage.prodstack5.canonical.com/swift/v1/AUTH_318a449e4c8e40e2865c120a597a9644";
-      swift_container_name: "launchpad-builds"
diff --git a/charm/packages.txt b/charm/packages.txt
deleted file mode 100644
index 7cd3faf..0000000
--- a/charm/packages.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-flake8
-squashfuse