From 26bc1f808e70209bd35f98aa798b1f5408f48937 Mon Sep 17 00:00:00 2001
From: pSchlarb
Date: Fri, 7 Oct 2022 11:07:13 +0000
Subject: [PATCH 1/8] Devcontainers
Signed-off-by: pSchlarb
---
.devcontainer/Dockerfile | 32 ++++++++++++++++++++++++++++
.devcontainer/devcontainer.json | 37 +++++++++++++++++++++++++++++++++
.gitpod.Dockerfile | 23 ++++++++++++++++++++
.gitpod.yml | 12 +++++++++++
setup.py | 2 +-
5 files changed, 105 insertions(+), 1 deletion(-)
create mode 100644 .devcontainer/Dockerfile
create mode 100644 .devcontainer/devcontainer.json
create mode 100644 .gitpod.Dockerfile
create mode 100644 .gitpod.yml
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 00000000..31627500
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,32 @@
+# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu/.devcontainer/base.Dockerfile
+
+# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
+ARG VARIANT="jammy"
+FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
+
+# [Optional] Uncomment this section to install additional OS packages.
+# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
+# && apt-get -y install --no-install-recommends
+
+RUN apt-get install -y software-properties-common
+
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3BC8C2DD662F1C45 && \
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61
+
+RUN add-apt-repository "deb https://sovrin.jfrog.io/artifactory/deb focal dev"
+RUN add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc"
+
+RUN apt-get update
+
+RUN apt-get install -y \
+ python3-dev \
+ python3-pip \
+ indy-plenum=1.13.1~rc2 \
+ python3-libnacl=1.6.1 \
+ python3-sortedcontainers=1.5.7 \
+ python3-ujson=1.33
+
+RUN apt-get install sovtoken sovtokenfees indy-node=1.13.0~dev1654534721 -y
+RUN pip install /sovtoken /sovtokenfees
\ No newline at end of file
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 00000000..4bc174a1
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,37 @@
+// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
+// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu
+{
+ "name": "Ubuntu",
+ "build": {
+ "dockerfile": "Dockerfile",
+ // Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
+ // Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
+ "args": { "VARIANT": "ubuntu-20.04" }
+ },
+
+ // Add the IDs of extensions you want installed when the container is created.
+ "extensions": [
+ "mhutchie.git-graph",
+ "eamodio.gitlens",
+ "ms-python.python",
+ "cschleiden.vscode-github-actions",
+ "eamodio.gitlens",
+ "GitHub.vscode-pull-request-github",
+ "ms-vscode.makefile-tools",
+ "littlefoxteam.vscode-python-test-adapter",
+ "ms-azuretools.vscode-docker"
+ ],
+
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
+ // "forwardPorts": [],
+
+ // Use 'postCreateCommand' to run commands after the container is created.
+ // "postCreateCommand": "uname -a",
+
+ // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
+ "remoteUser": "root",
+ "features": {
+ "docker-from-docker": "latest",
+ "git": "os-provided"
+ }
+}
diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile
new file mode 100644
index 00000000..cb2f1558
--- /dev/null
+++ b/.gitpod.Dockerfile
@@ -0,0 +1,23 @@
+FROM gitpod/workspace-full as base
+
+USER gitpod
+
+RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3BC8C2DD662F1C45 && \
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61
+
+RUN sudo add-apt-repository "deb https://sovrin.jfrog.io/artifactory/deb focal dev"
+RUN sudo add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc"
+
+RUN sudo apt-get update
+
+RUN sudo apt-get install -y \
+ python3-dev \
+ indy-plenum=1.13.1~rc2 \
+ python3-libnacl=1.6.1 \
+ python3-sortedcontainers=1.5.7 \
+ python3-ujson=1.33
+
+RUN sudo apt install sovtoken sovtokenfees indy-node=1.13.0~dev1654534721 -y
+RUN sudo -H pip install /sovtoken /sovtokenfees
\ No newline at end of file
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 00000000..2078f627
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,12 @@
+# This configuration file was automatically generated by Gitpod.
+# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
+# and commit this file to your remote git repository to share the goodness with others.
+image:
+ file: .gitpod.Dockerfile
+
+tasks:
+ - init: sudo -H pip install .
+
+vscode:
+ extensions: ["mhutchie.git-graph", "eamodio.gitlens","ms-python.python", "littlefoxteam.vscode-python-test-adapter" ]
+
diff --git a/setup.py b/setup.py
index e5410d45..097f863c 100644
--- a/setup.py
+++ b/setup.py
@@ -38,5 +38,5 @@
'*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL', '*.indy']},
include_package_data=True,
- install_requires=['indy-node', 'sovtoken', 'sovtokenfees'],
+ install_requires=['indy-node==1.13.2-rc3', 'sovtoken', 'sovtokenfees'],
)
From f01bdc097dfac2fd5779eb78fcd091b3ac27dc0e Mon Sep 17 00:00:00 2001
From: Philipp Schlarb
Date: Tue, 29 Nov 2022 13:53:14 +0100
Subject: [PATCH 2/8] GHA static calling of indy-test-automation Devcontainer
fix
Signed-off-by: Philipp Schlarb
---
.devcontainer/Dockerfile | 11 ++++---
.devcontainer/devcontainer.json | 2 +-
.github/workflows/Push.yaml | 51 +++++++++++++++++++++++++++++++++
.gitpod.Dockerfile | 10 ++++---
.vscode/settings.json | 3 ++
setup.py | 2 +-
6 files changed, 69 insertions(+), 10 deletions(-)
create mode 100644 .github/workflows/Push.yaml
create mode 100644 .vscode/settings.json
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 31627500..796b64f1 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -8,7 +8,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends
-RUN apt-get install -y software-properties-common
+RUN apt-get update && apt-get install -y software-properties-common
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3BC8C2DD662F1C45 && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
@@ -26,7 +26,10 @@ RUN apt-get install -y \
indy-plenum=1.13.1~rc2 \
python3-libnacl=1.6.1 \
python3-sortedcontainers=1.5.7 \
- python3-ujson=1.33
+ python3-ujson=1.33 \
+ rubygems
-RUN apt-get install sovtoken sovtokenfees indy-node=1.13.0~dev1654534721 -y
-RUN pip install /sovtoken /sovtokenfees
\ No newline at end of file
+RUN gem install fpm
+RUN apt-get install sovtoken sovtokenfees indy-node=1.13.2~rc3 -y
+RUN pip install /sovtoken /sovtokenfees
+RUN apt remove indy-node indy-plenum -y
\ No newline at end of file
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 4bc174a1..211d9639 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -26,7 +26,7 @@
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
- // "postCreateCommand": "uname -a",
+ "postCreateCommand": "pip install .[tests]",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "root",
diff --git a/.github/workflows/Push.yaml b/.github/workflows/Push.yaml
new file mode 100644
index 00000000..f3c98134
--- /dev/null
+++ b/.github/workflows/Push.yaml
@@ -0,0 +1,51 @@
+name: Sovrin Push
+
+on:
+ push:
+
+jobs:
+ # extract-information:
+ # name: Extract needed Information for Indy-Test-Automation
+ # runs-on: ubuntu-latest
+ # outputs:
+
+ # steps:
+ # - name: Extract Indy Versions
+ # id: indy-versions
+ # run: |
+ # #bash extract here
+ # - name: Extract sovtoken & sovtokenfees Version
+ # id: sovtoken-versions
+ # run: |
+ # #bash extract here
+ build_sovrin:
+ name: Build Sovrin Deb
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Git Checkout
+ uses: actions/checkout@v3
+ - name: setup
+ run: |
+ sudo apt-get update && sudo apt-get -y install rubygems
+ sudo gem install fpm
+ - name: Build Sovrin Deb
+ run: sudo bash ./build-scripts/ubuntu-1604/build-sovrin.sh ./ "1.2.0" $PWD/sovrin.deb
+ - name: Upload sovrin.deb
+ uses: actions/upload-artifact@v3
+ with:
+ name: sovrin.deb
+ path: ./sovrin.deb
+ retention-days: 5
+
+ call-indy-test-automation:
+ name: Indy-Test-Automation
+ needs: [build_sovrin]
+ uses: pschlarb/indy-test-automation/.github/workflows/sovrin.yaml@sovrin
+ with:
+ ubuntuVersion: "ubuntu-2004"
+ libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\", \"repoComponent\": \"dev\"}"
+ tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"1.2.0-dev1666268500\", \"sovtokenfeesVersion\":\"1.2.0-dev1666268500\", \"repoComponent\": \"dev\"}"
+ sovrinJSON: "{ \"install\": \"yes\", \"clientRepoComponent\": \"master\", \"nodeRepoComponent\": \"master\"}"
+ indyJSON: "{ \"nodeVersion\": \"1.13.2~rc3\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\", \"nodeRepoComponent\":\"rc\"}"
+ libIndyVersion: "1.15.0~1625-bionic"
+ testAutomationBranch: "sovrin"
\ No newline at end of file
diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile
index cb2f1558..1207f5e4 100644
--- a/.gitpod.Dockerfile
+++ b/.gitpod.Dockerfile
@@ -17,7 +17,9 @@ RUN sudo apt-get install -y \
indy-plenum=1.13.1~rc2 \
python3-libnacl=1.6.1 \
python3-sortedcontainers=1.5.7 \
- python3-ujson=1.33
-
-RUN sudo apt install sovtoken sovtokenfees indy-node=1.13.0~dev1654534721 -y
-RUN sudo -H pip install /sovtoken /sovtokenfees
\ No newline at end of file
+ python3-ujson=1.33 \
+ rubygems
+RUN gem install fpm
+RUN sudo apt install sovtoken sovtokenfees indy-node=1.13.2~rc3 -y
+RUN sudo -H pip install /sovtoken /sovtokenfees
+RUN apt remove indy-node indy-plenum -y
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000..37441bee
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "files.eol": "\n"
+}
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 097f863c..667b96f3 100644
--- a/setup.py
+++ b/setup.py
@@ -38,5 +38,5 @@
'*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL', '*.indy']},
include_package_data=True,
- install_requires=['indy-node==1.13.2-rc3', 'sovtoken', 'sovtokenfees'],
+ install_requires=['indy-node==1.13.2.rc3', 'sovtoken', 'sovtokenfees'],
)
From 963b44a11441a3eebb436a1e1d06a31f5a0ca82d Mon Sep 17 00:00:00 2001
From: pSchlarb
Date: Tue, 6 Dec 2022 16:17:34 +0100
Subject: [PATCH 3/8] extract information for GHA indy-test-automation call
Signed-off-by: pSchlarb
---
.github/workflows/Push.yaml | 41 ++++++++++++++++++++++---------------
setup.py | 2 +-
2 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/Push.yaml b/.github/workflows/Push.yaml
index f3c98134..93ea9761 100644
--- a/.github/workflows/Push.yaml
+++ b/.github/workflows/Push.yaml
@@ -4,20 +4,27 @@ on:
push:
jobs:
- # extract-information:
- # name: Extract needed Information for Indy-Test-Automation
- # runs-on: ubuntu-latest
- # outputs:
-
- # steps:
- # - name: Extract Indy Versions
- # id: indy-versions
- # run: |
- # #bash extract here
- # - name: Extract sovtoken & sovtokenfees Version
- # id: sovtoken-versions
- # run: |
- # #bash extract here
+ extract-information:
+ name: Extract needed Information for Indy-Test-Automation
+ runs-on: ubuntu-latest
+ outputs:
+ indyVersion: ${{ steps.indy-versions.outputs.indyVersion}}
+ sovtokenVersion: ${{ steps.sovtoken-versions.outputs.sovtokenVersion}}
+ sovtokenfeesVersion: ${{ steps.sovtoken-versions.outputs.sovtokenfeesVersion}}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: prepare
+ run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ "1.2.0"
+ - name: Extract Indy Versions
+ id: indy-versions
+ run: |
+ echo "indyVersion=$(grep -oP "\d+.\d+.\d+((-|.)?rc\d+)?" <<< $(grep -oP "indy-node==\d+.\d+.\d+((-|.)?rc\d+)?" setup.py))" >>$GITHUB_OUTPUT
+ - name: Extract sovtoken & sovtokenfees Version
+ id: sovtoken-versions
+ run: |
+ echo "sovtokenVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtoken==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
+ echo "sovtokenfeesVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtokenfees==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
build_sovrin:
name: Build Sovrin Deb
runs-on: ubuntu-20.04
@@ -39,13 +46,13 @@ jobs:
call-indy-test-automation:
name: Indy-Test-Automation
- needs: [build_sovrin]
+ needs: [extract-information,build_sovrin]
uses: pschlarb/indy-test-automation/.github/workflows/sovrin.yaml@sovrin
with:
ubuntuVersion: "ubuntu-2004"
libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\", \"repoComponent\": \"dev\"}"
- tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"1.2.0-dev1666268500\", \"sovtokenfeesVersion\":\"1.2.0-dev1666268500\", \"repoComponent\": \"dev\"}"
+ tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"${{ needs.extract-information.outputs.sovtokenVersion }}\", \"sovtokenfeesVersion\":\"${{ needs.extract-information.outputs.sovtokenfeesVersion }}\", \"repoComponent\": \"dev\"}"
sovrinJSON: "{ \"install\": \"yes\", \"clientRepoComponent\": \"master\", \"nodeRepoComponent\": \"master\"}"
- indyJSON: "{ \"nodeVersion\": \"1.13.2~rc3\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\", \"nodeRepoComponent\":\"rc\"}"
+ indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\", \"nodeRepoComponent\":\"rc\"}"
libIndyVersion: "1.15.0~1625-bionic"
testAutomationBranch: "sovrin"
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 667b96f3..7883b0bb 100644
--- a/setup.py
+++ b/setup.py
@@ -38,5 +38,5 @@
'*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL', '*.indy']},
include_package_data=True,
- install_requires=['indy-node==1.13.2.rc3', 'sovtoken', 'sovtokenfees'],
+ install_requires=['indy-node==1.13.2.rc3', 'sovtoken==1.2.0-dev1666268500', 'sovtokenfees==1.2.0-dev1666268500'],
)
From ce06f0f319ce2a46d521405caa57333c8bcfac28 Mon Sep 17 00:00:00 2001
From: pSchlarb
Date: Wed, 7 Dec 2022 14:04:59 +0000
Subject: [PATCH 4/8] postinst fix
Signed-off-by: pSchlarb
removal of repo components
Signed-off-by: Philipp Schlarb
updated token version
Signed-off-by: Philipp Schlarb
keyserver fix
Signed-off-by: pSchlarb
---
.devcontainer/Dockerfile | 3 +--
.devcontainer/devcontainer.json | 2 +-
.github/workflows/Push.yaml | 8 ++++----
.gitpod.Dockerfile | 3 +--
build-scripts/ubuntu-1604/postinst | 2 +-
setup.py | 2 +-
6 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 796b64f1..b6cef279 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -12,8 +12,7 @@ RUN apt-get update && apt-get install -y software-properties-common
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3BC8C2DD662F1C45 && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
RUN add-apt-repository "deb https://sovrin.jfrog.io/artifactory/deb focal dev"
RUN add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc"
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 211d9639..d3e86c07 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -6,7 +6,7 @@
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
- "args": { "VARIANT": "ubuntu-20.04" }
+ "args": { "VARIANT": "focal" }
},
// Add the IDs of extensions you want installed when the container is created.
diff --git a/.github/workflows/Push.yaml b/.github/workflows/Push.yaml
index 93ea9761..86a3e11a 100644
--- a/.github/workflows/Push.yaml
+++ b/.github/workflows/Push.yaml
@@ -50,9 +50,9 @@ jobs:
uses: pschlarb/indy-test-automation/.github/workflows/sovrin.yaml@sovrin
with:
ubuntuVersion: "ubuntu-2004"
- libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\", \"repoComponent\": \"dev\"}"
- tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"${{ needs.extract-information.outputs.sovtokenVersion }}\", \"sovtokenfeesVersion\":\"${{ needs.extract-information.outputs.sovtokenfeesVersion }}\", \"repoComponent\": \"dev\"}"
- sovrinJSON: "{ \"install\": \"yes\", \"clientRepoComponent\": \"master\", \"nodeRepoComponent\": \"master\"}"
- indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\", \"nodeRepoComponent\":\"rc\"}"
+ libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
+ tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"${{ needs.extract-information.outputs.sovtokenVersion }}\", \"sovtokenfeesVersion\":\"${{ needs.extract-information.outputs.sovtokenfeesVersion }}\"}"
+ sovrinJSON: "{ \"install\": \"yes\"}"
+ indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
libIndyVersion: "1.15.0~1625-bionic"
testAutomationBranch: "sovrin"
\ No newline at end of file
diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile
index 1207f5e4..28bda052 100644
--- a/.gitpod.Dockerfile
+++ b/.gitpod.Dockerfile
@@ -4,8 +4,7 @@ USER gitpod
RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3BC8C2DD662F1C45 && \
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9692C00E657DDE61
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
RUN sudo add-apt-repository "deb https://sovrin.jfrog.io/artifactory/deb focal dev"
RUN sudo add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal dev rc"
diff --git a/build-scripts/ubuntu-1604/postinst b/build-scripts/ubuntu-1604/postinst
index 725e1b46..d77522ca 100755
--- a/build-scripts/ubuntu-1604/postinst
+++ b/build-scripts/ubuntu-1604/postinst
@@ -11,7 +11,7 @@ GENERAL_CONFIG_DIR="/etc/indy"
GENERAL_CONFIG_NAME="indy_config.py"
GENERAL_CONFIG_PATH=$GENERAL_CONFIG_DIR/$GENERAL_CONFIG_NAME
-INSTALL_DIR="/usr/local/lib/python3.5/dist-packages"
+INSTALL_DIR=$(python3 -c "import sovrin as _; print(_.__path__[0])")
LOCAL_NETWORK='local'
SANDBOX_NETWORK='sandbox'
diff --git a/setup.py b/setup.py
index 7883b0bb..4150ba17 100644
--- a/setup.py
+++ b/setup.py
@@ -38,5 +38,5 @@
'*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL', '*.indy']},
include_package_data=True,
- install_requires=['indy-node==1.13.2.rc3', 'sovtoken==1.2.0-dev1666268500', 'sovtokenfees==1.2.0-dev1666268500'],
+ install_requires=['indy-node==1.13.2.rc3', 'sovtoken==1.2.0-dev1670433168', 'sovtokenfees==1.2.0-dev1670433168'],
)
From c9f55de3b60ef4fccf225c772928ed00dc85c5a0 Mon Sep 17 00:00:00 2001
From: pSchlarb
Date: Thu, 5 Jan 2023 10:45:24 +0000
Subject: [PATCH 5/8] Update workflow to include payment tests.
- indy-test-automation workflow was updated to exclude them by default.
Signed-off-by: Wade Barnes
(cherry picked from commit c10015befa5119d23d5f5ef5820373f533d68b27)
Signed-off-by: pSchlarb
---
.github/workflows/Push.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/Push.yaml b/.github/workflows/Push.yaml
index 86a3e11a..54165090 100644
--- a/.github/workflows/Push.yaml
+++ b/.github/workflows/Push.yaml
@@ -55,4 +55,5 @@ jobs:
sovrinJSON: "{ \"install\": \"yes\"}"
indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
libIndyVersion: "1.15.0~1625-bionic"
+ includePaymentTests: true
testAutomationBranch: "sovrin"
\ No newline at end of file
From cf91781c2531ffad8716d515cf91bd7902827bb0 Mon Sep 17 00:00:00 2001
From: pSchlarb
Date: Thu, 5 Jan 2023 16:07:11 +0000
Subject: [PATCH 6/8] Release and Publishworkflows
Signed-off-by: pSchlarb
fixed case sensitive reference
Signed-off-by: pSchlarb
---
.github/workflows/PR.yaml | 101 +++++++++++++++++
.github/workflows/PublishRelease.yaml | 105 ++++++++++++++++++
.github/workflows/Push.yaml | 84 ++++++++++----
.github/workflows/Releasepr.yaml | 98 ++++++++++++++++
.github/workflows/Tag.yaml | 62 +++++++++++
.../workflows/reuseable_build_package.yaml | 86 ++++++++++++++
.github/workflows/reuseable_publish.yaml | 66 +++++++++++
sovrin/__metadata__.py | 37 +++++-
sovrin/metadata.json | 5 +
updateVersion.py | 55 +++++++++
10 files changed, 675 insertions(+), 24 deletions(-)
create mode 100644 .github/workflows/PR.yaml
create mode 100644 .github/workflows/PublishRelease.yaml
create mode 100644 .github/workflows/Releasepr.yaml
create mode 100644 .github/workflows/Tag.yaml
create mode 100644 .github/workflows/reuseable_build_package.yaml
create mode 100644 .github/workflows/reuseable_publish.yaml
create mode 100644 sovrin/metadata.json
create mode 100644 updateVersion.py
diff --git a/.github/workflows/PR.yaml b/.github/workflows/PR.yaml
new file mode 100644
index 00000000..c33a5220
--- /dev/null
+++ b/.github/workflows/PR.yaml
@@ -0,0 +1,101 @@
+name: Sovrin PR
+
+on:
+ pull_request:
+ paths:
+ - '**'
+ - "!sovrin/metadata.json"
+ branches:
+ - master
+ - DevContainers
+
+jobs:
+ workflow-setup:
+ name: Initialize Workflow
+ runs-on: ubuntu-latest
+ outputs:
+ GITHUB_REPOSITORY_NAME: ${{ steps.setup.outputs.GITHUB_REPOSITORY_NAME }}
+ distribution: ${{ steps.setup.outputs.distribution }}
+ publish: ${{ steps.setup.outputs.publish }}
+ testsNeeded: ${{ steps.testsNeeded.outputs.testsNeeded }}
+ steps:
+ - name: checkout source code
+ uses: actions/checkout@v3
+ - name: setup
+ id: setup
+ uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
+ with:
+ ownerRepo: "sovrin-foundation"
+ - name: testsNeeded
+ id: testsNeeded
+ uses: dorny/paths-filter@v2
+ with:
+ filters: |
+ testsNeeded:
+ - '**.py'
+ - 'sovrin/*genesis'
+ extract-information:
+ name: Extract needed Information for Indy-Test-Automation
+ needs: [workflow-setup]
+ if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
+ runs-on: ubuntu-latest
+ outputs:
+ indyVersion: ${{ steps.indy-versions.outputs.indyVersion}}
+ sovtokenVersion: ${{ steps.sovtoken-versions.outputs.sovtokenVersion}}
+ sovtokenfeesVersion: ${{ steps.sovtoken-versions.outputs.sovtokenfeesVersion}}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: '3.8'
+ - name: Set up python
+ run: |
+ pip3 install semver
+ - name: Get Version with UX-timestamp
+ id: version
+ run: |
+ echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
+ - name: prepare
+ run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ ${{ steps.version.outputs.version }}
+ - name: Extract Indy Versions
+ id: indy-versions
+ run: |
+ echo "indyVersion=$(grep -oP "\d+.\d+.\d+((-|.)?rc\d+)?" <<< $(grep -oP "indy-node==\d+.\d+.\d+((-|.)?rc\d+)?" setup.py))" >>$GITHUB_OUTPUT
+ - name: Extract sovtoken & sovtokenfees Version
+ id: sovtoken-versions
+ run: |
+ echo "sovtokenVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtoken==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
+ echo "sovtokenfeesVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtokenfees==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
+
+ build_sovrin:
+ name: Build Sovrin Deb
+ needs: [workflow-setup]
+ if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
+ uses: ./.github/workflows/reuseable_build_package.yaml
+ with:
+ isDev: true
+
+ call-indy-test-automation:
+ name: Indy-Test-Automation
+ needs: [workflow-setup, extract-information, build_sovrin]
+ if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
+ uses: pschlarb/indy-test-automation/.github/workflows/callable_test-automation.yaml@sovrin
+ with:
+ ubuntuVersion: "ubuntu-2004"
+ libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
+ tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"${{ needs.extract-information.outputs.sovtokenVersion }}\", \"sovtokenfeesVersion\":\"${{ needs.extract-information.outputs.sovtokenfeesVersion }}\"}"
+ sovrinJSON: "{ \"install\": \"yes\"}"
+ indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
+ libIndyVersion: "1.15.0~1625-bionic"
+ includePaymentTests: true
+ testAutomationBranch: "sovrin"
+
+ statusCheck:
+ name: statusCheck
+ runs-on: ubuntu-latest
+ needs: [workflow-setup, call-indy-test-automation]
+ if: ${{ needs.workflow-setup.outputs.testsNeeded == 'false' || success() }}
+ steps:
+ - run: 'echo "Just a status Check (Always true, when executed) for branch protection rules(blocks merging while test are running and if tests fail)." '
\ No newline at end of file
diff --git a/.github/workflows/PublishRelease.yaml b/.github/workflows/PublishRelease.yaml
new file mode 100644
index 00000000..2f28b5f0
--- /dev/null
+++ b/.github/workflows/PublishRelease.yaml
@@ -0,0 +1,105 @@
+name: Publish Release triggered by Version Bump merged
+
+#disable all tags and enable all brannches and only version file
+on:
+ push:
+ branches-ignore:
+ - update-rc-version
+ - update-version
+ paths:
+ - '!**'
+ - "sovrin/metadata.json"
+
+
+jobs:
+ release-infos:
+ name: release-infos
+ runs-on: ubuntu-latest
+ outputs:
+ isVersionBump: ${{ steps.get-release-info.outputs.isVersionBump }}
+ isPreRelease: ${{ steps.get-release-info.outputs.isRC }}
+ versionTag: ${{ steps.get-release-info.outputs.versionTag }}
+ version: ${{ steps.get-release-info.outputs.version }}
+ component: ${{ steps.get-release-info.outputs.component}}
+ CACHE_KEY_BUILD: ${{ steps.workflow-setup.outputs.CACHE_KEY_BUILD }}
+ UBUNTU_VERSION: ${{ steps.workflow-setup.outputs.UBUNTU_VERSION }}
+ # Expose the lowercase version of the GitHub repository name
+ # to all subsequent jobs that reference image repositories
+ # as the push and pull operations require the URL of the repository
+ # to be in lowercase.
+ GITHUB_REPOSITORY_NAME: ${{ steps.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
+ distribution: ${{ steps.workflow-setup.outputs.distribution }}
+ publish: ${{ steps.workflow-setup.outputs.publish}}
+ steps:
+ - name: checkout source code
+ uses: actions/checkout@v3
+ - name: get-release-info
+ id: get-release-info
+ uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
+ with:
+ versionString: "${{ github.event.head_commit.message }}"
+ - name: workflow-setup
+ id: workflow-setup
+ uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
+ with:
+ ownerRepo: "sovrin-foundation"
+
+ createRelease:
+ name: Create Release
+ needs: [release-infos]
+ if: needs.release-infos.outputs.isVersionBump == 'true'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Download sovrin deb Artifacts from Github Action Artifacts
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ github_token: ${{secrets.GITHUB_TOKEN}}
+ workflow: Releasepr.yaml
+ workflow_conclusion: success
+ name: sovrin.deb
+ path: artifacts/sovrin-deb
+ - name: Download sovrin python Artifacts from Github Action Artifacts
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ github_token: ${{secrets.GITHUB_TOKEN}}
+ workflow: Releasepr.yaml
+ workflow_conclusion: success
+ name: sovrin-python
+ path: artifacts/sovrin-python
+ - name: Upload sovrin-deb
+ uses: actions/upload-artifact@v3
+ with:
+ name: sovrin.deb
+ path: artifacts/sovrin-deb
+ - name: Upload sovrin-python
+ uses: actions/upload-artifact@v3
+ with:
+ name: sovrin-python
+ path: artifacts/sovrin-python
+ - name: Generate Release
+ uses: softprops/action-gh-release@v1
+ with:
+ tag_name: ${{ needs.release-infos.outputs.VERSIONTAG }}
+ files: |
+ artifacts/**
+ generate_release_notes: true
+ body: "[${{ needs.release-infos.outputs.VERSIONTAG }}] "
+ prerelease: ${{ needs.release-infos.outputs.isPreRelease }}
+ target_commitish: ${{github.event.ref}}
+ name: "${{ needs.release-infos.outputs.VERSIONTAG }}"
+ token: ${{ secrets.BOT_PR_PAT }}
+
+ publish-package:
+ name: Sovrin Publish Packages
+ needs: [release-infos, createRelease]
+ if: needs.release-infos.outputs.publish == 'true'
+ uses: ./.github/workflows/reuseable_publish.yaml
+ with:
+ GITHUB_REPOSITORY_NAME: ${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}
+ distribution: ${{ needs.release-infos.outputs.distribution }}
+ UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}
+ REPO_COMPONENT: ${{ needs.release-infos.outputs.component}}
+ secrets:
+ SOVRIN_ARTIFACTORY_REPO_CONFIG: ${{ secrets.SOVRIN_ARTIFACTORY_REPO_CONFIG }}
diff --git a/.github/workflows/Push.yaml b/.github/workflows/Push.yaml
index 54165090..fc7a52dd 100644
--- a/.github/workflows/Push.yaml
+++ b/.github/workflows/Push.yaml
@@ -2,8 +2,36 @@ name: Sovrin Push
on:
push:
+ branches:
+ - master
+ - DevContainers
+ paths:
+ - 'sovrin/*_genesis'
+ - '**.py'
jobs:
+ workflow-setup:
+ name: Initialize Workflow
+ runs-on: ubuntu-latest
+ outputs:
+ testsNeeded: ${{ steps.testsNeeded.outputs.testsNeeded }}
+ steps:
+ - name: checkout source code
+ uses: actions/checkout@v3
+ - name: setup
+ id: setup
+ uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
+ with:
+ ownerRepo: "sovrin-foundation"
+ - name: testsNeeded
+ id: testsNeeded
+ uses: dorny/paths-filter@v2
+ with:
+ filters: |
+ testsNeeded:
+ - '**.py'
+ - 'sovrin/*genesis'
+
extract-information:
name: Extract needed Information for Indy-Test-Automation
runs-on: ubuntu-latest
@@ -11,11 +39,28 @@ jobs:
indyVersion: ${{ steps.indy-versions.outputs.indyVersion}}
sovtokenVersion: ${{ steps.sovtoken-versions.outputs.sovtokenVersion}}
sovtokenfeesVersion: ${{ steps.sovtoken-versions.outputs.sovtokenfeesVersion}}
+ GITHUB_REPOSITORY_NAME: ${{ steps.repository-name.outputs.lowercase }}
steps:
- name: Checkout
uses: actions/checkout@v3
+ - name: Convert the GitHub repository name to lowercase
+ id: repository-name
+ uses: ASzc/change-string-case-action@v5
+ with:
+ string: ${{ github.repository }}
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: '3.8'
+ - name: Set up python
+ run: |
+ pip3 install semver
+ - name: Get Version with UX-timestamp
+ id: version
+ run: |
+ echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
- name: prepare
- run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ "1.2.0"
+ run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ ${{ steps.version.outputs.version }}
- name: Extract Indy Versions
id: indy-versions
run: |
@@ -25,29 +70,17 @@ jobs:
run: |
echo "sovtokenVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtoken==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
echo "sovtokenfeesVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtokenfees==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
+
build_sovrin:
name: Build Sovrin Deb
- runs-on: ubuntu-20.04
- steps:
- - name: Git Checkout
- uses: actions/checkout@v3
- - name: setup
- run: |
- sudo apt-get update && sudo apt-get -y install rubygems
- sudo gem install fpm
- - name: Build Sovrin Deb
- run: sudo bash ./build-scripts/ubuntu-1604/build-sovrin.sh ./ "1.2.0" $PWD/sovrin.deb
- - name: Upload sovrin.deb
- uses: actions/upload-artifact@v3
- with:
- name: sovrin.deb
- path: ./sovrin.deb
- retention-days: 5
+ uses: ./.github/workflows/reuseable_build_package.yaml
+ with:
+ isDev: true
call-indy-test-automation:
name: Indy-Test-Automation
needs: [extract-information,build_sovrin]
- uses: pschlarb/indy-test-automation/.github/workflows/sovrin.yaml@sovrin
+ uses: pschlarb/indy-test-automation/.github/workflows/callable_test-automation.yaml@sovrin
with:
ubuntuVersion: "ubuntu-2004"
libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
@@ -56,4 +89,17 @@ jobs:
indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
libIndyVersion: "1.15.0~1625-bionic"
includePaymentTests: true
- testAutomationBranch: "sovrin"
\ No newline at end of file
+ testAutomationBranch: "sovrin"
+
+ publish-package:
+ name: Sovrin Publish Packages
+ needs: [workflow-setup, extract-information, call-indy-test-automation]
+ if: needs.workflow-setup.outputs.publish == 'true'
+ uses: ./.github/workflows/reuseable_publish.yaml
+ with:
+ GITHUB_REPOSITORY_NAME: ${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}
+ distribution: focal
+ UBUNTU_VERSION: ubuntu-2004
+ REPO_COMPONENT: 'dev'
+ secrets:
+ SOVRIN_ARTIFACTORY_REPO_CONFIG: ${{ secrets.SOVRIN_ARTIFACTORY_REPO_CONFIG }}
diff --git a/.github/workflows/Releasepr.yaml b/.github/workflows/Releasepr.yaml
new file mode 100644
index 00000000..c1d8cbf2
--- /dev/null
+++ b/.github/workflows/Releasepr.yaml
@@ -0,0 +1,98 @@
+name: Triggered by Version Bump Release PR
+
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - "sovrin/metadata.json"
+ branches:
+ - master
+ - DevContainers
+jobs:
+ release-infos:
+ name: infos
+ runs-on: ubuntu-latest
+ outputs:
+ isVersionBump: ${{ steps.get-release-info.outputs.isVersionBump }}
+ isPreRelease: ${{ steps.get-release-info.outputs.isRC }}
+ CACHE_KEY_BUILD: ${{ steps.workflow-setup.outputs.CACHE_KEY_BUILD }}
+ UBUNTU_VERSION: ${{ steps.workflow-setup.outputs.UBUNTU_VERSION }}
+ # Expose the lowercase version of the GitHub repository name
+ # to all subsequent jobs that reference image repositories
+ # as the push and pull operations require the URL of the repository
+ # to be in lowercase.
+ GITHUB_REPOSITORY_NAME: ${{ steps.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
+ distribution: ${{ steps.workflow-setup.outputs.distribution }}
+ steps:
+ - name: checkout source code
+ uses: actions/checkout@v3
+ - name: get-release-info
+ id: get-release-info
+ uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
+ with:
+ versionString: "${{ github.event.pull_request.body }}"
+ - name: workflow-setup
+ id: workflow-setup
+ uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
+ with:
+ ownerRepo: "sovrin-foundation"
+
+ extract-information:
+ name: Extract needed Information for Indy-Test-Automation
+ runs-on: ubuntu-latest
+ outputs:
+ indyVersion: ${{ steps.indy-versions.outputs.indyVersion}}
+ sovtokenVersion: ${{ steps.sovtoken-versions.outputs.sovtokenVersion}}
+ sovtokenfeesVersion: ${{ steps.sovtoken-versions.outputs.sovtokenfeesVersion}}
+ GITHUB_REPOSITORY_NAME: ${{ steps.repository-name.outputs.lowercase }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Convert the GitHub repository name to lowercase
+ id: repository-name
+ uses: ASzc/change-string-case-action@v5
+ with:
+ string: ${{ github.repository }}
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: '3.8'
+ - name: Set up python
+ run: |
+ pip3 install semver
+ - name: Get Version with UX-timestamp
+ id: version
+ run: |
+ echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
+ - name: prepare
+ run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ ${{ steps.version.outputs.version }}
+ - name: Extract Indy Versions
+ id: indy-versions
+ run: |
+ echo "indyVersion=$(grep -oP "\d+.\d+.\d+((-|.)?rc\d+)?" <<< $(grep -oP "indy-node==\d+.\d+.\d+((-|.)?rc\d+)?" setup.py))" >>$GITHUB_OUTPUT
+ - name: Extract sovtoken & sovtokenfees Version
+ id: sovtoken-versions
+ run: |
+ echo "sovtokenVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtoken==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
+ echo "sovtokenfeesVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtokenfees==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
+
+ build_sovrin:
+ name: Build Sovrin Deb
+ uses: ./.github/workflows/reuseable_build_package.yaml
+ with:
+ isDev: false
+
+ call-indy-test-automation:
+ name: Indy-Test-Automation
+ needs: [extract-information,build_sovrin]
+ uses: pschlarb/indy-test-automation/.github/workflows/callable_test-automation.yaml@sovrin
+ with:
+ ubuntuVersion: "ubuntu-2004"
+ libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
+ tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"${{ needs.extract-information.outputs.sovtokenVersion }}\", \"sovtokenfeesVersion\":\"${{ needs.extract-information.outputs.sovtokenfeesVersion }}\"}"
+ sovrinJSON: "{ \"install\": \"yes\"}"
+ indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
+ libIndyVersion: "1.15.0~1625-bionic"
+ includePaymentTests: true
+ testAutomationBranch: "sovrin"
+
diff --git a/.github/workflows/Tag.yaml b/.github/workflows/Tag.yaml
new file mode 100644
index 00000000..658c3083
--- /dev/null
+++ b/.github/workflows/Tag.yaml
@@ -0,0 +1,62 @@
+name: Tag Workflow Triggered by set Version Tag
+
+on:
+ push:
+ tags:
+ - setRelease-v**
+
+jobs:
+ taginfos:
+ name: get Tag infos
+ runs-on: ubuntu-latest
+ outputs:
+ version: ${{ steps.get-release-info.outputs.version }}
+ versionTag: ${{ steps.get-release-info.outputs.versionTag }}
+ prBranch: ${{ steps.get-release-info.outputs.prBranch }}
+ BASE: ${{ steps.get-branch.outputs.branch }}
+ steps:
+ - name: checkout source code
+ uses: actions/checkout@v1
+ - name: extract branch
+ id: get-branch
+ uses: hyperledger/indy-shared-gha/.github/actions/branch-from-tag@v1
+ with:
+ tag: ${{ github.ref }}
+ - name: get-release-info
+ id: get-release-info
+ uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
+ with:
+ versionString: "${{ github.ref }}"
+
+ bump_version:
+ name: Bump Version Number
+ needs: taginfos
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: '3.8'
+ - name: Set up python
+ run: |
+ pip3 install semver
+ - name: Prepare package and set version
+ run: |
+ python3 updateVersion.py -t ${{ needs.taginfos.outputs.VERSION }}
+
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v3
+ with:
+ author: ${{ github.actor }} <${{ github.event.pusher.email }}>
+ committer: ${{ github.actor }} <${{ github.event.pusher.email }}>
+ signoff: true
+ commit-message: Update Version number for v${{ needs.taginfos.outputs.version }}
+ base: ${{ needs.taginfos.outputs.BASE }}
+ branch: ${{ needs.taginfos.outputs.prBranch }}
+ title: "[${{ needs.taginfos.outputs.versionTag }}] - Update Version Number for Release"
+ body: "[${{ needs.taginfos.outputs.versionTag }}] - Update Version number for Release"
+ delete-branch: true
+ token: ${{ secrets.BOT_PR_PAT }}
+
\ No newline at end of file
diff --git a/.github/workflows/reuseable_build_package.yaml b/.github/workflows/reuseable_build_package.yaml
new file mode 100644
index 00000000..920c15e7
--- /dev/null
+++ b/.github/workflows/reuseable_build_package.yaml
@@ -0,0 +1,86 @@
+name: "Build Sovrin Package"
+
+on:
+ workflow_call:
+ inputs:
+ isDev:
+ required: false
+ default: true
+ type: boolean
+
+
+jobs:
+ timestamp:
+ name: Get timestamp
+ runs-on: ubuntu-latest
+ outputs:
+ timestamp: ${{ steps.timestamp.outputs.timestamp }}
+ steps:
+ - id: timestamp
+ run: |
+ export timestamp=$(date +%s)
+ echo "timestamp=$timestamp" >> $GITHUB_OUTPUT
+ echo "::group::DEBUG"
+ echo "timestamp=$timestamp"
+ echo "::endgroup::"
+
+
+ build_sovrin:
+ name: Build Sovrin Deb
+ runs-on: ubuntu-20.04
+ needs: timestamp
+ steps:
+ - name: Git Checkout
+ uses: actions/checkout@v3
+ - name: setup
+ run: |
+ sudo apt-get update && sudo apt-get -y install rubygems
+ sudo gem install fpm
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: '3.8'
+ - name: Set up python
+ run: |
+ pip3 install semver
+ - name: Set Version with UX-timestamp
+ if: ${{ inputs.isDev }}
+ run: python3 updateVersion.py --timestamp ${{ needs.timestamp.outputs.timestamp }}
+ - name: Get current Version
+ id: version
+ run: echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
+ - name: prepare
+ run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ ${{ steps.version.outputs.version }}
+ - name: Build Sovrin Deb
+ run: sudo bash ./build-scripts/ubuntu-1604/build-sovrin.sh ./ "${{ steps.version.outputs.version }}" $PWD/sovrin.deb
+ - name: Upload sovrin.deb
+ uses: actions/upload-artifact@v3
+ with:
+ name: sovrin.deb
+ path: ./sovrin.deb
+ retention-days: 5
+
+ build_sovrin_pypi:
+ name: Sovrin Build Pypi
+ runs-on: ubuntu-20.04
+ needs: timestamp
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: '3.8'
+ - name: Set up python
+ run: |
+ pip3 install semver wheel
+ - name: Set Version with UX-timestamp
+ if: ${{ inputs.isDev }}
+ run: python3 updateVersion.py --timestamp ${{ needs.timestamp.outputs.timestamp }}
+ - name: Build python sovrin package
+ run: python3 setup.py sdist --dist-dir /tmp/dist bdist_wheel --dist-dir /tmp/dist
+ - uses: actions/upload-artifact@v3
+ with:
+ name: sovrin-python
+ path: /tmp/dist
+ retention-days: 5
\ No newline at end of file
diff --git a/.github/workflows/reuseable_publish.yaml b/.github/workflows/reuseable_publish.yaml
new file mode 100644
index 00000000..3054ff78
--- /dev/null
+++ b/.github/workflows/reuseable_publish.yaml
@@ -0,0 +1,66 @@
+name: "Publish Sovrin Packages"
+
+on:
+ workflow_call:
+ inputs:
+ GITHUB_REPOSITORY_NAME:
+ required: true
+ type: string
+ UBUNTU_VERSION:
+ required: true
+ type: string
+ REPO_COMPONENT:
+ required: true
+ type: string
+ distribution:
+ required: true
+ type: string
+ secrets:
+ SOVRIN_ARTIFACTORY_REPO_CONFIG:
+ required: true
+
+
+jobs:
+ publish_token_plugin_deb:
+ name: Token Plugin Publish Packages
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Setup JFrog CLI
+ uses: jfrog/setup-jfrog-cli@v2
+ env:
+ JF_ENV_1: ${{ secrets.SOVRIN_ARTIFACTORY_REPO_CONFIG }}
+
+ - name: Ping Artifactory
+ run: |
+ # Test the connection to Ping the Sovrin Artifactory server
+ # to ensure everything has been setup correctly.
+ jfrog rt ping
+
+ - name: Download sovrin-deb package from GHA
+ uses: actions/download-artifact@v3
+ with:
+ name: sovtoken.deb
+ path: /tmp/sovrin-deb/
+
+ - name: Publish sovrin-deb artifact
+ uses: hyperledger/indy-shared-gha/.github/actions/publish-deb@v1
+ with:
+ sourceDirectory: /tmp/sovrin-deb/
+ distribution: ${{ inputs.distribution }}
+ component: ${{ inputs.REPO_COMPONENT }}
+ repo: "deb"
+
+ - name: Download sovrin Python Packages from Pipeline Artifacts
+ uses: actions/download-artifact@v3
+ with:
+ name: sovrin-python
+ path: dist
+
+ - name: Publish Python Package to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_API_TOKEN }}
+ skip_existing: true
+
+
\ No newline at end of file
diff --git a/sovrin/__metadata__.py b/sovrin/__metadata__.py
index b12aa94a..cc6af345 100644
--- a/sovrin/__metadata__.py
+++ b/sovrin/__metadata__.py
@@ -1,9 +1,36 @@
"""
sovrin package metadata
"""
-__version_info__ = (1, 1)
-__version__ = '.'.join(map(str, __version_info__))
-__author__ = "Sovrin Foundation."
-__license__ = "Apache 2.0"
-__all__ = ['__version_info__', '__version__', '__author__', '__license__']
+import os
+import json
+
+METADATA_FILENAME = 'sovrin/metadata.json'
+METADATA_FILE = os.path.join(
+ os.path.abspath(os.path.dirname(__file__)), METADATA_FILENAME)
+
+
+def loadAuthor(metadata_file: str = METADATA_FILE):
+ with open(metadata_file, 'r') as f:
+ data = json.load(f)
+ return data['author']
+
+
+def loadLicense(metadata_file: str = METADATA_FILE):
+ with open(metadata_file, 'r') as f:
+ data = json.load(f)
+ return data['license']
+
+
+def loadVersion(metadata_file: str = METADATA_FILE):
+ with open(metadata_file, 'r') as f:
+ data = json.load(f)
+ return data['version']
+
+
+__author__ = loadAuthor()
+__license__ = loadLicense()
+__version__ = loadVersion()
+
+
+__all__ = ['__version__', '__author__', '__license__']
diff --git a/sovrin/metadata.json b/sovrin/metadata.json
new file mode 100644
index 00000000..ca7c4f39
--- /dev/null
+++ b/sovrin/metadata.json
@@ -0,0 +1,5 @@
+{
+ "version": "1.1.217-dev1672998537",
+ "author": "Sovrin Foundation.",
+ "license": "Apache 2.0"
+}
\ No newline at end of file
diff --git a/updateVersion.py b/updateVersion.py
new file mode 100644
index 00000000..f6fc2e38
--- /dev/null
+++ b/updateVersion.py
@@ -0,0 +1,55 @@
+#! /usr/bin/env python3
+import argparse
+import json
+import semver
+
+ap = argparse.ArgumentParser("Updates Version in json")
+group = ap.add_mutually_exclusive_group(required=True)
+group.add_argument("-t", "--tag", help="Version to be set to")
+group.add_argument("--timestamp", help="Timestamp to be set for the version")
+group.add_argument("--getVersion", help="Prints the current version", action="store_true")
+args = vars(ap.parse_args())
+
+
+def updateWithTag(ver):
+ if not semver.VersionInfo.isvalid(ver):
+ raise ValueError('No Valid Semver in Tag')
+ return ver
+
+
+def updateWithTimestamp(timestamp):
+ version = "str"
+ with open('sovrin/metadata.json', 'r') as f:
+ data = json.load(f)
+ v = semver.VersionInfo.parse(data["version"])
+ v = v.replace(prerelease="dev" + timestamp)
+ version = str(v)
+ return version
+
+
+version = "string"
+
+if args['getVersion']:
+ with open('sovrin/metadata.json', 'r') as f:
+ data = json.load(f)
+ v = semver.VersionInfo.parse(data["version"])
+ print(v)
+ quit()
+
+if args['tag'] is not None:
+ version = updateWithTag(args['tag'])
+ print("Version will be updated to: " + version)
+elif args['timestamp'] is not None:
+ version = updateWithTimestamp(args['timestamp'])
+ print("Replacing Dev-Version with UX-timestamp: " + version)
+else:
+ ap.print_help()
+ quit()
+
+with open('sovrin/metadata.json', 'r') as f:
+ data = json.load(f)
+ data["version"] = version
+ json.dump(data, open("sovrin/metadata.json", "w"), indent=2)
+
+
+print("Updated version of sovtoken and sovtokenfees metadata.json to: ", version)
\ No newline at end of file
From 7d71e7506eaf35e6bf393a9a8d2464a21bf8b476 Mon Sep 17 00:00:00 2001
From: pSchlarb
Date: Wed, 11 Jan 2023 12:08:11 +0100
Subject: [PATCH 7/8] pr suggestions
Signed-off-by: pSchlarb
---
.github/workflows/PR.yaml | 2 +-
.github/workflows/Push.yaml | 2 +-
.github/workflows/Releasepr.yaml | 2 +-
.github/workflows/nightlyTests.yaml | 95 +++++++++++++++++++
.../workflows/reuseable_build_package.yaml | 4 +-
.../{ubuntu-1604 => ubuntu-2004}/Dockerfile | 0
.../{ubuntu-1604 => ubuntu-2004}/README.md | 0
.../build-sovrin-docker.sh | 0
.../build-sovrin.sh | 2 +-
.../{ubuntu-1604 => ubuntu-2004}/postinst | 0
.../{ubuntu-1604 => ubuntu-2004}/preinst | 0
.../prepare-package.sh | 0
.../{ubuntu-1604 => ubuntu-2004}/prerm | 0
updateVersion.py | 12 +--
14 files changed, 107 insertions(+), 12 deletions(-)
create mode 100644 .github/workflows/nightlyTests.yaml
rename build-scripts/{ubuntu-1604 => ubuntu-2004}/Dockerfile (100%)
rename build-scripts/{ubuntu-1604 => ubuntu-2004}/README.md (100%)
rename build-scripts/{ubuntu-1604 => ubuntu-2004}/build-sovrin-docker.sh (100%)
rename build-scripts/{ubuntu-1604 => ubuntu-2004}/build-sovrin.sh (94%)
rename build-scripts/{ubuntu-1604 => ubuntu-2004}/postinst (100%)
mode change 100755 => 100644
rename build-scripts/{ubuntu-1604 => ubuntu-2004}/preinst (100%)
mode change 100755 => 100644
rename build-scripts/{ubuntu-1604 => ubuntu-2004}/prepare-package.sh (100%)
rename build-scripts/{ubuntu-1604 => ubuntu-2004}/prerm (100%)
mode change 100755 => 100644
diff --git a/.github/workflows/PR.yaml b/.github/workflows/PR.yaml
index c33a5220..807624c2 100644
--- a/.github/workflows/PR.yaml
+++ b/.github/workflows/PR.yaml
@@ -58,7 +58,7 @@ jobs:
run: |
echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
- name: prepare
- run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ ${{ steps.version.outputs.version }}
+ run: ./build-scripts/ubuntu-2004/prepare-package.sh ./ ${{ steps.version.outputs.version }}
- name: Extract Indy Versions
id: indy-versions
run: |
diff --git a/.github/workflows/Push.yaml b/.github/workflows/Push.yaml
index fc7a52dd..d7b6259b 100644
--- a/.github/workflows/Push.yaml
+++ b/.github/workflows/Push.yaml
@@ -60,7 +60,7 @@ jobs:
run: |
echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
- name: prepare
- run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ ${{ steps.version.outputs.version }}
+ run: ./build-scripts/ubuntu-2004/prepare-package.sh ./ ${{ steps.version.outputs.version }}
- name: Extract Indy Versions
id: indy-versions
run: |
diff --git a/.github/workflows/Releasepr.yaml b/.github/workflows/Releasepr.yaml
index c1d8cbf2..32a23db2 100644
--- a/.github/workflows/Releasepr.yaml
+++ b/.github/workflows/Releasepr.yaml
@@ -65,7 +65,7 @@ jobs:
run: |
echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
- name: prepare
- run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ ${{ steps.version.outputs.version }}
+ run: ./build-scripts/ubuntu-2004/prepare-package.sh ./ ${{ steps.version.outputs.version }}
- name: Extract Indy Versions
id: indy-versions
run: |
diff --git a/.github/workflows/nightlyTests.yaml b/.github/workflows/nightlyTests.yaml
new file mode 100644
index 00000000..25e051be
--- /dev/null
+++ b/.github/workflows/nightlyTests.yaml
@@ -0,0 +1,95 @@
+name: Sovrin Nightly Tests
+
+on:
+ schedule:
+ # * is a special character in YAML so you have to quote this string
+ - cron: '01 01 * * *'
+ workflow_dispatch:
+
+jobs:
+ workflow-setup:
+ name: Initialize Workflow
+ runs-on: ubuntu-latest
+ outputs:
+ testsNeeded: ${{ steps.testsNeeded.outputs.testsNeeded }}
+ steps:
+ - name: checkout source code
+ uses: actions/checkout@v3
+ - name: setup
+ id: setup
+ uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
+ with:
+ ownerRepo: "sovrin-foundation"
+
+ extract-information:
+ name: Extract needed Information for Indy-Test-Automation
+ runs-on: ubuntu-latest
+ outputs:
+ indyVersion: ${{ steps.indy-versions.outputs.indyVersion}}
+ sovtokenVersion: ${{ steps.sovtoken-versions.outputs.sovtokenVersion}}
+ sovtokenfeesVersion: ${{ steps.sovtoken-versions.outputs.sovtokenfeesVersion}}
+ GITHUB_REPOSITORY_NAME: ${{ steps.repository-name.outputs.lowercase }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Convert the GitHub repository name to lowercase
+ id: repository-name
+ uses: ASzc/change-string-case-action@v5
+ with:
+ string: ${{ github.repository }}
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: '3.8'
+ - name: Set up python
+ run: |
+ pip3 install semver
+ - name: Get Version with UX-timestamp
+ id: version
+ run: |
+ echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
+ - name: prepare
+ run: ./build-scripts/ubuntu-2004/prepare-package.sh ./ ${{ steps.version.outputs.version }}
+ - name: Extract Indy Versions
+ id: indy-versions
+ run: |
+ echo "indyVersion=$(grep -oP "\d+.\d+.\d+((-|.)?rc\d+)?" <<< $(grep -oP "indy-node==\d+.\d+.\d+((-|.)?rc\d+)?" setup.py))" >>$GITHUB_OUTPUT
+ - name: Extract sovtoken & sovtokenfees Version
+ id: sovtoken-versions
+ run: |
+ echo "sovtokenVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtoken==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
+ echo "sovtokenfeesVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtokenfees==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
+
+ build_sovrin:
+ name: Build Sovrin Deb
+ uses: ./.github/workflows/reuseable_build_package.yaml
+ with:
+ isDev: true
+
+ call-indy-test-automation:
+ name: Indy-Test-Automation
+ needs: [extract-information,build_sovrin]
+ uses: pschlarb/indy-test-automation/.github/workflows/callable_test-automation.yaml@sovrin
+ with:
+ ubuntuVersion: "ubuntu-2004"
+ libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
+ tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"${{ needs.extract-information.outputs.sovtokenVersion }}\", \"sovtokenfeesVersion\":\"${{ needs.extract-information.outputs.sovtokenfeesVersion }}\"}"
+ sovrinJSON: "{ \"install\": \"yes\"}"
+ indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
+ libIndyVersion: "1.15.0~1625-bionic"
+ includePaymentTests: true
+ testAutomationBranch: "sovrin"
+ ignoreTests: "skip-,TestEndorserSuite,TestLedgerSuite"
+
+ publish-package:
+ name: Sovrin Publish Packages
+ needs: [workflow-setup, extract-information, call-indy-test-automation]
+ if: needs.workflow-setup.outputs.publish == 'true'
+ uses: ./.github/workflows/reuseable_publish.yaml
+ with:
+ GITHUB_REPOSITORY_NAME: ${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}
+ distribution: focal
+ UBUNTU_VERSION: ubuntu-2004
+ REPO_COMPONENT: 'dev'
+ secrets:
+ SOVRIN_ARTIFACTORY_REPO_CONFIG: ${{ secrets.SOVRIN_ARTIFACTORY_REPO_CONFIG }}
diff --git a/.github/workflows/reuseable_build_package.yaml b/.github/workflows/reuseable_build_package.yaml
index 920c15e7..065a24cb 100644
--- a/.github/workflows/reuseable_build_package.yaml
+++ b/.github/workflows/reuseable_build_package.yaml
@@ -50,9 +50,9 @@ jobs:
id: version
run: echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
- name: prepare
- run: ./build-scripts/ubuntu-1604/prepare-package.sh ./ ${{ steps.version.outputs.version }}
+ run: ./build-scripts/ubuntu-2004/prepare-package.sh ./ ${{ steps.version.outputs.version }}
- name: Build Sovrin Deb
- run: sudo bash ./build-scripts/ubuntu-1604/build-sovrin.sh ./ "${{ steps.version.outputs.version }}" $PWD/sovrin.deb
+ run: sudo bash ./build-scripts/ubuntu-2004/build-sovrin.sh ./ "${{ steps.version.outputs.version }}" $PWD/sovrin.deb
- name: Upload sovrin.deb
uses: actions/upload-artifact@v3
with:
diff --git a/build-scripts/ubuntu-1604/Dockerfile b/build-scripts/ubuntu-2004/Dockerfile
similarity index 100%
rename from build-scripts/ubuntu-1604/Dockerfile
rename to build-scripts/ubuntu-2004/Dockerfile
diff --git a/build-scripts/ubuntu-1604/README.md b/build-scripts/ubuntu-2004/README.md
similarity index 100%
rename from build-scripts/ubuntu-1604/README.md
rename to build-scripts/ubuntu-2004/README.md
diff --git a/build-scripts/ubuntu-1604/build-sovrin-docker.sh b/build-scripts/ubuntu-2004/build-sovrin-docker.sh
similarity index 100%
rename from build-scripts/ubuntu-1604/build-sovrin-docker.sh
rename to build-scripts/ubuntu-2004/build-sovrin-docker.sh
diff --git a/build-scripts/ubuntu-1604/build-sovrin.sh b/build-scripts/ubuntu-2004/build-sovrin.sh
similarity index 94%
rename from build-scripts/ubuntu-1604/build-sovrin.sh
rename to build-scripts/ubuntu-2004/build-sovrin.sh
index 950d677b..34aeb514 100755
--- a/build-scripts/ubuntu-1604/build-sovrin.sh
+++ b/build-scripts/ubuntu-2004/build-sovrin.sh
@@ -11,7 +11,7 @@ TMP_DIR=$(mktemp -d)
cp -r ${INPUT_PATH}/. ${TMP_DIR}
# prepare the sources
-cd ${TMP_DIR}/build-scripts/ubuntu-1604
+cd ${TMP_DIR}/build-scripts/ubuntu-2004
./prepare-package.sh ${TMP_DIR} ${VERSION}
fpm --input-type "python" \
diff --git a/build-scripts/ubuntu-1604/postinst b/build-scripts/ubuntu-2004/postinst
old mode 100755
new mode 100644
similarity index 100%
rename from build-scripts/ubuntu-1604/postinst
rename to build-scripts/ubuntu-2004/postinst
diff --git a/build-scripts/ubuntu-1604/preinst b/build-scripts/ubuntu-2004/preinst
old mode 100755
new mode 100644
similarity index 100%
rename from build-scripts/ubuntu-1604/preinst
rename to build-scripts/ubuntu-2004/preinst
diff --git a/build-scripts/ubuntu-1604/prepare-package.sh b/build-scripts/ubuntu-2004/prepare-package.sh
similarity index 100%
rename from build-scripts/ubuntu-1604/prepare-package.sh
rename to build-scripts/ubuntu-2004/prepare-package.sh
diff --git a/build-scripts/ubuntu-1604/prerm b/build-scripts/ubuntu-2004/prerm
old mode 100755
new mode 100644
similarity index 100%
rename from build-scripts/ubuntu-1604/prerm
rename to build-scripts/ubuntu-2004/prerm
diff --git a/updateVersion.py b/updateVersion.py
index f6fc2e38..2f7b1ae5 100644
--- a/updateVersion.py
+++ b/updateVersion.py
@@ -9,7 +9,7 @@
group.add_argument("--timestamp", help="Timestamp to be set for the version")
group.add_argument("--getVersion", help="Prints the current version", action="store_true")
args = vars(ap.parse_args())
-
+sovrinMetadata = 'sovrin/metadata.json'
def updateWithTag(ver):
if not semver.VersionInfo.isvalid(ver):
@@ -19,7 +19,7 @@ def updateWithTag(ver):
def updateWithTimestamp(timestamp):
version = "str"
- with open('sovrin/metadata.json', 'r') as f:
+ with open(sovrinMetadata, 'r') as f:
data = json.load(f)
v = semver.VersionInfo.parse(data["version"])
v = v.replace(prerelease="dev" + timestamp)
@@ -30,7 +30,7 @@ def updateWithTimestamp(timestamp):
version = "string"
if args['getVersion']:
- with open('sovrin/metadata.json', 'r') as f:
+ with open(sovrinMetadata, 'r') as f:
data = json.load(f)
v = semver.VersionInfo.parse(data["version"])
print(v)
@@ -46,10 +46,10 @@ def updateWithTimestamp(timestamp):
ap.print_help()
quit()
-with open('sovrin/metadata.json', 'r') as f:
+with open(sovrinMetadata, 'r') as f:
data = json.load(f)
data["version"] = version
- json.dump(data, open("sovrin/metadata.json", "w"), indent=2)
+ json.dump(data, open(sovrinMetadata, "w"), indent=2)
-print("Updated version of sovtoken and sovtokenfees metadata.json to: ", version)
\ No newline at end of file
+print("Updated version of sovrin metadata.json to: ", version)
\ No newline at end of file
From e99aec85b67daf11a65dc4ade704a3ab3712e956 Mon Sep 17 00:00:00 2001
From: pSchlarb
Date: Wed, 11 Jan 2023 16:44:37 +0100
Subject: [PATCH 8/8] Fixed Pipeline reference
Signed-off-by: pSchlarb
---
.github/workflows/PR.yaml | 6 +-
.github/workflows/Push.yaml | 6 +-
.github/workflows/Releasepr.yaml | 4 +-
.github/workflows/nightlyTests.yaml | 95 -----------------------------
4 files changed, 10 insertions(+), 101 deletions(-)
delete mode 100644 .github/workflows/nightlyTests.yaml
diff --git a/.github/workflows/PR.yaml b/.github/workflows/PR.yaml
index 807624c2..e30c3681 100644
--- a/.github/workflows/PR.yaml
+++ b/.github/workflows/PR.yaml
@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- '**'
+ - '.github/**'
- "!sovrin/metadata.json"
branches:
- master
@@ -34,6 +35,7 @@ jobs:
testsNeeded:
- '**.py'
- 'sovrin/*genesis'
+ - '.github/**'
extract-information:
name: Extract needed Information for Indy-Test-Automation
needs: [workflow-setup]
@@ -81,7 +83,7 @@ jobs:
name: Indy-Test-Automation
needs: [workflow-setup, extract-information, build_sovrin]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
- uses: pschlarb/indy-test-automation/.github/workflows/callable_test-automation.yaml@sovrin
+ uses: hyperledger/indy-test-automation/.github/workflows/callable_test-automation.yaml@v0.9
with:
ubuntuVersion: "ubuntu-2004"
libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
@@ -90,7 +92,7 @@ jobs:
indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
libIndyVersion: "1.15.0~1625-bionic"
includePaymentTests: true
- testAutomationBranch: "sovrin"
+ testAutomationBranch: "v0.9"
statusCheck:
name: statusCheck
diff --git a/.github/workflows/Push.yaml b/.github/workflows/Push.yaml
index d7b6259b..e4b7e6b4 100644
--- a/.github/workflows/Push.yaml
+++ b/.github/workflows/Push.yaml
@@ -7,6 +7,7 @@ on:
- DevContainers
paths:
- 'sovrin/*_genesis'
+ - '.github/**'
- '**.py'
jobs:
@@ -31,6 +32,7 @@ jobs:
testsNeeded:
- '**.py'
- 'sovrin/*genesis'
+ - '.github/**'
extract-information:
name: Extract needed Information for Indy-Test-Automation
@@ -80,7 +82,7 @@ jobs:
call-indy-test-automation:
name: Indy-Test-Automation
needs: [extract-information,build_sovrin]
- uses: pschlarb/indy-test-automation/.github/workflows/callable_test-automation.yaml@sovrin
+ uses: hyperledger/indy-test-automation/.github/workflows/callable_test-automation.yaml@v0.9
with:
ubuntuVersion: "ubuntu-2004"
libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
@@ -89,7 +91,7 @@ jobs:
indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
libIndyVersion: "1.15.0~1625-bionic"
includePaymentTests: true
- testAutomationBranch: "sovrin"
+ testAutomationBranch: "v0.9"
publish-package:
name: Sovrin Publish Packages
diff --git a/.github/workflows/Releasepr.yaml b/.github/workflows/Releasepr.yaml
index 32a23db2..af474f32 100644
--- a/.github/workflows/Releasepr.yaml
+++ b/.github/workflows/Releasepr.yaml
@@ -85,7 +85,7 @@ jobs:
call-indy-test-automation:
name: Indy-Test-Automation
needs: [extract-information,build_sovrin]
- uses: pschlarb/indy-test-automation/.github/workflows/callable_test-automation.yaml@sovrin
+ uses: hyperledger/indy-test-automation/.github/workflows/callable_test-automation.yaml@v0.9
with:
ubuntuVersion: "ubuntu-2004"
libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
@@ -94,5 +94,5 @@ jobs:
indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
libIndyVersion: "1.15.0~1625-bionic"
includePaymentTests: true
- testAutomationBranch: "sovrin"
+ testAutomationBranch: "v0.9"
diff --git a/.github/workflows/nightlyTests.yaml b/.github/workflows/nightlyTests.yaml
deleted file mode 100644
index 25e051be..00000000
--- a/.github/workflows/nightlyTests.yaml
+++ /dev/null
@@ -1,95 +0,0 @@
-name: Sovrin Nightly Tests
-
-on:
- schedule:
- # * is a special character in YAML so you have to quote this string
- - cron: '01 01 * * *'
- workflow_dispatch:
-
-jobs:
- workflow-setup:
- name: Initialize Workflow
- runs-on: ubuntu-latest
- outputs:
- testsNeeded: ${{ steps.testsNeeded.outputs.testsNeeded }}
- steps:
- - name: checkout source code
- uses: actions/checkout@v3
- - name: setup
- id: setup
- uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
- with:
- ownerRepo: "sovrin-foundation"
-
- extract-information:
- name: Extract needed Information for Indy-Test-Automation
- runs-on: ubuntu-latest
- outputs:
- indyVersion: ${{ steps.indy-versions.outputs.indyVersion}}
- sovtokenVersion: ${{ steps.sovtoken-versions.outputs.sovtokenVersion}}
- sovtokenfeesVersion: ${{ steps.sovtoken-versions.outputs.sovtokenfeesVersion}}
- GITHUB_REPOSITORY_NAME: ${{ steps.repository-name.outputs.lowercase }}
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Convert the GitHub repository name to lowercase
- id: repository-name
- uses: ASzc/change-string-case-action@v5
- with:
- string: ${{ github.repository }}
- - name: Set up Python
- uses: actions/setup-python@v3
- with:
- python-version: '3.8'
- - name: Set up python
- run: |
- pip3 install semver
- - name: Get Version with UX-timestamp
- id: version
- run: |
- echo "version=$(python3 updateVersion.py --getVersion)" >> $GITHUB_OUTPUT
- - name: prepare
- run: ./build-scripts/ubuntu-2004/prepare-package.sh ./ ${{ steps.version.outputs.version }}
- - name: Extract Indy Versions
- id: indy-versions
- run: |
- echo "indyVersion=$(grep -oP "\d+.\d+.\d+((-|.)?rc\d+)?" <<< $(grep -oP "indy-node==\d+.\d+.\d+((-|.)?rc\d+)?" setup.py))" >>$GITHUB_OUTPUT
- - name: Extract sovtoken & sovtokenfees Version
- id: sovtoken-versions
- run: |
- echo "sovtokenVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtoken==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
- echo "sovtokenfeesVersion=$(grep -oP "\d+.\d+.\d+((-|.)?((rc)|(dev))?\d+)?" <<< $(grep -oP "sovtokenfees==\d+.\d+.\d+((-|.)?(rc|dev)\d+)?" setup.py))" >>$GITHUB_OUTPUT
-
- build_sovrin:
- name: Build Sovrin Deb
- uses: ./.github/workflows/reuseable_build_package.yaml
- with:
- isDev: true
-
- call-indy-test-automation:
- name: Indy-Test-Automation
- needs: [extract-information,build_sovrin]
- uses: pschlarb/indy-test-automation/.github/workflows/callable_test-automation.yaml@sovrin
- with:
- ubuntuVersion: "ubuntu-2004"
- libsovtokenJSON: "{\"install\": \"yes\", \"version\": \"1.0.5\"}"
- tokenPluginJSON: "{\"install\":\"yes\", \"sovtokenVersion\": \"${{ needs.extract-information.outputs.sovtokenVersion }}\", \"sovtokenfeesVersion\":\"${{ needs.extract-information.outputs.sovtokenfeesVersion }}\"}"
- sovrinJSON: "{ \"install\": \"yes\"}"
- indyJSON: "{ \"nodeVersion\": \"${{ needs.extract-information.outputs.indyVersion }}\", \"plenumVersion\" : \"1.13.1~rc2\", \"ursaVersion\": \"0.3.2-1\", \"pyzmqVersion\" : \"22.3.0\"}"
- libIndyVersion: "1.15.0~1625-bionic"
- includePaymentTests: true
- testAutomationBranch: "sovrin"
- ignoreTests: "skip-,TestEndorserSuite,TestLedgerSuite"
-
- publish-package:
- name: Sovrin Publish Packages
- needs: [workflow-setup, extract-information, call-indy-test-automation]
- if: needs.workflow-setup.outputs.publish == 'true'
- uses: ./.github/workflows/reuseable_publish.yaml
- with:
- GITHUB_REPOSITORY_NAME: ${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}
- distribution: focal
- UBUNTU_VERSION: ubuntu-2004
- REPO_COMPONENT: 'dev'
- secrets:
- SOVRIN_ARTIFACTORY_REPO_CONFIG: ${{ secrets.SOVRIN_ARTIFACTORY_REPO_CONFIG }}