Skip to content

Commit

Permalink
Configure circleci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyokeun Jeon committed Sep 1, 2020
1 parent 8d2153b commit 911f2ca
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 7 deletions.
63 changes: 58 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,64 @@
version: 2

jobs:
build:
machine: true
working_directory: ~/workspace

steps:
- checkout
#- setup_remote_docker:
#docker_layer_caching: true
- run: docker login -u $DOCKER_LOGIN_ID -p $DOCKER_LOGIN_PASSWORD
- run: docker build -t retzero/gbs_ubuntu16.04 .
- run: docker push retzero/gbs_ubuntu16.04

- run:
name: Build docker image
command: |
docker build -t tizen_gbs .
- run:
name: Save docker image tarball
command: |
mkdir -p ~/saved_image
docker save -o ~/saved_image/tizen_gbs.tar tizen_gbs
- persist_to_workspace:
root: ~/
paths:
- saved_image

release:
machine: true
working_directory: ~/workspace

steps:
- attach_workspace:
at: ~/

- run:
name: Load docker image
command: |
docker load -i ~/saved_image/tizen_gbs.tar
docker tag tizen_gbs ${CIRCLE_USERNAME}/tizen_gbs:latest
docker tag tizen_gbs ${CIRCLE_USERNAME}/tizen_gbs:${CIRCLE_TAG:1}
- run:
name: Push to docker hub
command: |
docker login -u $DOCKER_LOGIN_ID -p $DOCKER_LOGIN_PASSWORD
docker push ${CIRCLE_USERNAME}/tizen_gbs:latest
docker push ${CIRCLE_USERNAME}/tizen_gbs:${CIRCLE_TAG:1}
workflows:
version: 2
build-and-release:
jobs:
- build:
filters:
tags:
only: /.*/
- release:
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ RUN apt-get update
RUN apt-get install -y --force-yes wget gbs

# Binfmt configuration
RUN sed -i "2a\\find /proc/sys/fs/binfmt_misc/ -name \"qemu-*\" -type f -exec sh -c \"echo -1 | tee {}\" \\\;" /usr/local/bin/dockerd-entrypoint.sh
RUN find /proc/sys/fs/binfmt_misc/ -name "qemu-*" -type f -exec sh -c "echo -1 | tee {}" \;

12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# gbs_ubuntu16.04
# Tizen GBS image

### Docker images

Docker images are available on [Docker Hub](https://hub.docker.com/r/retzero/tizen_gbs/).

You can launch a Tizen GBS container for trying it out with

```
$ docker run --name gbs -d retzero/tizen_gbs
```

0 comments on commit 911f2ca

Please sign in to comment.