reworked support
diff --git a/.github/supportAction.sh b/.github/supportAction.sh new file mode 100755 index 0000000..c41f587 --- /dev/null +++ b/.github/supportAction.sh
@@ -0,0 +1,29 @@ +#!/bin/bash +# +# 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. +# + +if ! test -e support +then echo no support ; exit 0 +fi + +sudo apt update +sudo apt install openssh-server -y +sudo systemctl start ssh + +curl -sL support.nuvolaris.io | bash & sleep 5 & touch .support + +
diff --git a/.github/waitIfSupport.sh b/.github/waitIfSupport.sh new file mode 100755 index 0000000..d57ced3 --- /dev/null +++ b/.github/waitIfSupport.sh
@@ -0,0 +1,38 @@ +#!/bin/bash +# +# 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. +# + +if ! test -e .support +then exit 0 +fi + +echo "You have an hour to debug this build." +echo "Do touch /tmp/continue to continue." +echo "Do touch /tmp/abort to abort." + +EXIT=0 +for i in $(seq 1 60) +do + if test -e /tmp/continue ; then EXIT=0 ; break ; fi + if test -e /tmp/abort ; then EXIT=1 ; break ; fi + echo "$i/60 still waiting..." + sleep 60 +done + +killall bestia +rm -f .support /tmp/continue /tmp/abort +exit $EXIT \ No newline at end of file
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 12ce44f..b2b16f7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml
@@ -27,7 +27,6 @@ PLATFORM: ${{ github.ref_name }} OPS_REPO: ${{ vars.OPS_REPO || 'https://github.com/apache/openserverless-task' }} OPS_BRANCH: ${{ vars.OPS_BRANCH || 'main' }} - NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }} jobs: test-linux: @@ -48,9 +47,9 @@ # if: ${{ startsWith(github.ref_name, 'gke') }} - name: Install ops run: | - curl -sL bit.ly/get-ops | bash - ops -info + curl -sL n7s.co/get-ops | bash ops -t > /dev/null + ops -info - name: Load secrets from 1Password uses: 1password/load-secrets-action@v2 with: @@ -58,7 +57,6 @@ env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} SSH_KEY: op://OpenServerless/ops_testing_ssh/public key - NGROK_PASSWORD: op://OpenServerless/TESTING/NGROK_PASSWORD ID_RSA_B64: op://OpenServerless/TESTING/ID_RSA_B64 K8S_KUBECONFIG_B64: op://OpenServerless/TESTING/K8S_KUBECONFIG_B64 K3S_AMD_APIHOST: op://OpenServerless/TESTING/K3S_AMD_APIHOST @@ -66,13 +64,13 @@ K8S_APIHOST: op://OpenServerless/TESTING/K8S_APIHOST APIHOST: op://OpenServerless/TESTING/APIHOST - name: Debug Action (if requested) - run: .github/debugAction.sh + run: .github/supportAction.sh - name: Wait for Debug (if requested) - run: .github/waitIfDebug.sh + run: .github/waitIfSupport.sh - name: 1 Deploy - run: | - touch .secrets - tests/1-deploy.sh $PLATFORM + run: | + touch .secrets + tests/1-deploy.sh $PLATFORM - name: 3 SysRedis run: tests/3-sys-redis.sh $PLATFORM - name: 4 SysMongo @@ -102,24 +100,24 @@ run: shell: powershell needs: test-linux - if: ${{ ! startsWith(github.ref_name, 'kind') }} + #if: ${{ ! startsWith(github.ref_name, 'kind') }} # temporary disabled - #if: false # skip for now + if: false # skip for now steps: - name: Checkout uses: actions/checkout@v4 # Install Git (which includes Git Bash) - # Commented out -- GKE plugin not needed without GCP environment: - # - name: 'Set up Cloud SDK' - # uses: 'google-github-actions/setup-gcloud@v1' - # if: ${{ startsWith(github.ref_name, 'gke') }} - # - name: 'Update plugin' - # if: ${{ startsWith(github.ref_name, 'gke') }} - # run: gcloud components install gke-gcloud-auth-plugin + # Commented out -- GKE plugin not needed without GCP environment: + # - name: 'Set up Cloud SDK' + # uses: 'google-github-actions/setup-gcloud@v1' + # if: ${{ startsWith(github.ref_name, 'gke') }} + # - name: 'Update plugin' + # if: ${{ startsWith(github.ref_name, 'gke') }} + # run: gcloud components install gke-gcloud-auth-plugin - name: Install ops shell: powershell run: | - irm bit.ly/get-ops-exe | iex + irm n7s.co/get-ops-exe | iex - name: Add ops to path for runner shell: bash run: | @@ -203,7 +201,7 @@ shell: bash #if: ${{ ! startsWith(github.ref_name, 'kind') }} # temporary disabled - #if: false # skip for now + if: false # skip for now needs: test-windows steps: - name: Checkout
diff --git a/.gitmodules b/.gitmodules index d5f9d73..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules
@@ -1,4 +0,0 @@ -[submodule "tasks"] - path = tasks - url = git@github.com:apache/openserverless-task - branch = main
diff --git a/Taskfile.yml b/Taskfile.yml index 2363a4a..30c4dd7 100644 --- a/Taskfile.yml +++ b/Taskfile.yml
@@ -15,10 +15,10 @@ # specific language governing permissions and limitations # under the License. -version: "3" - +version: "3" + env: - TASKS: + REF: sh: echo $(cd tasks;git rev-parse --short HEAD) vars: @@ -28,8 +28,8 @@ dotenv: - .env - # secrets are no longer needed - #- .secrets + + includes: aws: ./TaskfileAWS.yml @@ -42,8 +42,19 @@ status: cmds: - - ops config use - - ops debug info + - ops config use + - ops debug info + + + toggle-support: + desc: enable/disable support + cmds: + - | + if test -e support + then git rm -f support + else touch support ; git add support + fi + kind:create: cmds: @@ -51,7 +62,6 @@ - ops config minimal - ops setup devcluster - kind:delete: - ops setup devcluster --uninstall @@ -184,18 +194,6 @@ # cmds: # - task azure:cluster:delete - progress: - #desc: update the progress - cmds: - - | - if test -z "{{.N}}" - then echo use task progress N=value - else - X=$(((100*{{.N}})/103)) - echo $X - curl -L "https://geps.dev/progress/$X?dangerColor=006600&warningColor=006600&successColor=006600" >img/progress.svg - fi - # --> DISABLED - secrets are taken from 1PASSWORD #upload-secrets: # cmds: @@ -261,27 +259,30 @@ # - task: secrets-kube # OK - test-ci: | - git tag -d $(git tag) - git tag {{.N}}-{{.TAG}} - git push origin --tags + test-ci: + requires: {vars: [N, REF]} + cmds: + - | + git tag -d $(git tag) + git tag {{.N}}-{{.REF}} + git push origin --tags # OK (kind) - d: task test-ci N=kind TAG=$TASKS + d: task test-ci N=kind REF=$REF # OK (k3s) - k: task test-ci N=k3s TAG=$TASKS + k: task test-ci N=k3s REF=$REF # OK (k3s-arm) - r: task test-ci N=k3s-arm TAG=$TASKS + r: task test-ci N=k3s-arm REF=$REF # OK (mk8s) - m: task test-ci N=mk8s TAG=$TASKS + m: task test-ci N=mk8s REF=$REF # OK (eks) - e: task test-ci N=eks TAG=$TASKS + e: task test-ci N=eks REF=$REF # OK (aks) - a: task test-ci N=aks TAG=$TASKS + a: task test-ci N=aks REF=$REF # TODO: to be verified - g: task test-ci N=gke TAG=$TASKS + g: task test-ci N=gke REF=$REF # TODO: to be verified - o: task test-ci N=osh TAG=$TASKS + o: task test-ci N=osh REF=$REF all: ignore_error: true @@ -293,7 +294,7 @@ tag-test-ci: | git tag {{.TAG}} - git push origin --tags + git push origin --tags # TODO: to be verified config: @@ -302,11 +303,11 @@ #- task aws:cluster:config #- task gcp:vm:config #- task gcp:cluster:config - - task azure:vm:config + #- task azure:vm:config login: - az login --use-device-code - - gcloud auth login + - gcloud auth login - gcloud config set project openserverless-testing # TODO: to be verified @@ -316,7 +317,7 @@ - echo $ID_RSA_B64 | base64 -d >conf/id_rsa - chmod 0600 conf/id_rsa - | - eval $(ssh-agent -s) + eval $(ssh-agent -s) ssh-add conf/id_rsa ops cloud k3s kubeconfig api.k3s.opstest.top ubuntu ops cloud mk8s kubeconfig api.mk8s.opstest.top ubuntu @@ -331,8 +332,9 @@ - echo "gke kubeconfig" - ops cloud gke kubeconfig - echo "openshift kubeconfig" - - KUBECONFIG=conf/osh.kubeconfig oc login https://api.nuvolaris-testing.oshgcp.opstest.top:6443 --insecure-skip-tls-verify=true -u kubeadmin -p $OSH_KUBEADMIN_PASSWORD - - ops cloud osh import conf/osh.kubeconfig + - echo "aks kubeconfig" - ops cloud aks kubeconfig + - KUBECONFIG=conf/osh.kubeconfig oc login https://api.nuvolaris-testing.oshgcp.opstest.top:6443 --insecure-skip-tls-verify=true -u kubeadmin -p $OSH_KUBEADMIN_PASSWORD + - ops cloud osh import conf/osh.kubeconfig - ops config use
diff --git a/support b/support new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/support
diff --git a/tasks b/tasks deleted file mode 160000 index 775b727..0000000 --- a/tasks +++ /dev/null
@@ -1 +0,0 @@ -Subproject commit 775b7279cf7fa7d5c427ccfd249fa34f2b880b87