2017-05-25 09:08:26 +00:00
|
|
|
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:
|
2018-01-02 12:14:26 +00:00
|
|
|
- yarn
|
|
|
|
- yarn grunt build-webapp
|
2017-05-25 09:08:26 +00:00
|
|
|
- mv api/cmd/portainer/portainer dist/
|
|
|
|
|
2017-10-16 08:32:51 +00:00
|
|
|
download_docker_binary:
|
|
|
|
image: busybox
|
|
|
|
working_directory: ${{build_frontend}}
|
|
|
|
commands:
|
|
|
|
- wget -O /tmp/docker-binaries.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${{DOCKER_VERSION}}.tgz
|
|
|
|
- tar -xf /tmp/docker-binaries.tgz -C /tmp
|
|
|
|
- mv /tmp/docker/docker dist/
|
|
|
|
|
2017-05-25 09:08:26 +00:00
|
|
|
build_image:
|
|
|
|
type: build
|
2017-10-16 08:32:51 +00:00
|
|
|
working_directory: ${{download_docker_binary}}
|
2017-05-25 09:08:26 +00:00
|
|
|
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
|