Skip to content

Commit 7f91a99

Browse files
committed
adding authors and verison file, this will also test the CI.
1 parent 0745210 commit 7f91a99

File tree

7 files changed

+233
-213
lines changed

7 files changed

+233
-213
lines changed

.circleci/config.yml

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# This is a continuous build CircleCI configuration for a Docker container
2+
# intended to bulid on CircleCI to spread out testing over Travis/Circle.
3+
# The container is built and pushed to the CONTAINER_NAME variable
4+
# defined here or within the CircleCI settings. The following environment
5+
# variables are acceptable here or in these settings (for sensitive information)
6+
#
7+
# CONTAINER_NAME
8+
# DOCKER_USER
9+
# DOCKER_EMAIL
10+
11+
################################################################################
12+
# Functions
13+
################################################################################
14+
15+
# Defaults
16+
17+
defaults: &defaults
18+
docker:
19+
- image: docker:18.01.0-ce-git
20+
working_directory: /tmp/src
21+
environment:
22+
- CONTAINER_NAME: singularityware/docker2singularity
23+
24+
# Installation
25+
26+
install: &install
27+
name: Install parallel gzip, gettext, python3, and jq
28+
command: apk add --no-cache pigz python3 gettext jq
29+
30+
31+
dockerload: &dockerload
32+
name: Load Docker container Image
33+
no_output_timeout: 30m
34+
command: |
35+
echo "Working directory is ${PWD}"
36+
docker info
37+
set +o pipefail
38+
if [ -f /tmp/cache/container.tar.gz ]; then
39+
apk update && apk add --no-cache pigz curl curl-dev
40+
pigz -d --stdout /tmp/cache/container.tar.gz | docker load
41+
fi
42+
43+
44+
dockersave: &dockersave
45+
name: Docker Save
46+
no_output_timeout: 40m
47+
command: |
48+
DOCKER_TAG="v$(cat VERSION)"
49+
echo "Saving ${CONTAINER_NAME}:${DOCKER_TAG} to container.tar.gz"
50+
mkdir -p /tmp/cache
51+
docker save ${CONTAINER_NAME}:${DOCKER_TAG} \
52+
| pigz -2 -p 3 > /tmp/cache/container.tar.gz
53+
54+
55+
dockerdeploy: &dockerdeploy
56+
name: Deploy to Docker Hub
57+
no_output_timeout: 40m
58+
command: |
59+
docker images
60+
DOCKER_TAG="v$(cat VERSION)"
61+
echo "Container name set to ${CONTAINER_NAME}:${DOCKER_TAG}"
62+
if [[ -n "$DOCKER_PASS" ]]; then
63+
docker login -u $DOCKER_USER -p $DOCKER_PASS
64+
docker push ${CONTAINER_NAME}:${DOCKER_TAG}
65+
echo "Tagging latest image..."
66+
docker tag ${CONTAINER_NAME}:${DOCKER_TAG} ${CONTAINER_NAME}:latest
67+
docker push ${CONTAINER_NAME}:latest
68+
fi
69+
70+
dockerbuild: &dockerbuild
71+
name: Build development Docker container
72+
command: |
73+
echo "Building base image..."
74+
DOCKER_TAG="v$(cat VERSION)"
75+
docker build -t ${CONTAINER_NAME}:${DOCKER_TAG} .
76+
77+
################################################################################
78+
# Jobs
79+
################################################################################
80+
81+
82+
version: 2
83+
jobs:
84+
build:
85+
<<: *defaults
86+
steps:
87+
- checkout
88+
- restore_cache:
89+
keys:
90+
- docker-v1-{{ .Branch }}
91+
paths:
92+
- /tmp/cache/container.tar.gz
93+
- restore_cache:
94+
key: dependency-cache
95+
- setup_remote_docker
96+
- run: *install
97+
- run: *dockerload
98+
- run: *dockerbuild
99+
- run: *dockersave
100+
- persist_to_workspace:
101+
root: /tmp
102+
paths:
103+
- src
104+
- cache
105+
106+
update_cache:
107+
<<: *defaults
108+
steps:
109+
- attach_workspace:
110+
at: /tmp
111+
- save_cache:
112+
key: docker-v1-{{ .Branch }}
113+
paths:
114+
- /tmp/cache/container.tar.gz
115+
116+
deploy:
117+
<<: *defaults
118+
steps:
119+
- attach_workspace:
120+
at: /tmp
121+
- setup_remote_docker
122+
- run: *dockerload
123+
- run: *dockerdeploy
124+
125+
126+
################################################################################
127+
# Workflows
128+
################################################################################
129+
130+
131+
workflows:
132+
version: 2
133+
build_deploy:
134+
jobs:
135+
- build:
136+
filters:
137+
branches:
138+
ignore:
139+
- gh-pages
140+
- /docs?/.*/
141+
tags:
142+
only: /.*/
143+
144+
- update_cache:
145+
requires:
146+
- build
147+
filters:
148+
branches:
149+
ignore:
150+
- gh-pages
151+
- /docs?/.*/
152+
tags:
153+
only: /.*/
154+
155+
# Upload the container to Docker Hub
156+
- deploy:
157+
requires:
158+
- build
159+
- update_cache
160+
filters:
161+
branches:
162+
only: master
163+
tags:
164+
only: /.*/

AUTHORS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Maintainers
2+
3+
- [@chrisfilo](https://www.github.com/chrisfilo)
4+
- [@vsoch](https://www.github.com/vsoch)
5+
6+
## Contributors
7+
8+
- [@pvanheus](https://www.github.com/pvanheus)
9+
- [@kaczmarj](https://www.github.com/kaczmarj)
10+
- [@alanhoyle](https://www.github.com/alanhoyle)
11+
- [@justbennet](https://www.github.com/justbennet)
12+
- [@pditommaso](https://www.github.com/pditommaso)
13+
- [@jdidion](https://www.github.com/jdidion)
14+
- [@alaindomissy](https://www.github.com/alaindomissy)

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ represented by the pull requests that fixed them. Critical items to know are:
1313
- changed behaviour (recipe sections work differently)
1414

1515
This changelog was started with version of Singularity v2.5, and reflects changes since then.
16+
The tags here reflect tags on Docker Hub
1617

1718
## [master](https://github.com/singularityware/docker2singularity/tree/master) (master)
18-
- update of Singularity from [v2.4](https://github.com/singularityware/docker2singularity/tree/v2.4) to [v2.5](https://github.com/singularityware/docker2singularity/tree/v2.5), including adding libarchive dependency, and custom name with -n (v2.5)
19+
- addition of automated builds via CircleCI, and Authors.md (v2.5)
20+
- update of Singularity from [v2.4](https://github.com/singularityware/docker2singularity/tree/v2.4) to [v2.5](https://github.com/singularityware/docker2singularity/tree/v2.5), including adding libarchive dependency, and custom name with -n

0 commit comments

Comments
 (0)