-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from CircleCI-Public/testdata
Add testdata for integration testing collapse command
- Loading branch information
Showing
46 changed files
with
1,195 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,42 +2,24 @@ | |
|
||
This project is the seed for CircleCI's new command-line application. | ||
|
||
## Requirements | ||
|
||
* Go 1.10+ | ||
* Make | ||
* ... | ||
|
||
## Getting Started | ||
|
||
You should already have [installed Go](https://golang.org/doc/install) and setup your [workspace](https://golang.org/doc/code.html#Workspaces). | ||
|
||
This includes setting a valid `$GOPATH`. | ||
|
||
### 1. Get the repo | ||
|
||
TODO: make this easier once repo is public | ||
### 1. Get the latest binary | ||
|
||
``` | ||
# Setup circleci source in your $GOPATH | ||
$ mkdir -p $GOPATH/src/github.com/circleci | ||
$ cd $GOPATH/src/github.com/circleci | ||
# Clone the repo | ||
$ git clone [email protected]/circleci/circleci-cli | ||
$ cd circleci-cli | ||
``` | ||
Download the [latest release](https://github.com/CircleCI-Public/circleci-cli/releases/latest) from GitHub for your operating system. If you're on a Mac, this would be `circleci-cli_0.1.X_darwin_amd64.tar.gz`. | ||
|
||
### 2. Build the binary | ||
### 2. Put the binary in your $PATH | ||
|
||
``` | ||
$ make | ||
$ tar -xvzf circleci-cli_0.1.X_darwin_amd64.tar.gz | ||
$ mv circleci-beta /usr/local/bin | ||
``` | ||
|
||
### 3. Run Diagnostic check | ||
### 3. Run a Diagnostic check | ||
|
||
``` | ||
$ ./build/target/darwin/amd64/circleci-cli diagnostic | ||
$ circleci-beta diagnostic | ||
Please enter your CircleCI API token: | ||
OK. | ||
|
@@ -88,7 +70,7 @@ fragment FullType on __Type { | |
You can now pipe that file to the `query` command to send it. | ||
|
||
``` | ||
$ cat query.gql | ./build/target/darwin/amd64/circleci-cli query | ||
$ cat query.gql | circleci-beta query | ||
``` | ||
|
||
This should pretty-print back a JSON response from the server: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
workflows: | ||
foo: | ||
jobs: | ||
- hugo/build |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# The hugo orb | ||
|
||
I'm just here to make sure we don't try to parse this markdown file as yaml. |
24 changes: 24 additions & 0 deletions
24
cmd/testdata/hugo-collapse/.circleci/orbs/hugo/commands/build-hugo.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
description: "Runs the `hugo` CLI against a given source (default: current path) in a given env (default: production)" | ||
parameters: | ||
env: | ||
description: "Passed in as the value of HUGO_ENV prior to running the hugo command" | ||
type: string | ||
default: "production" | ||
source: | ||
description: "a file path, relative to the root of your working directory, where your hugo root is. (passed as the value of the `-s` flag to hugo)" | ||
type: string | ||
default: "." | ||
update-submodules: | ||
description: "Boolean for whether to update git submodules." | ||
type: boolean | ||
default: false | ||
steps: | ||
- when: | ||
condition: << parameters.update-submodules >> | ||
steps: | ||
- run: | ||
name: "Get submodules to refresh themes" | ||
command: git submodule update --init --recursive | ||
- run: | ||
name: "Build site with hugo" | ||
command: HUGO_ENV=<< parameters.env >> hugo -v -s << parameters.source >> |
8 changes: 8 additions & 0 deletions
8
cmd/testdata/hugo-collapse/.circleci/orbs/hugo/commands/html-proofer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
parameters: | ||
path: | ||
type: string | ||
description: "Path to the directory containing the published site, relative to the execution environment root." | ||
steps: | ||
- run: | ||
name: "Run HTML Proofer to check for good html and such" | ||
command: htmlproofer << parameters.path>> --allow-hash-href --check-html --empty-alt-ignore --disable-external |
34 changes: 34 additions & 0 deletions
34
cmd/testdata/hugo-collapse/.circleci/orbs/hugo/jobs/build.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
parameters: | ||
source: | ||
description: "a file path, relative to the root of your working directory, where your hugo root is. (passed as the value of the `-s` flag to hugo)" | ||
default: "." | ||
type: string | ||
publishdir: | ||
description: "Hugo sets the name of your publish Dir inside the site config, not as a CLI argument. Most people leave this to the default value of `public`, so that's what we do here. In most case you don't need to change this value." | ||
default: "public" | ||
type: string | ||
html-proofer: | ||
description: "Boolean value for whether to run the HTML Proofer. Set to `false` to stop the default behavior of running the proofer." | ||
type: boolean | ||
default: true | ||
persist_to_workspace: | ||
description: "Boolean value for whether to persist to a workspace drawing from the `parameters.source` as root and `parameters.publishdir` as the path." | ||
type: boolean | ||
default: true | ||
executor: default | ||
steps: | ||
- checkout | ||
- build-hugo: | ||
source: "<< parameters.source >>" | ||
- when: | ||
condition: << parameters.html-proofer >> | ||
steps: | ||
- html-proofer: | ||
- path: "<< parameters.source >>/<< parameters.publishdir >>" | ||
- when: | ||
condition: << parameters.persist_to_workspace >> | ||
steps: | ||
- persist_to_workspace: | ||
root: "<< parameters.source >>" | ||
paths: | ||
- "<< parameters.publishdir >>" |
Oops, something went wrong.