Skip to content

Commit

Permalink
chore(linter): fix yaml linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
syu-w committed Dec 11, 2023
1 parent ae79c31 commit 1af8c53
Show file tree
Hide file tree
Showing 49 changed files with 153 additions and 165 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ body:
render: shell
validations:
required: true

2 changes: 1 addition & 1 deletion .github/workflows/snap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]
then
echo "branch=pr-${{ github.event.number }}" >> "$GITHUB_OUTPUT"
echo "branch=pr-${{ github.event.number }}" >> "$GITHUB_OUTPUT"
else
branch=$(echo ${GITHUB_REF#refs/*/} | sed -e 's|feature/\(.*\)|\1|')
echo "branch=$branch" >> "$GITHUB_OUTPUT"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/spread-large.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Spread (large)
on:
pull_request:
types: [ labeled ]
types: [labeled]
schedule:
- cron: "0 2 * * 0,3" # run at 2 AM on Sundays and Wednesdays
- cron: "0 2 * * 0,3" # run at 2 AM on Sundays and Wednesdays

jobs:
snap-build:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,3 @@ jobs:
- name: Run integration tests
run: |
make test-integrations
6 changes: 3 additions & 3 deletions docs/how-to/code/build-docs/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: test the "Build the docs" guide
Expand All @@ -16,7 +16,7 @@ execute: |
# [docs:install-deps]
make installdocs
# [docs:install-deps-end]
# [docs:make-docs]
make docs # the home page can be found at docs/_build/html/index.html
# [docs:make-docs-end]
Expand Down
7 changes: 3 additions & 4 deletions docs/how-to/code/convert-to-pebble-layer/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ base: "[email protected]"
version: latest
summary: An NGINX rock
description: |
A rock equivalent of the official NGINX Docker image from Docker Hub.
A rock equivalent of the official NGINX Docker image from Docker Hub.
license: Apache-2.0
platforms:
amd64:
amd64:

package-repositories:
- type: apt
url: https://nginx.org/packages/mainline/ubuntu
key-id: 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
suites:
suites:
- jammy
components:
- nginx
Expand Down Expand Up @@ -49,4 +49,3 @@ services:
environment:
TZ: UTC
on-failure: shutdown

6 changes: 3 additions & 3 deletions docs/how-to/code/convert-to-pebble-layer/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: test the "How to convert a popular entrypoint to a Pebble layer" guide
Expand All @@ -27,4 +27,4 @@ execute: |
# [docs:curl-end]
docker rm -f nginx-pebble-service
docker rmi -f custom-nginx-rock:latest
docker rmi -f custom-nginx-rock:latest
8 changes: 4 additions & 4 deletions docs/how-to/code/create-slice/openssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package: openssl
slices:
bins:
essential:
- libc6_libs
- libc6_config
- libssl3_libs
- openssl_config
- libc6_libs
- libc6_config
- libssl3_libs
- openssl_config
contents:
/usr/bin/c_rehash:
/usr/bin/openssl:
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/code/create-slice/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: test the "Create a package slice for Chisel" guide
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/code/get-started/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: test the steps for getting started with Rockcraft
Expand All @@ -13,7 +13,7 @@ execute: |
# [docs:snap-version-end]
# [docs:lxd-version]
lxd --version
lxd --version
# [docs:lxd-version-end]
# [docs:lxd-status]
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/code/install-slice/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: test the "Install a custom package slice" guide
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/code/publish-slice/task.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: test the "Release a slice definitions file" guide

execute: |
git clone -b ubuntu-22.04 https://github.com/canonical/chisel-releases.git
# [docs:new-branch]
cd chisel-releases
git checkout -b create-openssl-bins-slice
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/code/rockcraft-pack-action/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: test the "Use the GitHub Action" guide
Expand All @@ -11,4 +11,4 @@ prepare: |
tests.pkgs install yamllint
execute: |
yamllint rockcraft-pack.yaml
yamllint rockcraft-pack.yaml
1 change: 0 additions & 1 deletion docs/reference/code/example/task.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

summary: Check that we can build the example rockcraft.yaml

execute: |
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/code/chisel/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: test for the "Install packages slices into a rock" tutorial
Expand All @@ -15,7 +15,7 @@ execute: |
# [docs:build-rock]
rockcraft pack
# [docs:build-rock-end]
test -f chisel-openssl_0.0.1_amd64.rock
# [docs:skopeo-copy]
Expand All @@ -29,5 +29,5 @@ execute: |
# [docs:docker-run-with-args]
docker run --rm chisel-openssl exec --env=SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt openssl s_client -connect ubuntu.com:443 -brief
# [docs:docker-run-with-args-end]
docker run --rm chisel-openssl exec --env=SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt openssl s_client -connect ubuntu.com:443 -brief 2>&1 | grep "Verification: OK"
6 changes: 3 additions & 3 deletions docs/tutorials/code/hello-world/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: hello world tutorial
Expand Down Expand Up @@ -36,5 +36,5 @@ execute: |
# [docs:docker-run]
docker run --rm hello:1.0 exec hello -t
# [docs:docker-run-end]
docker run --rm hello:1.0 exec hello -t | grep "hello, world"
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ parts:
stage-packages:
- base-files_base
- dotnet-runtime-6.0_libs

# Based on requirement R4, create the symbolic link
override-prime: |
craftctl default
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials/code/migrate-to-chiselled-rock/task.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
###########################################
# IMPORTANT
# Comments matter!
# The docs use the wrapping comments as
# markers for including said instructions
# The docs use the wrapping comments as
# markers for including said instructions
# as snippets in the docs.
###########################################
summary: docker image migration tutorial
Expand All @@ -21,7 +21,7 @@ execute: |
# [docs:build-docker-image]
docker build -t dotnet-runtime:reference .
# [docs:build-docker-image-end]
popd
# [docs:inspect-docker-image]
Expand All @@ -48,15 +48,15 @@ execute: |
# [docs:skopeo-copy]
sudo /snap/rockcraft/current/bin/skopeo --insecure-policy copy oci-archive:dotnet-runtime_chiselled_amd64.rock docker-daemon:dotnet-runtime:chiselled
# [docs:skopeo-copy-end]
# [docs:inspect-rock]
docker images dotnet-runtime:chiselled
# [docs:inspect-rock-end]
# [docs:run-rock]
docker run --rm dotnet-runtime:chiselled exec dotnet --info
# [docs:run-rock-end]
restore: |
rm dotnet-runtime_chiselled_amd64.rock
docker rmi -f dotnet-runtime:chiselled dotnet-runtime:reference
24 changes: 12 additions & 12 deletions docs/tutorials/code/node-app/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ platforms:
amd64:

services:
app:
override: replace
command: node server.js
startup: enabled
on-success: shutdown
on-failure: shutdown
working-dir: /lib/node_modules/node_web_app
app:
override: replace
command: node server.js
startup: enabled
on-success: shutdown
on-failure: shutdown
working-dir: /lib/node_modules/node_web_app

parts:
app:
plugin: npm
npm-include-node: True
npm-node-version: "21.1.0"
source: src/
app:
plugin: npm
npm-include-node: true
npm-node-version: "21.1.0"
source: src/
1 change: 0 additions & 1 deletion docs/tutorials/code/node-app/task.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

summary: nodejs tutorial

execute: |
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/code/pyfiglet/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ execute: |
# [docs:create-pyfiglet-dir]
mkdir pyfiglet-rock && cd pyfiglet-rock
# [docs:create-pyfiglet-dir-end]
cp ../rockcraft.yaml .
# [docs:build-rock]
rockcraft pack
# [docs:build-rock-end]
# [docs:build-rock-end]
# [docs:skopeo-copy]
sudo /snap/rockcraft/current/bin/skopeo --insecure-policy copy oci-archive:pyfiglet_0.7.6_amd64.rock docker-daemon:pyfiglet:0.7.6
Expand Down
Loading

0 comments on commit 1af8c53

Please sign in to comment.