chore(codefresh): add codefresh.yml (#887)

pull/889/head
Anthony Lapenna 2017-05-25 11:08:26 +02:00 committed by GitHub
parent 0f3fcb2917
commit de2818de4c
2 changed files with 37 additions and 0 deletions

View File

@ -1,2 +1,3 @@
*
!dist
!build

36
codefresh.yml Normal file
View File

@ -0,0 +1,36 @@
version: '1.0'
steps:
build_backend:
image: portainer/golang-builder:ci
working_directory: ${{main_clone}}
commands:
- mkdir -p /go/src/github.com/${{CF_REPO_OWNER}}
- ln -s /codefresh/volume/${{CF_REPO_NAME}}/api /go/src/github.com/${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
- /build.sh api/cmd/portainer
build_frontend:
image: portainer/angular-builder:latest
working_directory: ${{build_backend}}
commands:
- npm install -g bower grunt grunt-cli && npm install
- bower install --allow-root
- grunt build-webapp
- mv api/cmd/portainer/portainer dist/
build_image:
type: build
working_directory: ${{build_frontend}}
dockerfile: ./build/linux/Dockerfile
image_name: portainer/portainer
tag: ${{CF_BRANCH}}
push_image:
type: push
candidate: '${{build_image}}'
tag: '${{CF_BRANCH}}'
registry: dockerhub
when:
branch:
only:
- develop