Skip to content

Commit

Permalink
Issues/49 (#62)
Browse files Browse the repository at this point in the history
* chore: upgrading the examples to the newest hugo version

* chore: updating the default values in the descriptions of the html-proofer

* fix: removing trailling spaces

* chore: updating the hugo orb to match orb-tools-orb latest version

* chore: upgrade the hugo orb to follow orb-tools-orb version 12

* chore: updating the test-deploy yaml to be compatible with orb tools orb 12

* fix: fixing the way publish is called in the test yaml

* fix: checking which command is being run to debug

* fix: debugging bash script

* fix: debugging using echo

* fix: updating hugo version for tests

* fix: fixing the way hugo is being called

* fix: fixing the hugo executor with a newer version of both go and hugo

* fix: fixing bad reference for cimg/go version tag

* fix: fixing the way the hugo/executor is being called

* fix: using shallow clones

* fix: update macos test

* fix: updating the resource class given that the job seems to need more memory

* fix: updating resource class to medium+

* fix: upgrading the resource class to large

* fix: xlarge resource

* fix: updating executor to entrypoint instead of command

* fix: removed hugo specified version

* fix: changing the way to install hugo

* fix: updating the docker image to be used which already has a hugo binary installed

* fix: fixing the hugo executor

* fix: typo in the name of the excutor docker image
  • Loading branch information
david-montano-circleci authored Jan 23, 2025
1 parent 440d0c6 commit 48c070d
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 39 deletions.
21 changes: 7 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2.1
setup: true
orbs:
orb-tools: circleci/orb-tools@11.5
shellcheck: circleci/shellcheck@3.1
orb-tools: circleci/orb-tools@12.3.0
shellcheck: circleci/shellcheck@3.3.0

filters: &filters
tags:
Expand All @@ -16,20 +16,13 @@ workflows:
- orb-tools/pack:
filters: *filters
- orb-tools/review:
exclude: RC010
filters: *filters
- shellcheck/check:
filters: *filters
- orb-tools/publish:
orb-name: circleci/hugo
vcs-type: << pipeline.project.type >>
requires:
[orb-tools/lint, orb-tools/review, orb-tools/pack, shellcheck/check]
# Use a context to hold your publishing token.
context: orb-publisher
filters: *filters
# Triggers the next workflow in the Orb Development Kit.
- orb-tools/continue:
pipeline-number: << pipeline.number >>
vcs-type: << pipeline.project.type >>
requires: [orb-tools/publish]
orb_name: hugo
pipeline_number: << pipeline.number >>
vcs_type: << pipeline.project.type >>
requires: [orb-tools/lint, orb-tools/pack, orb-tools/review, shellcheck/check]
filters: *filters
31 changes: 19 additions & 12 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
version: 2.1
orbs:
hugo: circleci/hugo@dev:<<pipeline.git.revision>>
orb-tools: circleci/[email protected]
hugo: {}
orb-tools: circleci/[email protected]

filters: &filters
tags:
only: /.*/

release-filters: &release-filters
branches:
ignore: /.*/
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/

jobs:
integration-test-hugo:
executor:
name: hugo/default
tag: "0.120.4"
steps:
- run:
name: "Check out Hugo Docs as a sample project."
command: |
git clone "https://github.com/gohugoio/hugoDocs.git" ~/project
git clone --depth=1 "https://github.com/gohugoio/hugoDocs.git" ~/project
rm ~/project/content/en/content-management/related.md
- hugo/hugo-build
- run:
Expand All @@ -27,25 +34,25 @@ jobs:
- run:
name: "Check out Hugo Docs as a sample project."
command: |
git clone "https://github.com/gohugoio/hugoDocs.git" ~/project
git clone --depth=1 "https://github.com/gohugoio/hugoDocs.git" ~/project
rm ~/project/content/en/content-management/related.md
- hugo/install:
version: "0.120.4"
version: "0.142.0"
- hugo/hugo-build
- run:
name: "Basic Test"
command: hugo version
integration-test-macos:
macos:
xcode: 14.1.0
xcode: 16.2.0
steps:
- run:
name: "Check out Hugo Docs as a sample project."
command: |
git clone "https://github.com/gohugoio/hugoDocs.git" ~/project
git clone --depth=1 "https://github.com/gohugoio/hugoDocs.git" ~/project
rm ~/project/content/en/content-management/related.md
- hugo/install:
version: "0.120.4"
version: "0.142.0"
- hugo/hugo-build
- run:
name: "Basic Test"
Expand All @@ -63,9 +70,9 @@ workflows:
- orb-tools/pack:
filters: *filters
- orb-tools/publish:
orb-name: circleci/hugo
vcs-type: << pipeline.project.type >>
pub-type: production
orb_name: circleci/hugo
vcs_type: << pipeline.project.type >>
pub_type: production
requires:
- orb-tools/pack
- integration-test-hugo
Expand Down
2 changes: 1 addition & 1 deletion src/@orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ display:
home_url: "https://gohugo.io/"

orbs:
detect: circleci/os-detect@0.2
detect: circleci/os-detect@0.3.0
4 changes: 2 additions & 2 deletions src/commands/html-proofer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ parameters:
check-html:
description: "Enables HTML validation errors from Nokogiri (default: `false`)."
type: boolean
default: true
default: false
check-img-http:
description: "Fails an image if it's marked as `http` (default: `false`)."
type: boolean
Expand All @@ -62,7 +62,7 @@ parameters:
disable-external:
description: "If `true`, does not run the external link checker, which can take a lot of time (default: `false`)"
type: boolean
default: true
default: false
empty-alt-ignore:
description: "If `true`, ignores images with empty alt tags"
type: boolean
Expand Down
4 changes: 2 additions & 2 deletions src/examples/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ description: |
usage:
version: 2.1
orbs:
hugo: circleci/hugo@0.2
hugo: circleci/hugo@1.3.1
workflows:
main:
jobs:
- hugo/build:
version: "0.55"
version: "0.141.0"
source: "src/"
html-proofer: true
- deploy:
Expand Down
4 changes: 2 additions & 2 deletions src/examples/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ description: |
usage:
version: 2.1
orbs:
hugo: circleci/hugo@0.1
hugo: circleci/hugo@1.3.1
workflows:
main:
jobs:
- hugo/build:
version: "0.55"
version: "0.141.0"
html-proofer: true
8 changes: 4 additions & 4 deletions src/executors/default.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
description: "The cibuilds/hugo Docker image."
parameters:
tag:
description: "The `cibuilds/hugo` Docker image version tag."
hugo_version:
description: "Specifies the hugo version to install"
type: string
default: "latest"
default: "0.142.0"
docker:
- image: cibuilds/hugo:<< parameters.tag >>
- image: cibuilds/hugo:<< parameters.hugo_version >>
2 changes: 1 addition & 1 deletion src/jobs/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
description: "Build a site with Hugo."
executor:
name: default
tag: << parameters.version >>
hugo_version: << parameters.version >>
parameters:
version:
description: "Hugo version to use. Defaults to latest."
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/hugo-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ ORB_EVAL_HUGO_ENV=$(eval echo "${ORB_EVAL_HUGO_ENV}")
ORB_EVAL_HUGO_EXTRA_FLAGS=$(eval echo "${ORB_EVAL_HUGO_EXTRA_FLAGS}")

export HUGO_ENV="${ORB_EVAL_HUGO_ENV}"
hugo -v -s "${ORB_EVAL_SOURCE}" -d "${ORB_EVAL_DESTINATION}" "${ORB_EVAL_HUGO_EXTRA_FLAGS}"

hugo build -s "${ORB_EVAL_SOURCE}" -d "${ORB_EVAL_DESTINATION}" "${ORB_EVAL_HUGO_EXTRA_FLAGS}"

0 comments on commit 48c070d

Please sign in to comment.