Skip to content

Commit

Permalink
Update Semaphore configuration (DeviceFarmer#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
koral-- authored Jul 5, 2020
1 parent 86bc95e commit 80067b0
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .semaphore/deploy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: v1.0
name: Deploy to DockerHub
blocks:
- name: Deploy to DockerHub
task:
jobs:
- name: Deploy
commands:
- checkout
- 'docker build . -t "devicefarmer/stf:${SEMAPHORE_GIT_TAG_NAME:-latest}"'
- docker push devicefarmer/stf
secrets:
- name: dockerhub-secrets
prologue:
commands:
- 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin'
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804

40 changes: 40 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: v1.0
name: Docker
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
blocks:
- name: Build Standard Docker image
task:
jobs:
- name: docker build
commands:
- checkout
- docker build .
dependencies: []
- name: Build npm package
dependencies: []
task:
jobs:
- name: npm test
commands:
- install-package libzmq3-dev libprotobuf-dev graphicsmagick yasm gulp
- sem-version node 8.16.1
- checkout
- npm install
- npm test
- gulp build
- name: Build Debian Docker image
dependencies: []
task:
jobs:
- name: docker build
commands:
- checkout
- docker build . -f Dockerfile-debian-x86_64
promotions:
- name: Deploy to DockerHub
pipeline_file: deploy.yml
auto_promote:
when: (branch = 'master' OR tag =~ '.*') AND result = 'passed'

0 comments on commit 80067b0

Please sign in to comment.