Skip to content

Commit cd7dd12

Browse files
Merge pull request #11 from CodeForPhilly/develop
Release: v1.0.2
2 parents c8a95d0 + 37c531d commit cd7dd12

File tree

9 files changed

+106
-2
lines changed

9 files changed

+106
-2
lines changed

.github/workflows/release-prepare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
4444
if [ -n "${pr_number}" ]; then
4545
echo "Updating PR #${pr_number}"
46-
existing_comment_id=$(hub api "/repos/${GITHUB_REPOSITORY}/issues/${pr_number}/comments" | jq '.[] | select(.user.login=="${GITHUB_USERNAME}") | .id')
46+
existing_comment_id=$(hub api "/repos/${GITHUB_REPOSITORY}/issues/${pr_number}/comments" | jq ".[] | select(.user.login==\"${GITHUB_USERNAME}\") | .id")
4747
else
4848
echo "Opening PR"
4949
hub pull-request -b "${RELEASE_BRANCH}" -h develop -F <(echo "${pr_body}") > /tmp/pr.json
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[holomapping]
2+
holosource="=>fixtures"
3+
files = "**"
4+
before = "*"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[holomapping]
2+
holosource="=>helm-chart"
3+
files = "**"
4+
before = "*"

.holo/sources/laddr.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[holosource]
22
url = "https://github.com/CodeForPhilly/laddr"
3-
ref = "refs/tags/v3.0.1"
3+
ref = "refs/tags/v3.0.3"

Dockerfile

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This Dockerfile is hyper-optimized to minimize layer changes
2+
3+
FROM jarvus/habitat-compose:latest as habitat
4+
5+
ARG HAB_LICENSE=no-accept
6+
ENV HAB_LICENSE=$HAB_LICENSE
7+
ENV STUDIO_TYPE=Dockerfile
8+
ENV HAB_ORIGIN=codeforphilly
9+
RUN hab origin key generate
10+
11+
# pre-layer all external runtime plan deps
12+
COPY habitat/plan.sh /habitat/plan.sh
13+
RUN hab pkg install \
14+
core/bash \
15+
emergence/php-runtime \
16+
$({ cat '/habitat/plan.sh' && echo && echo 'echo "${pkg_deps[@]/$pkg_origin\/*/}"'; } | hab pkg exec core/bash bash) \
17+
&& hab pkg exec core/coreutils rm -rf /hab/cache/{artifacts,src}/
18+
19+
# pre-layer all external runtime composite deps
20+
COPY habitat/composite/plan.sh /habitat/composite/plan.sh
21+
RUN hab pkg install \
22+
jarvus/habitat-compose \
23+
emergence/nginx \
24+
$({ cat '/habitat/composite/plan.sh' && echo && echo 'echo "${pkg_deps[@]/$pkg_origin\/*/} ${composite_mysql_pkg}"'; } | hab pkg exec core/bash bash) \
25+
&& hab pkg exec core/coreutils rm -rf /hab/cache/{artifacts,src}/
26+
27+
28+
FROM habitat as projector
29+
30+
# pre-layer all build-time plan deps
31+
RUN hab pkg install \
32+
core/hab-plan-build \
33+
jarvus/hologit \
34+
jarvus/toml-merge \
35+
$({ cat '/habitat/plan.sh' && echo && echo 'echo "${pkg_build_deps[@]/$pkg_origin\/*/}"'; } | hab pkg exec core/bash bash) \
36+
&& hab pkg exec core/coreutils rm -rf /hab/cache/{artifacts,src}/
37+
38+
# pre-layer all build-time composite deps
39+
RUN hab pkg install \
40+
jarvus/toml-merge \
41+
$({ cat '/habitat/composite/plan.sh' && echo && echo 'echo "${pkg_build_deps[@]/$pkg_origin\/*/}"'; } | hab pkg exec core/bash bash) \
42+
&& hab pkg exec core/coreutils rm -rf /hab/cache/{artifacts,src}/
43+
44+
# build application
45+
COPY . /src
46+
ARG SITE_TREE
47+
ENV SITE_TREE=$SITE_TREE
48+
ARG SITE_VERSION
49+
ENV SITE_VERSION=$SITE_VERSION
50+
RUN hab pkg exec core/hab-plan-build hab-plan-build /src
51+
RUN hab pkg exec core/hab-plan-build hab-plan-build /src/habitat/composite
52+
53+
54+
FROM habitat as runtime
55+
56+
# configure persistent volumes
57+
RUN hab pkg exec core/coreutils mkdir -p '/hab/svc/mysql/data' '/hab/svc/codeforphilly/data' '/hab/svc/nginx/files' \
58+
&& hab pkg exec core/coreutils chown hab:hab -R '/hab/svc/mysql/data' '/hab/svc/codeforphilly/data' '/hab/svc/nginx/files'
59+
60+
# configure entrypoint
61+
VOLUME ["/hab/svc/mysql/data", "/hab/svc/codeforphilly/data", "/hab/svc/nginx/files"]
62+
ENTRYPOINT ["hab", "sup", "run"]
63+
CMD ["codeforphilly/codeforphilly-composite"]
64+
65+
# install .hart artifact from builder stage
66+
COPY --from=projector /hab/cache/artifacts/$HAB_ORIGIN-* /hab/cache/artifacts/
67+
RUN hab pkg install /hab/cache/artifacts/$HAB_ORIGIN-* \
68+
&& hab pkg exec core/coreutils rm -rf /hab/cache/{artifacts,src}/
69+
70+
# add source metadata to environment
71+
ARG SOURCE_TAG
72+
ENV SOURCE_TAG=$SOURCE_TAG
73+
ARG SOURCE_COMMIT
74+
ENV SOURCE_COMMIT=$SOURCE_COMMIT

habitat/composite/default.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[services.app.config]
2+
default_timezone = "America/New_York"

habitat/composite/plan.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
composite_app_pkg_name=codeforphilly
2+
pkg_name="${composite_app_pkg_name}-composite"
3+
pkg_origin=codeforphilly
4+
pkg_maintainer="Code for Philly <[email protected]>"
5+
pkg_scaffolding=emergence/scaffolding-composite
6+
composite_mysql_pkg=core/mysql
7+
8+
pkg_version() {
9+
scaffolding_detect_pkg_version
10+
}

habitat/default.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[sites.default]
2+
database = "codeforphilly"

habitat/plan.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pkg_name=codeforphilly
2+
pkg_origin=codeforphilly
3+
pkg_maintainer="Code for Philly <[email protected]>"
4+
pkg_scaffolding=emergence/scaffolding-site
5+
6+
pkg_version() {
7+
scaffolding_detect_pkg_version
8+
}

0 commit comments

Comments
 (0)