Skip to content

Instantly share code, notes, and snippets.

@makotom
Last active April 23, 2020 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makotom/0c381899e9cc86ee79e56086dc44b247 to your computer and use it in GitHub Desktop.
Save makotom/0c381899e9cc86ee79e56086dc44b247 to your computer and use it in GitHub Desktop.
{
"jobs": {
"build": {
"docker": [
{
"image": "archlinux:latest"
}
],
"steps": [
{
"run": {
"command": "echo '\u003c!doctype html\u003e\u003chtml lang=\"en\"\u003e\u003cmeta charset=\"UTF-8\"\u003e\u003ctitle\u003eHello world!\u003c/title\u003eHello!' \u003e index.html",
"name": "Building the app"
}
},
{
"store_artifacts": {
"path": "index.html"
}
},
{
"persist_to_workspace": {
"paths": [
"./"
],
"root": "./"
}
}
]
},
"validate": {
"docker": [
{
"image": "validator/validator:latest"
}
],
"steps": [
{
"run": "apt update"
},
{
"run": "apt -y install ca-certificates"
},
{
"attach_workspace": {
"at": "./"
}
},
{
"run": "/vnu-runtime-image/bin/vnu index.html"
}
]
}
},
"version": 2,
"workflows": {
"build-test-deploy": {
"jobs": [
"build",
{
"validate": {
"requires": [
"build"
]
}
}
]
},
"version": 2
}
}
version: 2
jobs:
build:
docker:
- image: archlinux:latest
steps:
- run:
name: Building the app
command: echo '<!doctype html><html lang="en"><meta charset="UTF-8"><title>Hello world!</title>Hello!' > index.html
- store_artifacts:
path: index.html
- persist_to_workspace:
root: ./
paths:
- ./
validate:
docker:
- image: validator/validator:latest
steps:
- run: apt update
- run: apt -y install ca-certificates
- attach_workspace:
at: ./
- run: /vnu-runtime-image/bin/vnu index.html
workflows:
version: 2
build-test-deploy:
jobs:
- build
- validate:
requires:
- build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment