Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(linter): fix some format errors #446

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
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

12 changes: 7 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Rockcraft
Purpose
-------

Tool to create OCI Images using the language from `Snapcraft`_ and `Charmcraft`_.
Tool to create OCI Images using the language from `Snapcraft`_ and
`Charmcraft`_.

.. _Snapcraft: https://snapcraft.io

Expand Down Expand Up @@ -44,13 +45,14 @@ https://canonical-rockcraft.readthedocs-hosted.com/
:target: https://snapcraft.io/rockcraft



Testing
-------

In addition to unit tests in :code:`tests/unit`, which can be run with :code:`make test-units`,
a number of integrated tests in :code:`tests/spread` can be run with `Spread`_. See the
`general notes`_ and take note of these ``rockcraft``-specific instructions:
In addition to unit tests in :code:`tests/unit`, which can be run with
:code:`make test-units`, a number of integrated tests in :code:`tests/spread`
can be run with `Spread`_. See the `general notes`_ and take note of these
``rockcraft``-specific instructions:

* Initialize/update git submodules to fetch Spread-related helper scripts:

Expand Down
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
32 changes: 16 additions & 16 deletions docs/how-to/code/create-slice/openssl.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package: openssl
slices:
bins:
essential:
- libc6_libs
- libc6_config
- libssl3_libs
- openssl_config
contents:
/usr/bin/c_rehash:
/usr/bin/openssl:
bins:
essential:
- libc6_libs
- libc6_config
- libssl3_libs
- openssl_config
contents:
/usr/bin/c_rehash:
/usr/bin/openssl:

config:
contents:
/etc/ssl/private/:
/etc/ssl/openssl.cnf:
/usr/lib/ssl/certs:
/usr/lib/ssl/openssl.cnf:
/usr/lib/ssl/private:
config:
contents:
/etc/ssl/private/:
/etc/ssl/openssl.cnf:
/usr/lib/ssl/certs:
/usr/lib/ssl/openssl.cnf:
/usr/lib/ssl/private:
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
18 changes: 9 additions & 9 deletions docs/how-to/code/install-slice/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ build_base: "[email protected]"
version: '0.0.1'
summary: A chiselled rock with a custom OpenSSL slice
description: |
A rock containing only the binaries (and corresponding dependencies) from the OpenSSL package.
Built from a custom Chisel release.
A rock containing only the binaries (and corresponding dependencies) from the OpenSSL package.
Built from a custom Chisel release.
license: GPL-3.0
platforms:
amd64:
amd64:
parts:
build-context:
plugin: nil
source: chisel-releases/
source-type: local
override-build:
chisel cut --release ./ --root ${CRAFT_PART_INSTALL} openssl_bins
build-context:
plugin: nil
source: chisel-releases/
source-type: local
override-build:
chisel cut --release ./ --root ${CRAFT_PART_INSTALL} openssl_bins
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
Loading