Welcome to mirror list, hosted at ThFree Co, Russian Federation.

config.yml « .circleci - github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2162cdfdb44baad1b842273510613624452eb12d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
version: 2.1
executors:
  castanet-tests:
    docker:
      - image: cibuilds/hugo:0.91.2
        auth:
          username: mattstratton
          password: $DOCKERHUB_PASSWORD
    working_directory: ~/castanet

jobs:
  build:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Run hugo against default config"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/public --themesDir ../.. --theme=castanet --buildDrafts=false

  test-blue-grid:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test blue-grid"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/blue-grid --config ../test/blue-grid-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-blue-row-jumbo-false:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test blue-row-jumbo-false"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/blue-row-jumbo-false --config ../test/blue-row-jumbo-false-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-blue-row-jumbo-true:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test blue-row-jumbo-true"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/blue-row-jumbo-true --config ../test/blue-row-jumbo-true-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-blue-row-no-jumbo:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test blue-row-no-jumbo"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/blue-row-no-jumbo --config ../test/blue-row-no-jumbo-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-orange-grid:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test orange-grid"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/orange-grid --config ../test/orange-grid-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-orange-row:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test orange-row"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/orange-row --config ../test/orange-row-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-orange-row-jumbo:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test orange-row-jumbo"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/orange-row-jumbo --config ../test/orange-row-jumbo-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-grey-grid:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test grey-grid"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/grey-grid --config ../test/grey-grid-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-grey-row:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test grey-row"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/grey-row --config ../test/grey-row-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  test-grey-row-jumbo:
    executor: castanet-tests
    steps:
      - checkout
      - run:
          name: "Test grey-row-jumbo"
          command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/grey-row-jumbo --config ../test/grey-row-jumbo-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false

  create-release:
    docker:
      - image: cibuilds/github:0.13.0
        auth:
          username: mattstratton
          password: $DOCKERHUB_PASSWORD
    working_directory: ~/castanet

    steps:
      - run:
          name: Avoid hosts unknown for github
          command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
      - run:
          name: "Checkout tag"
          command: git clone --branch "${CIRCLE_TAG}" --depth 1 "${CIRCLE_REPOSITORY_URL}"
      - run:
          name: "Create zip file for release"
          command: | 
            mkdir -p release
            ls
            pwd
            zip -r release/castanet-${CIRCLE_TAG}.zip . -x \*.git\* \*exampleSite\* appveyor.yml \*.circleci\* \*tests\* \*bin\* \*build\* \*release\* config.codekit3 \*node_modules\* gulpfile.js netlify.toml package.json STYLE.md *\node_modules\* \*test\*
      - run:
          name: "Publish release on GitHub"
          command: |
            VERSION=${CIRCLE_TAG}
            ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION}  ./release/


  # publish-github-release:
  #   docker:
  #     - image: cibuilds/github:0.13.0
  #   working_directory: castanet

  #   steps:
  #     - attach_workspace:
  #         at: ~/castanet/workspace
  #     - run:
  #         name: "List contents"
  #         command: pwd && ls
  #     - run:
  #         name: "Publish release on GitHub"
  #         command: |
  #           VERSION=${CIRCLE_TAG}
  #           ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION}  ~/castanet/workspace/release/

workflows:
  version: 2
  build-test:
    jobs:
      - build
      - test-blue-grid:
          requires:
            - build
      - test-blue-row-jumbo-false:
          requires:
            - build
      - test-blue-row-jumbo-true:
          requires:
            - build
      - test-blue-row-no-jumbo:
          requires:
            - build
      - test-orange-grid:
          requires:
            - build
      - test-orange-row:
          requires:
            - build
      - test-orange-row-jumbo:
          requires:
            - build
      - test-grey-grid:
          requires:
            - build
      - test-grey-row:
          requires:
            - build
      - test-grey-row-jumbo:
          requires:
            - build
  deploy:
    jobs:
      - create-release:
          filters:
            tags:
              only: /^\d+\.\d+\.\d+$/
            branches:
              ignore: /.*/