From c7f492ab20504359b6a059fa66548f6c5f9a42e3 Mon Sep 17 00:00:00 2001 From: Justin Ross Date: Sat, 13 Jan 2024 11:04:14 -0500 Subject: [PATCH] Update Skewer --- .plano.py | 21 +++++++++++++- external/skewer-main/README.md | 18 +++++++----- .../skewer-main/external/plano-main/bin/plano | 5 +--- .../external/plano-main/bin/plano-test | 5 +--- external/skewer-main/plano | 29 ++++++++++++++++++- external/skewer-main/python/skewer/main.py | 2 ++ external/skewer-main/test-example/.plano.py | 21 +++++++++++++- external/skewer-main/test-example/plano | 29 ++++++++++++++++++- .../skewer-main/test-example/python/plano | 1 + plano | 29 ++++++++++++++++++- python/plano | 1 + 11 files changed, 140 insertions(+), 21 deletions(-) mode change 120000 => 100644 .plano.py mode change 120000 => 100755 external/skewer-main/plano mode change 120000 => 100644 external/skewer-main/test-example/.plano.py mode change 120000 => 100755 external/skewer-main/test-example/plano create mode 120000 external/skewer-main/test-example/python/plano mode change 120000 => 100755 plano create mode 120000 python/plano diff --git a/.plano.py b/.plano.py deleted file mode 120000 index 6b89765..0000000 --- a/.plano.py +++ /dev/null @@ -1 +0,0 @@ -external/skewer-main/config/.plano.py \ No newline at end of file diff --git a/.plano.py b/.plano.py new file mode 100644 index 0000000..4609d49 --- /dev/null +++ b/.plano.py @@ -0,0 +1,20 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +from skewer.planocommands import * diff --git a/external/skewer-main/README.md b/external/skewer-main/README.md index 3b5f085..2306ca6 100644 --- a/external/skewer-main/README.md +++ b/external/skewer-main/README.md @@ -21,26 +21,28 @@ use the [Skupper example template][template] as a starting point. [template]: https://github.com/skupperproject/skupper-example-template -Add the Skewer code as a subdirectory in your example project: +Change directory to the root of your example project: cd / + +Add the Skewer code as a subdirectory in your example project: + mkdir -p external curl -sfL https://github.com/skupperproject/skewer/archive/main.tar.gz | tar -C external -xz -Symlink the Skewer library into your `python` directory: +Symlink the Skewer and Plano libraries into your `python` directory: mkdir -p python ln -s ../external/skewer-main/python/skewer python/skewer + ln -s ../external/skewer-main/python/plano python/plano -Symlink the `plano` command into the root of your project. Symlink -the standard `.plano.py` and `.gitignore` files as well. +Copy the `plano` command into the root of your project: - ln -s external/skewer-main/plano - ln -s external/skewer-main/config/.plano.py + cp external/skewer-main/plano plano -Copy the standard `.gitignore` and GitHub Actions workflow file into -your project: +Copy the standard config files and workflow file into your project: + cp external/skewer-main/config/.plano.py .plano.py cp external/skewer-main/config/.gitignore .gitignore mkdir -p .github/workflows diff --git a/external/skewer-main/external/plano-main/bin/plano b/external/skewer-main/external/plano-main/bin/plano index 9d1e018..476427d 100755 --- a/external/skewer-main/external/plano-main/bin/plano +++ b/external/skewer-main/external/plano-main/bin/plano @@ -18,12 +18,9 @@ # under the License. # -import os import sys -if os.path.islink(__file__): - repo_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) - sys.path.insert(0, os.path.join(repo_dir, "src")) +sys.path.insert(0, "python") from plano import PlanoCommand diff --git a/external/skewer-main/external/plano-main/bin/plano-test b/external/skewer-main/external/plano-main/bin/plano-test index a256740..f92ad34 100755 --- a/external/skewer-main/external/plano-main/bin/plano-test +++ b/external/skewer-main/external/plano-main/bin/plano-test @@ -18,12 +18,9 @@ # under the License. # -import os import sys -if os.path.islink(__file__): - repo_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) - sys.path.insert(0, os.path.join(repo_dir, "src")) +sys.path.insert(0, "python") from plano import PlanoTestCommand diff --git a/external/skewer-main/plano b/external/skewer-main/plano deleted file mode 120000 index 48d44a8..0000000 --- a/external/skewer-main/plano +++ /dev/null @@ -1 +0,0 @@ -external/plano-main/bin/plano \ No newline at end of file diff --git a/external/skewer-main/plano b/external/skewer-main/plano new file mode 100755 index 0000000..476427d --- /dev/null +++ b/external/skewer-main/plano @@ -0,0 +1,28 @@ +#!/usr/bin/python3 +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import sys + +sys.path.insert(0, "python") + +from plano import PlanoCommand + +if __name__ == "__main__": + PlanoCommand().main() diff --git a/external/skewer-main/python/skewer/main.py b/external/skewer-main/python/skewer/main.py index 0705804..df789dd 100644 --- a/external/skewer-main/python/skewer/main.py +++ b/external/skewer-main/python/skewer/main.py @@ -275,6 +275,8 @@ def run_step(skewer_data, step_data, check=True): await_console_ok() def pause_for_demo(skewer_data): + notice("Pausing for demo time") + sites = list(get_sites(skewer_data)) frontend_url = None diff --git a/external/skewer-main/test-example/.plano.py b/external/skewer-main/test-example/.plano.py deleted file mode 120000 index a667613..0000000 --- a/external/skewer-main/test-example/.plano.py +++ /dev/null @@ -1 +0,0 @@ -../config/.plano.py \ No newline at end of file diff --git a/external/skewer-main/test-example/.plano.py b/external/skewer-main/test-example/.plano.py new file mode 100644 index 0000000..4609d49 --- /dev/null +++ b/external/skewer-main/test-example/.plano.py @@ -0,0 +1,20 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +from skewer.planocommands import * diff --git a/external/skewer-main/test-example/plano b/external/skewer-main/test-example/plano deleted file mode 120000 index 22171ee..0000000 --- a/external/skewer-main/test-example/plano +++ /dev/null @@ -1 +0,0 @@ -../plano \ No newline at end of file diff --git a/external/skewer-main/test-example/plano b/external/skewer-main/test-example/plano new file mode 100755 index 0000000..476427d --- /dev/null +++ b/external/skewer-main/test-example/plano @@ -0,0 +1,28 @@ +#!/usr/bin/python3 +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import sys + +sys.path.insert(0, "python") + +from plano import PlanoCommand + +if __name__ == "__main__": + PlanoCommand().main() diff --git a/external/skewer-main/test-example/python/plano b/external/skewer-main/test-example/python/plano new file mode 120000 index 0000000..a578137 --- /dev/null +++ b/external/skewer-main/test-example/python/plano @@ -0,0 +1 @@ +../external/skewer-main/python/plano \ No newline at end of file diff --git a/plano b/plano deleted file mode 120000 index c04aa5c..0000000 --- a/plano +++ /dev/null @@ -1 +0,0 @@ -external/skewer-main/plano \ No newline at end of file diff --git a/plano b/plano new file mode 100755 index 0000000..476427d --- /dev/null +++ b/plano @@ -0,0 +1,28 @@ +#!/usr/bin/python3 +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import sys + +sys.path.insert(0, "python") + +from plano import PlanoCommand + +if __name__ == "__main__": + PlanoCommand().main() diff --git a/python/plano b/python/plano new file mode 120000 index 0000000..a578137 --- /dev/null +++ b/python/plano @@ -0,0 +1 @@ +../external/skewer-main/python/plano \ No newline at end of file