Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0450ac5
refactor(ci): split verify jobs in verify.yml
Aug 14, 2022
838c2e2
fix(ci): add parameters keyword to continuation orb
Aug 14, 2022
85973b7
fix(ci): remove double quotes from parameter
Aug 14, 2022
b786151
fix(ci): add missing single quotes to JSON object
Aug 14, 2022
537b634
fix(ci): add missing quotes in continuation orb params
Aug 14, 2022
f382740
fix(ci): change wrong path to verify.yml file
Aug 14, 2022
f4b7aaa
fix(ci): add missing default value to executor param
Aug 14, 2022
bb08b64
refactor(ci): incapsulate verify inside job
Aug 14, 2022
6a1db9b
fix(ci): add continuation missing executor
Aug 14, 2022
5b4f7ea
fix(ci): add missing checkout on verify
Aug 14, 2022
160719a
fix(ci): add missing executors in verify.yml
Aug 14, 2022
05d8bdb
refactor(ci): split workflows using continuation API
Aug 14, 2022
e585411
fix(ci): fix ci's keys errors
Aug 14, 2022
17f3a09
fix(ci): add missing steps in commands section
Aug 14, 2022
8b119e5
fix(ci): change wrong tests job name
Aug 14, 2022
9a25fea
fix(ci): add missing build job in deploy workflow
Aug 14, 2022
81d7adb
refactor(scripts): change npm script install
Aug 15, 2022
b6700a7
feat(scripts): add base verify in verify script
Aug 15, 2022
4c5bc3f
feat(scripts): add bats install script
Aug 15, 2022
5ab544e
feat(scripts): add update script
Aug 15, 2022
9e88171
feat(ci): filter verify jobs based on workflow
Aug 15, 2022
da35f13
fix(ci): change build param default value to false
Aug 15, 2022
25e49f9
fix(ci): add missing command keyword in verify job
Aug 15, 2022
da8fa89
fix(ci): add missing filters to deploy and publish workflows
Aug 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 13 additions & 173 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,181 +5,21 @@ setup: true
orbs:
path-filtering: circleci/path-filtering@0.1.3

executors:
build-environment:
docker:
- image: alpine:3.16

deploy-environment:
docker:
- image: node:18.7.0-alpine3.16

publish-environment:
docker:
- image: alpine:3.16

jobs:
verify-build-environment:
executor: build-environment

steps:
- checkout

- run:
name: Verify Environment
command: |
apk update
sh scripts/install/bash.sh $BLOG_BUILD_ENV
bash scripts/ci/verify.sh build

verify-deploy-environment:
executor: deploy-environment

steps:
- checkout

- run:
name: Verify Environment
command: |
apk update
sh scripts/install/bash.sh $BLOG_BUILD_ENV
bash scripts/ci/verify.sh deploy

verify-publish-environment:
executor: publish-environment

steps:
- checkout

- run:
name: Verify Environment
command: |
apk update
sh scripts/install/bash.sh $BLOG_BUILD_ENV
bash scripts/ci/verify.sh publish

build:
executor: build-environment

steps:
- checkout

- run:
name: Install Packages

command: |
apk update
sh scripts/install/bash.sh $BLOG_BUILD_ENV
bash scripts/install/make.sh
make install-git env=$BLOG_BUILD_ENV
make install-hugo

- run:
name: Add Git Submodules
command: make git-submodules env=$BLOG_BUILD_ENV

- run:
name: Building Site
command: make build-ci

- when:
condition:
equal: [ main, << pipeline.git.branch >>]

steps:
- persist_to_workspace:
root: .

paths:
- ./public

deploy:
executor: deploy-environment

steps:
- checkout

- attach_workspace:
at: .

- run:
name: Install Packages

command: |
apk update
sh scripts/install/bash.sh $BLOG_BUILD_ENV
bash scripts/install/make.sh
make install-npm
make install-netlify-cli

- run:
name: Deploy To Netlify
command: make deploy-ci id=$NETLIFY_SITE_ID token=$NETLIFY_ACCESS_TOKEN

publish:
executor: publish-environment

steps:
- checkout

- setup_remote_docker:
docker_layer_caching: true
version: 20.10.14

- run:
name: Install Packages
command: |
apk update
sh scripts/install/bash.sh $BLOG_BUILD_ENV
bash scripts/install/make.sh
make install-docker-cli

- run:
name: Publish To Docker Hub
command: make publish-ci tag=$CIRCLE_TAG username=$DOCKER_USERNAME token=$DOCKER_ACCESS_TOKEN

workflows:
main:
setup:
jobs:
- verify-build-environment

- verify-deploy-environment:
filters:
branches:
only:
- main

- verify-publish-environment:
filters:
branches:
only:
- main

- build

- path-filtering/filter:
name: watchtower

mapping: |
tests/.* run-tests-jobs true

name: workflows
base-revision: main
config-path: .circleci/watchtower.yml

- deploy:
requires:
- build

filters:
branches:
only:
- main
config-path: .circleci/workflows.yml

- publish:
filters:
tags:
only:
- /.*/

branches:
ignore: /.*/
mapping: |
tests/.* test true
data/.* build true
i18n/.* build true
static/.* build true
content/.* build true
layouts/.* build true
resources/.* build true
archetypes/.* build true
config.toml/.* build true
72 changes: 0 additions & 72 deletions .circleci/watchtower.yml

This file was deleted.

Loading