From bf84e756af61021c2800ac0901528d8d92bacde5 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Sun, 15 Oct 2023 15:49:40 +0100 Subject: [PATCH] validation --- runtimes.json | 254 ++++++++++++++++++++--------------------- validate/Taskfile.yaml | 67 ++++++++++- validate/validate.sh | 13 ++- 3 files changed, 197 insertions(+), 137 deletions(-) diff --git a/runtimes.json b/runtimes.json index a2d7d14..db1443e 100644 --- a/runtimes.json +++ b/runtimes.json @@ -1,244 +1,244 @@ { "runtimes": { - "dotnet": [ + "nodejs": [ { - "attached": { - "attachmentName": "codefile", - "attachmentType": "text/plain" - }, + "kind": "nodejs:18", "default": true, - "deprecated": false, "image": { - "name": "action-dotnet-v2.2", - "prefix": "openwhisk", - "tag": "nightly" - }, - "kind": "dotnet:2.2", - "requireMain": true - }, - { - "attached": { - "attachmentName": "codefile", - "attachmentType": "text/plain" + "prefix": "ghcr.io/nuvolaris", + "name": "action-nodejs-v18", + "tag": "3.0.0-beta.2309081459" }, - "default": false, "deprecated": false, - "image": { - "name": "action-dotnet-v3.1", - "prefix": "openwhisk", - "tag": "nightly" - }, - "kind": "dotnet:3.1", - "requireMain": true - } - ], - "go": [ - { "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" }, - "default": true, - "deprecated": false, - "image": { - "name": "action-golang-v1.17", - "prefix": "openwhisk", - "tag": "nightly" - }, - "kind": "go:1.17" + "stemCells": [ + { + "initialCount": 1, + "memory": "256 MB", + "reactive": { + "minCount": 1, + "maxCount": 4, + "ttl": "2 minutes", + "threshold": 1, + "increment": 1 + } + } + ] }, { - "attached": { - "attachmentName": "codefile", - "attachmentType": "text/plain" - }, + "kind": "nodejs:16", "default": false, - "deprecated": false, "image": { - "name": "go-nuvolaris-metaflow", "prefix": "ghcr.io/nuvolaris", - "tag": "bc86ab6" + "name": "action-nodejs-v16", + "tag": "3.0.0-beta.2309081459" }, - "kind": "go:1.20mf" - } - ], - "java": [ - { + "deprecated": false, "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" - }, - "default": true, - "deprecated": false, - "image": { - "name": "action-java-v8", - "prefix": "ghcr.io/nuvolaris", - "tag": "0.3.0-morpheus.22110809" - }, - "kind": "java:8", - "requireMain": true + } } ], - "nodejs": [ + "python": [ { - "attached": { - "attachmentName": "codefile", - "attachmentType": "text/plain" - }, + "kind": "python:3", "default": true, - "deprecated": false, "image": { - "name": "action-nodejs-v18", "prefix": "ghcr.io/nuvolaris", + "name": "action-python-v311", "tag": "3.0.0-beta.2309081459" }, - "kind": "nodejs:18", + "deprecated": false, + "attached": { + "attachmentName": "codefile", + "attachmentType": "text/plain" + }, "stemCells": [ { "initialCount": 1, "memory": "256 MB", "reactive": { - "increment": 1, - "maxCount": 4, "minCount": 1, + "maxCount": 4, + "ttl": "2 minutes", "threshold": 1, - "ttl": "2 minutes" + "increment": 1 } } ] }, { - "attached": { - "attachmentName": "codefile", - "attachmentType": "text/plain" - }, + "kind": "python:310", "default": false, - "deprecated": false, "image": { - "name": "action-nodejs-v16", "prefix": "ghcr.io/nuvolaris", + "name": "action-python-v310", "tag": "3.0.0-beta.2309081459" }, - "kind": "nodejs:16" + "deprecated": false, + "attached": { + "attachmentName": "codefile", + "attachmentType": "text/plain" + } } ], - "php": [ + "java": [ { + "kind": "java:8", + "default": true, + "image": { + "prefix": "ghcr.io/nuvolaris", + "name": "action-java-v8", + "tag": "0.3.0-morpheus.22110809" + }, + "deprecated": false, "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" }, + "requireMain": true + } + ], + "php": [ + { + "kind": "php:7.3", "default": false, "deprecated": false, "image": { - "name": "action-php-v7.3", "prefix": "openwhisk", + "name": "action-php-v7.3", "tag": "nightly" }, - "kind": "php:7.3" - }, - { "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" - }, + } + }, + { + "kind": "php:7.4", "default": true, "deprecated": false, "image": { - "name": "action-php-v7.4", "prefix": "openwhisk", + "name": "action-php-v7.4", "tag": "nightly" }, - "kind": "php:7.4" - }, - { "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" - }, + } + }, + { + "kind": "php:8.0", "default": false, "deprecated": false, "image": { - "name": "action-php-v8.0", "prefix": "openwhisk", + "name": "action-php-v8.0", "tag": "nightly" }, - "kind": "php:8.0" + "attached": { + "attachmentName": "codefile", + "attachmentType": "text/plain" + } } ], - "python": [ + "ruby": [ { + "kind": "ruby:2.5", + "default": true, + "deprecated": false, "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" }, + "image": { + "prefix": "openwhisk", + "name": "action-ruby-v2.5", + "tag": "nightly" + } + } + ], + "go": [ + { + "kind": "go:1.17", "default": true, "deprecated": false, - "image": { - "name": "action-python-v311", - "prefix": "ghcr.io/nuvolaris", - "tag": "3.0.0-beta.2309081459" + "attached": { + "attachmentName": "codefile", + "attachmentType": "text/plain" }, - "kind": "python:3", - "stemCells": [ - { - "initialCount": 1, - "memory": "256 MB", - "reactive": { - "increment": 1, - "maxCount": 4, - "minCount": 1, - "threshold": 1, - "ttl": "2 minutes" - } - } - ] + "image": { + "prefix": "openwhisk", + "name": "action-golang-v1.17", + "tag": "nightly" + } }, { + "kind": "go:1.20mf", + "default": false, + "deprecated": false, "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" }, - "default": false, - "deprecated": false, "image": { - "name": "action-python-v310", "prefix": "ghcr.io/nuvolaris", - "tag": "3.0.0-beta.2309081459" - }, - "kind": "python:310" + "name": "go-nuvolaris-metaflow", + "tag": "bc86ab6" + } } ], - "ruby": [ + "dotnet": [ { + "kind": "dotnet:2.2", + "default": true, + "deprecated": false, + "requireMain": true, + "image": { + "prefix": "openwhisk", + "name": "action-dotnet-v2.2", + "tag": "nightly" + }, "attached": { "attachmentName": "codefile", "attachmentType": "text/plain" - }, - "default": true, + } + }, + { + "kind": "dotnet:3.1", + "default": false, "deprecated": false, + "requireMain": true, "image": { - "name": "action-ruby-v2.5", "prefix": "openwhisk", + "name": "action-dotnet-v3.1", "tag": "nightly" }, - "kind": "ruby:2.5" + "attached": { + "attachmentName": "codefile", + "attachmentType": "text/plain" + } } ], "rust": [ { - "attached": { - "attachmentName": "codefile", - "attachmentType": "text/plain" - }, + "kind": "rust:1.34", "default": true, - "deprecated": false, "image": { - "name": "action-rust-v1.34", "prefix": "openwhisk", + "name": "action-rust-v1.34", "tag": "nightly" }, - "kind": "rust:1.34" + "deprecated": false, + "attached": { + "attachmentName": "codefile", + "attachmentType": "text/plain" + } } ] } diff --git a/validate/Taskfile.yaml b/validate/Taskfile.yaml index 189c325..87cf9ff 100644 --- a/validate/Taskfile.yaml +++ b/validate/Taskfile.yaml @@ -22,25 +22,37 @@ vars: sh: git describe --tags --abbrev=0 2>/dev/null || git rev-parse --short HEAD tasks: - + default: task --list-all + pre: - docker login validate: - silent: false + silent: true cmds: - echo === "{{.IMG}}" - > cat validate.sh | docker run -i "{{.IMG}}" env VER="{{.VER}}" EXT="{{.EXT}}" ARCH={{ARCH}} bash - - | grep "$VER" - rh9: + ro9: - task: validate vars: EXT: ".rpm" IMG: "rockylinux:9" + + ubi9: + - task: validate + vars: + EXT: ".rpm" + IMG: "registry.access.redhat.com/ubi9/ubi:latest" + + ostumble: + - task: validate + vars: + EXT: ".rpm" + IMG: "opensuse/tumbleweed:latest" ub22: - task: validate @@ -48,14 +60,57 @@ tasks: EXT: ".deb" IMG: "ubuntu:22.04" - rh8: + de12: + - task: validate + vars: + EXT: ".deb" + IMG: "debian:12" + + ro8: - task: validate vars: EXT: "_redhat8.rpm" IMG: "rockylinux:8" + ubi8: + - task: validate + vars: + EXT: "_redhat8.rpm" + IMG: "registry.access.redhat.com/ubi8/ubi:latest" + + os15: + - task: validate + vars: + EXT: "_redhat8.rpm" + IMG: "opensuse/leap:latest" ub20: - task: validate vars: EXT: "_ubuntu20.deb" - IMG: "ubuntu:20.04" \ No newline at end of file + IMG: "ubuntu:20.04" + + de11: + - task: validate + vars: + EXT: "_ubuntu20.deb" + IMG: "debian:11" + + osleap: + - task: validate + vars: + EXT: "_redhat8.rpm" + IMG: "opensuse/leap:latest" + + + all: + - task: pre + - task: ub22 + - task: ub20 + - task: ubi9 + - task: ubi8 + - task: de12 + - task: de11 + - task: ro9 + - task: ro8 + - task: osleap + - task: ostumble diff --git a/validate/validate.sh b/validate/validate.sh index 190c700..afa65b1 100644 --- a/validate/validate.sh +++ b/validate/validate.sh @@ -19,10 +19,11 @@ #EXT=.rpm URL=https://github.com/nuvolaris/nuv/releases/download/$VER/nuv_${VER}_${ARCH}${EXT} >nuv${EXT} -echo $URL +echo $(basename $URL) + case "$EXT" in *.deb) - apt-get update && apt-get install -y curl + apt-get update >/dev/null 2>/dev/null && apt-get install -y curl >/dev/null 2>/dev/null export INST="dpkg -i" ;; *.rpm) @@ -31,7 +32,11 @@ case "$EXT" in esac curl -sL "$URL" >nuv${EXT} -$INST "nuv${EXT}" +$INST "nuv${EXT}" >/dev/null 2>/dev/null +nuv -v >/dev/null 2>/dev/null -nuv -v +if nuv -info | grep "NUV_VERSION: $VER" +then exit 0 +else exit 1 +fi