mirror of https://github.com/portainer/portainer
37 lines
967 B
YAML
37 lines
967 B
YAML
|
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
|