handsome_fencer-circle_c_i 0.1.29 → 0.1.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/handsome_fencer/circle_c_i/cli/dockerize.rb +2 -2
- data/lib/handsome_fencer/circle_c_i/crypto.rb +1 -1
- data/lib/handsome_fencer/circle_c_i/templates/config.job-example.yml +33 -0
- data/lib/handsome_fencer/circle_c_i/templates/config.yml +71 -0
- data/lib/handsome_fencer/circle_c_i/templates/docker-compose.yml +8 -1
- data/lib/handsome_fencer/circle_c_i/templates/docker/containers/web/Dockerfile +1 -1
- data/lib/handsome_fencer/circle_c_i/templates/docker/containers/web/production.env.enc +9 -0
- data/lib/handsome_fencer/circle_c_i/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b56185f4a552339ba52dfc9dd2fd906f20c7f8ca6fff69e859e67689eb3a4aa1
|
4
|
+
data.tar.gz: 337ac939eaa41b5a15978d16ac011a0a921d9911aef46acd981e119469cc8f45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eaf3ca7ea9d8e8dcd637aeb2cd24be464508cc6726e233cb97e8efca372e1fb565d40d0f75b3b28ffcff9efced296307a412916c224309355f5fbe6286d1133
|
7
|
+
data.tar.gz: f6e3be8b59018a2d47c819a5b9044b71ee2dfe645658f92cd666e5b4df80ec3d2441958c069eaf7af4b6cbb22d5d16d2c7be72498fcde9cf819b09d158406a0d
|
@@ -13,8 +13,8 @@ module HandsomeFencer
|
|
13
13
|
copy_file "Gemfile.lock", "Gemfile.lock" unless File.exist? "Gemfile.lock"
|
14
14
|
copy_file "config/database.yml", "config/database.yml"
|
15
15
|
copy_file "gitignore", ".gitignore" unless File.exist? ".gitignore"
|
16
|
-
append_to_file ".gitignore", "
|
17
|
-
append_to_file ".gitignore", "
|
16
|
+
append_to_file ".gitignore", "docker/**/*.env"
|
17
|
+
append_to_file ".gitignore", "docker/**/*.key"
|
18
18
|
append_to_file "docker/containers/database/development.env", "something"
|
19
19
|
end
|
20
20
|
end
|
@@ -19,7 +19,7 @@ module HandsomeFencer
|
|
19
19
|
case
|
20
20
|
when ENV[@deploy_key].nil? && !File.exist?(@dkfile)
|
21
21
|
raise DeployKeyError, "No #{@deploy_key} set. Please generate using '$ handsome_fencer-circle_c_i generate_key :circle' or '$ export
|
22
|
-
ENV[
|
22
|
+
ENV[\"##{options[:evironment]}_KEY\"] = some-complicated-key'"
|
23
23
|
when File.exist?(@dkfile)
|
24
24
|
Base64.decode64(File.read(@dkfile))
|
25
25
|
when !ENV[@deploy_key].nil?
|
@@ -0,0 +1,33 @@
|
|
1
|
+
defaults: &defaults
|
2
|
+
working_directory: /tmp
|
3
|
+
|
4
|
+
version: 2
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
|
8
|
+
build:
|
9
|
+
machine: true
|
10
|
+
steps:
|
11
|
+
- checkout
|
12
|
+
- add_ssh_keys
|
13
|
+
|
14
|
+
- run: gem install handsome_fencer-circle_c_i
|
15
|
+
- run: handsome_fencer-circle_c_i expose circleci
|
16
|
+
- run: handsome_fencer-circle_c_i expose development
|
17
|
+
- run: echo 'source docker/env_files/circleci.env' >> $BASH_ENV
|
18
|
+
- run: docker-compose build
|
19
|
+
- run: docker-compose up -d
|
20
|
+
- run: docker-compose exec app bin/rails db:create db:migrate
|
21
|
+
- run: docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
|
22
|
+
- run:
|
23
|
+
name: Tag app image
|
24
|
+
command: docker tag $(docker images | grep project_app | awk '{ print $3 }') ${DOCKERHUB_ORG_NAME}/${APP_NAME}_app:$DEPLOY_TAG
|
25
|
+
- run:
|
26
|
+
name: Tag web image
|
27
|
+
command: docker tag $(docker images | grep project_web | awk '{ print $3 }') ${DOCKERHUB_ORG_NAME}/${APP_NAME}_web:$DEPLOY_TAG
|
28
|
+
|
29
|
+
|
30
|
+
- run: docker push ${DOCKERHUB_ORG_NAME}/${APP_NAME}_app:$DEPLOY_TAG
|
31
|
+
- run: docker push ${DOCKERHUB_ORG_NAME}/${APP_NAME}_web:$DEPLOY_TAG
|
32
|
+
|
33
|
+
- run: rake --rakefile .circleci/Rakefile
|
@@ -0,0 +1,71 @@
|
|
1
|
+
defaults: &defaults
|
2
|
+
working_directory: /tmp
|
3
|
+
|
4
|
+
version: 2
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
|
8
|
+
build:
|
9
|
+
machine: true
|
10
|
+
steps:
|
11
|
+
- checkout
|
12
|
+
- run: gem install handsome_fencer-circle_c_i
|
13
|
+
- run: handsome_fencer-circle_c_i expose circleci
|
14
|
+
- run: handsome_fencer-circle_c_i expose development
|
15
|
+
- run: echo 'source docker/env_files/circleci.env' >> $BASH_ENV
|
16
|
+
- run: docker-compose build
|
17
|
+
- run: docker-compose up -d
|
18
|
+
- run: docker-compose exec app bin/rails db:create db:migrate
|
19
|
+
|
20
|
+
push:
|
21
|
+
machine: true
|
22
|
+
steps:
|
23
|
+
- checkout
|
24
|
+
- run: gem install handsome_fencer-circle_c_i
|
25
|
+
- run: handsome_fencer-circle_c_i expose circleci
|
26
|
+
- run: handsome_fencer-circle_c_i expose development
|
27
|
+
- run: echo 'source docker/env_files/circleci.env' >> $BASH_ENV
|
28
|
+
- run: docker-compose build
|
29
|
+
- run: docker-compose up -d
|
30
|
+
- run: docker-compose exec app bin/rails db:create db:migrate
|
31
|
+
- run: docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
|
32
|
+
- run:
|
33
|
+
name: Tag app image
|
34
|
+
command: docker tag $(docker images | grep project_app | awk '{ print $3 }') ${DOCKERHUB_ORG_NAME}/${APP_NAME}_app:$DEPLOY_TAG
|
35
|
+
- run:
|
36
|
+
name: Tag web image
|
37
|
+
command: docker tag $(docker images | grep project_web | awk '{ print $3 }') ${DOCKERHUB_ORG_NAME}/${APP_NAME}_web:$DEPLOY_TAG
|
38
|
+
|
39
|
+
|
40
|
+
- run: docker push ${DOCKERHUB_ORG_NAME}/${APP_NAME}_app:$DEPLOY_TAG
|
41
|
+
- run: docker push ${DOCKERHUB_ORG_NAME}/${APP_NAME}_web:$DEPLOY_TAG
|
42
|
+
|
43
|
+
deploy:
|
44
|
+
machine: true
|
45
|
+
steps:
|
46
|
+
- checkout
|
47
|
+
- add_ssh_keys
|
48
|
+
- run: gem install handsome_fencer-circle_c_i
|
49
|
+
- run: handsome_fencer-circle_c_i expose circleci
|
50
|
+
- run: handsome_fencer-circle_c_i expose development
|
51
|
+
- run: echo 'source docker/env_files/circleci.env' >> $BASH_ENV
|
52
|
+
|
53
|
+
- run: rake --rakefile .circleci/Rakefile
|
54
|
+
|
55
|
+
workflows:
|
56
|
+
version: 2
|
57
|
+
build-and-deploy:
|
58
|
+
jobs:
|
59
|
+
- build
|
60
|
+
- push:
|
61
|
+
requires:
|
62
|
+
- build
|
63
|
+
filters:
|
64
|
+
branches:
|
65
|
+
only: master
|
66
|
+
- deploy:
|
67
|
+
requires:
|
68
|
+
- push
|
69
|
+
filters:
|
70
|
+
branches:
|
71
|
+
only: master
|
@@ -1,7 +1,10 @@
|
|
1
1
|
version: '3.1'
|
2
2
|
|
3
3
|
services:
|
4
|
-
|
4
|
+
chrome:
|
5
|
+
image: selenium/standalone-chrome-debug
|
6
|
+
volumes:
|
7
|
+
- /dev/shm:/dev/shm
|
5
8
|
app:
|
6
9
|
build:
|
7
10
|
context: .
|
@@ -33,6 +36,10 @@ services:
|
|
33
36
|
volumes:
|
34
37
|
- database-data:/var/lib/postgresql/data
|
35
38
|
|
39
|
+
web:
|
40
|
+
build:
|
41
|
+
context: .
|
42
|
+
dockerfile: docker/containers/web/Dockerfile
|
36
43
|
volumes:
|
37
44
|
database-data:
|
38
45
|
gem_cache:
|
@@ -11,7 +11,7 @@ RUN mkdir log
|
|
11
11
|
COPY public public/
|
12
12
|
|
13
13
|
# Copy Nginx config template
|
14
|
-
COPY
|
14
|
+
COPY docker/containers/web/app.conf /tmp/docker_example.nginx
|
15
15
|
|
16
16
|
# substitute variable references in the Nginx config template for real values from the environment
|
17
17
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
ortOJDNNR0mHvJFDoEHTWE8HrE+dJ1BQypXQvz+aY1Cy4no+HHrJZwZJxddZ
|
2
|
+
9Vxd+6BTblPsEiSFpaBz/K08AlRrH0CZBG5AvxZUEJe79OtDdcssuFOQJ6fW
|
3
|
+
hu6+8jnXCKnZK4Jq2n13lW/PuWQO7I4n1/Q0DvnTLZmWZ+bW7w2h1D9W0GeJ
|
4
|
+
C1PjBWehn3Mxx46rl0bPA+u9U2/4+46DE0wxcHSLDz5Y7IN2COEpAHZyyddB
|
5
|
+
NBXS9K9I4ugBXiTRbcdTqQiAlnLHK2mAUjVx5Xz/O2FqiDbS5sbmZTp/eFbJ
|
6
|
+
IdCdLIt3v5I8nQ9/zv9U0dBWk5VBM9/6LUSTXv6ImaTWzeQgIup5oovwvpoD
|
7
|
+
WONaPjBph/JxylpV30VvmoO3aJYujiLp/ODGeXfG+LsC8dm1ARK/Ze+CfH6R
|
8
|
+
gyiT5M4vOOeY7TFiFka6BdQyBktwlr8fDadQIklgcVm28mYsITdap+CIj4MJ
|
9
|
+
HYm7erlKzic=
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handsome_fencer-circle_c_i
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- schadenfred
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sshkit
|
@@ -123,6 +123,8 @@ files:
|
|
123
123
|
- lib/handsome_fencer/circle_c_i/templates/Gemfile.lock
|
124
124
|
- lib/handsome_fencer/circle_c_i/templates/circleci/config.yml
|
125
125
|
- lib/handsome_fencer/circle_c_i/templates/circleci/config.yml.workflow-example
|
126
|
+
- lib/handsome_fencer/circle_c_i/templates/config.job-example.yml
|
127
|
+
- lib/handsome_fencer/circle_c_i/templates/config.yml
|
126
128
|
- lib/handsome_fencer/circle_c_i/templates/config/database.yml
|
127
129
|
- lib/handsome_fencer/circle_c_i/templates/docker-compose.yml
|
128
130
|
- lib/handsome_fencer/circle_c_i/templates/docker/containers/app/Dockerfile
|
@@ -133,6 +135,7 @@ files:
|
|
133
135
|
- lib/handsome_fencer/circle_c_i/templates/docker/containers/web/Dockerfile
|
134
136
|
- lib/handsome_fencer/circle_c_i/templates/docker/containers/web/app.conf
|
135
137
|
- lib/handsome_fencer/circle_c_i/templates/docker/containers/web/production.env
|
138
|
+
- lib/handsome_fencer/circle_c_i/templates/docker/containers/web/production.env.enc
|
136
139
|
- lib/handsome_fencer/circle_c_i/templates/docker/env_files/circleci.env
|
137
140
|
- lib/handsome_fencer/circle_c_i/templates/docker/keys/circle.key
|
138
141
|
- lib/handsome_fencer/circle_c_i/templates/docker/keys/development.key
|