Merge ~hloeung/mailman3-core-charm:master into mailman3-core-charm:master

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: 1d99c095b199fc42fe43766328428ca820b3fe68
Merged at revision: 4136b31910090d592572ece49c6dd9abf31d0dde
Proposed branch: ~hloeung/mailman3-core-charm:master
Merge into: mailman3-core-charm:master
Diff against target: 80 lines (+40/-19)
3 files modified
.gitignore (+15/-0)
Makefile (+4/-19)
charmcraft.yaml (+21/-0)
Reviewer Review Type Date Requested Status
James Simpson Approve
Canonical IS Reviewers Pending
Review via email: mp+416997@code.launchpad.net

Commit message

Add support for building charm with charmcraft pack

To post a comment you must log in.
Revision history for this message
James Simpson (jsimpso) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 4136b31910090d592572ece49c6dd9abf31d0dde

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.gitignore b/.gitignore
0new file mode 1006440new file mode 100644
index 0000000..3b821e7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
1*.charm
2*.pyc
3*.swp
4*~
5.coverage
6.pytest_cache/
7.tox/
8.unit-state.db
9__pycache__/
10build/
11builds/
12deps/
13htmlcov/
14repo-info
15revision
diff --git a/Makefile b/Makefile
index 915cac6..095bae3 100644
--- a/Makefile
+++ b/Makefile
@@ -12,23 +12,8 @@ test: lint
12 nosetests3 unit_tests/*12 nosetests3 unit_tests/*
13 @echo "\nAmulet based tests in ./tests should be run with bundletester against the built charm"13 @echo "\nAmulet based tests in ./tests should be run with bundletester against the built charm"
1414
15CHARM_REPO = lp:mailman3-core-charm15clean:
16CHARM_NAME = mailman3-core16 @echo "Cleaning files"
17CHARM_DEST ?= ~/tmp/$(CHARM_NAME)17 @git clean -ffXd
18CHARM_BUILD ?= ~/tmp
1918
20charm-build:19.PHONY: clean lint test
21 $(eval TMP_CHARM_BUILD_DIR = $(shell mktemp -d -p $(CHARM_BUILD) charm-build.$(CHARM_NAME).XXXXXXXX))
22 @if [ -z $(CHARM_NAME) ]; then \
23 echo "Unable to work out charm name from metadata.yaml"; \
24 exit 1; \
25 fi
26 charm build -o $(TMP_CHARM_BUILD_DIR)
27 @if [ -d $(CHARM_DEST)/ ]; then \
28 git -C $(CHARM_DEST)/ pull; \
29 else \
30 git clone -- $(CHARM_REPO) $(CHARM_DEST)/; \
31 fi
32 rsync -a --exclude .git --delete -- $(TMP_CHARM_BUILD_DIR)/builds/$(CHARM_NAME)/ $(CHARM_DEST)/
33 @echo "Built charm in $(CHARM_DEST)"
34 rm -rf -- $(TMP_CHARM_BUILD_DIR)
diff --git a/charmcraft.yaml b/charmcraft.yaml
35new file mode 10064420new file mode 100644
index 0000000..1da5d37
--- /dev/null
+++ b/charmcraft.yaml
@@ -0,0 +1,21 @@
1type: "charm"
2bases:
3 - build-on:
4 - name: "ubuntu"
5 channel: "18.04"
6 - name: "ubuntu"
7 channel: "20.04"
8 - name: "ubuntu"
9 channel: "21.10"
10 run-on:
11 - name: "ubuntu"
12 channel: "18.04"
13 - name: "ubuntu"
14 channel: "20.04"
15 - name: "ubuntu"
16 channel: "21.10"
17parts:
18 charm:
19 source: .
20 plugin: reactive
21 build-snaps: [charm]

Subscribers

People subscribed via source and target branches