-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
55 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,64 @@ | ||
# This references a standard debian container from the | ||
# Docker Hub https://registry.hub.docker.com/_/debian/ | ||
# Read more about containers on our dev center | ||
# https://devcenter.wercker.com/overview-and-core-concepts/containers/ | ||
box: hashexpression/wercker | ||
# You can also use services such as databases. Read more on our dev center: | ||
# https://devcenter.wercker.com/administration/services/ | ||
# services: | ||
# - postgres | ||
# https://devcenter.wercker.com/administration/services/examples/postgresql/ | ||
no-response-timeout: 10 | ||
|
||
# - mongo | ||
# https://devcenter.wercker.com/administration/services/examples/mongodb/ | ||
|
||
# This is the build pipeline. Pipelines are the core of wercker | ||
# Read more about pipelines on our dev center | ||
# https://devcenter.wercker.com/development/pipelines/ | ||
build: | ||
# Steps make up the actions in your pipeline | ||
# Read more about steps on our dev center: | ||
# https://devcenter.wercker.com/development/steps/ | ||
steps: | ||
- script: | ||
name: restore cache | ||
code: | | ||
if [ -e "$WERCKER_CACHE_DIR/.stack-work" ]; then | ||
cp -r $WERCKER_CACHE_DIR/.stack-work . | ||
fi | ||
- script: | ||
name: build & test | ||
code: | | ||
stack build --test --ghc-options -O2 | ||
stack build --test --ghc-options -O2 --copy-bins --local-bin-path bins | ||
- script: | ||
name: store cache | ||
code: | | ||
cp -r .stack-work $WERCKER_CACHE_DIR | ||
create-release: | ||
box: ubuntu | ||
steps: | ||
- install-packages: | ||
packages: curl file | ||
- script: | ||
name: Get release version | ||
code: | | ||
export RELEASE_VERSION=$(cat VERSION) | ||
- script: | ||
name: Create symphony archive | ||
code: | | ||
tar czf symphony-$RELEASE_VERSION.tar.gz --directory=bins symphony | ||
- wercker/[email protected]: | ||
token: $GITHUB_TOKEN | ||
tag: v$RELEASE_VERSION | ||
title: v$RELEASE_VERSION | ||
- wercker/[email protected]: | ||
token: $GITHUB_TOKEN | ||
file: symphony-$RELEASE_VERSION.tar.gz | ||
|
||
|
||
create-docker-image: | ||
box: hashexpression/symphony_env | ||
steps: | ||
- script: | ||
name: Remove unncessary directories & files | ||
code: | | ||
rm -rf .stack-work | ||
rm -rf .git | ||
- script: | ||
name: Copy symphony to PATH | ||
code: | | ||
cp bins/symphony /usr/bin | ||
- internal/docker-push: | ||
username: $DOCKERHUB_USERNAME # Registry username | ||
password: $DUCKERHUB_PASSWORD # Registry password | ||
repository: hashexpression/symphony | ||
|
||
|