From 3ec29a3ff7b6025da149b30eedf046e701232630 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 20 Jan 2021 13:31:14 -0700 Subject: [PATCH 01/37] Don't run Windows tests, since the Windows instances are presently not responding to WinRM connections at all --- actions/workflows/st2_e2e_tests.yaml | 40 +++++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/actions/workflows/st2_e2e_tests.yaml b/actions/workflows/st2_e2e_tests.yaml index fa03d363..cebbac57 100644 --- a/actions/workflows/st2_e2e_tests.yaml +++ b/actions/workflows/st2_e2e_tests.yaml @@ -77,26 +77,38 @@ tasks: host: <% ctx().host_ip %> env: <% ctx().st2_cli_env %> protocol: <% ctx().protocol %> - next: - - when: <% succeeded() %> - do: - - run_windows_tests - run_windows_tests: - action: st2cd.st2_e2e_tests_test_windows - input: - host: <% ctx().host_ip %> - windows_host: <% ctx().windows_host_ip %> - windows_username: <% ctx().windows_username %> - windows_password: <% ctx().windows_password %> - env: <% ctx().st2_cli_env %> - protocol: <% ctx().protocol %> next: - when: <% succeeded() and ctx().enterprise %> do: - run_enterprise_tests - when: <% succeeded() and not ctx().enterprise %> do: + # - run_windows_tests + - echo_st2_cli_env - run_docs_tests + echo_st2_cli_env: + action: core.echo + input: + message: <% str(ctx().st2_cli_env) %> + # - when: <% succeeded() %> + # do: + # - run_windows_tests + # run_windows_tests: + # action: st2cd.st2_e2e_tests_test_windows + # input: + # host: <% ctx().host_ip %> + # windows_host: <% ctx().windows_host_ip %> + # windows_username: <% ctx().windows_username %> + # windows_password: <% ctx().windows_password %> + # env: <% ctx().st2_cli_env %> + # protocol: <% ctx().protocol %> + # next: + # - when: <% succeeded() and ctx().enterprise %> + # do: + # - run_enterprise_tests + # - when: <% succeeded() and not ctx().enterprise %> + # do: + # - run_docs_tests run_enterprise_tests: action: st2cd.st2_enterprise_tests input: @@ -104,6 +116,7 @@ tasks: next: - when: <% succeeded() %> do: + - echo_st2_cli_env - run_docs_tests run_docs_tests: action: core.remote @@ -116,6 +129,7 @@ tasks: next: - when: <% succeeded() %> do: + - echo_st2_cli_env - run_cli_tests run_cli_tests: action: core.remote From 84debb0e1fe33b79fef779b2698041525ca36359 Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 14:08:07 -0800 Subject: [PATCH 02/37] Rename and tweak LDAP and RBAC workflows and add them to st2_prep_release --- ...2_prep_release_for_ldap_backend.meta.yaml} | 12 +++---- ...h => st2_prep_release_for_ldap_backend.sh} | 2 +- ...2_prep_release_for_rbac_backend.meta.yaml} | 12 +++---- ...h => st2_prep_release_for_rbac_backend.sh} | 2 +- actions/workflows/st2_prep_release.yaml | 32 +++++++++++++++++++ 5 files changed, 46 insertions(+), 14 deletions(-) rename actions/{st2_prep_release_for_enterprise_ldap.meta.yaml => st2_prep_release_for_ldap_backend.meta.yaml} (70%) rename actions/{st2_prep_release_for_enterprise_rbac_backend.sh => st2_prep_release_for_ldap_backend.sh} (96%) rename actions/{st2_prep_release_for_enterprise_rbac_backend.meta.yaml => st2_prep_release_for_rbac_backend.meta.yaml} (69%) rename actions/{st2_prep_release_for_enterprise_ldap.sh => st2_prep_release_for_rbac_backend.sh} (96%) diff --git a/actions/st2_prep_release_for_enterprise_ldap.meta.yaml b/actions/st2_prep_release_for_ldap_backend.meta.yaml similarity index 70% rename from actions/st2_prep_release_for_enterprise_ldap.meta.yaml rename to actions/st2_prep_release_for_ldap_backend.meta.yaml index ab40ede0..8a1c43b1 100644 --- a/actions/st2_prep_release_for_enterprise_ldap.meta.yaml +++ b/actions/st2_prep_release_for_ldap_backend.meta.yaml @@ -1,14 +1,14 @@ --- -name: st2_prep_release_for_enterprise_ldap -description: Prepare the st2 enterprise ldap repo for release +name: st2_prep_release_for_ldap_backend +description: Prepare the ST2 LDAP repo for release enabled: true runner_type: remote-shell-script -entry_point: st2_prep_release_for_enterprise_ldap.sh +entry_point: st2_prep_release_for_ldap_backend.sh parameters: project: type: string - description: Project name for st2 enterprise ldap auth backend - default: st2-enterprise-auth-backend-ldap + description: Project name for ST2 LDAP auth backend + default: st2-auth-ldap position: 0 version: type: string @@ -18,7 +18,7 @@ parameters: fork: type: string description: Fork to use - default: extremenetworks + default: StackStorm position: 2 local_repo: type: string diff --git a/actions/st2_prep_release_for_enterprise_rbac_backend.sh b/actions/st2_prep_release_for_ldap_backend.sh similarity index 96% rename from actions/st2_prep_release_for_enterprise_rbac_backend.sh rename to actions/st2_prep_release_for_ldap_backend.sh index 7c7b8d76..ee2d572b 100644 --- a/actions/st2_prep_release_for_enterprise_rbac_backend.sh +++ b/actions/st2_prep_release_for_ldap_backend.sh @@ -43,7 +43,7 @@ git checkout -b ${BRANCH} origin/master # SET NEW ST2 VERSION INFO -VERSION_FILE="st2rbac_enterprise_backend/__init__.py" +VERSION_FILE="st2auth_ldap/__init__.py" VERSION_STR="__version__ = '${VERSION}'" VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` diff --git a/actions/st2_prep_release_for_enterprise_rbac_backend.meta.yaml b/actions/st2_prep_release_for_rbac_backend.meta.yaml similarity index 69% rename from actions/st2_prep_release_for_enterprise_rbac_backend.meta.yaml rename to actions/st2_prep_release_for_rbac_backend.meta.yaml index 5c6de60a..781b0f1e 100644 --- a/actions/st2_prep_release_for_enterprise_rbac_backend.meta.yaml +++ b/actions/st2_prep_release_for_rbac_backend.meta.yaml @@ -1,14 +1,14 @@ --- -name: st2_prep_release_for_enterprise_rbac_backend -description: Prepare the st2 enterprise RBAC backend repo for release +name: st2_prep_release_for_rbac_backend +description: Prepare the ST2 RBAC backend repo for release enabled: true runner_type: remote-shell-script -entry_point: st2_prep_release_for_enterprise_rbac_backend.sh +entry_point: st2_prep_release_for_rbac_backend.sh parameters: project: type: string - description: Project name for st2 enterprise rbac backend - default: st2-enterprise-rbac-backend + description: Project name for ST2 RBAC backend + default: st2-rbac-backend position: 0 version: type: string @@ -18,7 +18,7 @@ parameters: fork: type: string description: Fork to use - default: extremenetworks + default: StackStorm position: 2 local_repo: type: string diff --git a/actions/st2_prep_release_for_enterprise_ldap.sh b/actions/st2_prep_release_for_rbac_backend.sh similarity index 96% rename from actions/st2_prep_release_for_enterprise_ldap.sh rename to actions/st2_prep_release_for_rbac_backend.sh index 711e4d85..168a014c 100644 --- a/actions/st2_prep_release_for_enterprise_ldap.sh +++ b/actions/st2_prep_release_for_rbac_backend.sh @@ -43,7 +43,7 @@ git checkout -b ${BRANCH} origin/master # SET NEW ST2 VERSION INFO -VERSION_FILE="st2auth_enterprise_ldap_backend/__init__.py" +VERSION_FILE="st2rbac_backend/__init__.py" VERSION_STR="__version__ = '${VERSION}'" VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` diff --git a/actions/workflows/st2_prep_release.yaml b/actions/workflows/st2_prep_release.yaml index 1db0b433..7b746423 100644 --- a/actions/workflows/st2_prep_release.yaml +++ b/actions/workflows/st2_prep_release.yaml @@ -113,6 +113,38 @@ tasks: local_repo: <% 'st2chatops_' + ctx().local_repo_sfx %> hosts: <% ctx().host %> cwd: <% ctx().cwd %> + next: + - when: <% succeeded() %> + do: + - prep_ldap_backend + - when: <% failed() %> + do: + - cleanup_on_failure + prep_ldap_backend: + action: st2cd.st2_prep_release_for_ldap_backend + input: + project: st2-auth-ldap + version: <% ctx().version %> + fork: StackStorm + local_repo: <% 'st2_auth_ldap_' + ctx().local_repo_sfx %> + hosts: <% ctx().host %> + cwd: <% ctx().cwd %> + next: + - when: <% succeeded() %> + do: + - prep_rbac_backend + - when: <% failed() %> + do: + - cleanup_on_failure + prep_rbac_backend: + action: st2cd.st2_prep_release_for_rbac_backend + input: + project: st2-rbac-backend + version: <% ctx().version %> + fork: StackStorm + local_repo: <% 'st2_rbac_backend_' + ctx().local_repo_sfx %> + hosts: <% ctx().host %> + cwd: <% ctx().cwd %> next: - when: <% succeeded() %> do: From 76a89cb4b0927af566b723a174f13a6540f71f34 Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 14:13:06 -0800 Subject: [PATCH 03/37] Remove BWC prep release workflows --- actions/bwc_prep_release.meta.yaml | 22 --- .../bwc_prep_release_for_bwc_cli.meta.yaml | 38 ---- actions/bwc_prep_release_for_bwc_cli.sh | 71 -------- ...c_prep_release_for_bwc_installer.meta.yaml | 38 ---- actions/bwc_prep_release_for_bwc_installer.sh | 53 ------ ...p_release_for_bwc_ipfabric_packs.meta.yaml | 38 ---- ...bwc_prep_release_for_bwc_ipfabric_packs.sh | 71 -------- ...p_release_for_bwc_ipfabric_suite.meta.yaml | 38 ---- ...wc_prep_release_for_bwc_topology.meta.yaml | 38 ---- actions/bwc_prep_release_for_bwc_topology.sh | 71 -------- ..._prep_release_for_enterprise_pkg.meta.yaml | 38 ---- actions/bwc_prep_release_for_gui.meta.yaml | 40 ----- actions/bwc_prep_release_for_gui.sh | 72 -------- ...c_prep_release_for_ipfabric_docs.meta.yaml | 38 ---- actions/bwc_prep_release_for_ipfabric_docs.sh | 49 ----- .../bwc_prep_release_for_pkg_suite.meta.yaml | 38 ---- actions/bwc_prep_release_for_pkg_suite.sh | 63 ------- actions/workflows/bwc_prep_release.yaml | 168 ------------------ 18 files changed, 984 deletions(-) delete mode 100755 actions/bwc_prep_release.meta.yaml delete mode 100644 actions/bwc_prep_release_for_bwc_cli.meta.yaml delete mode 100644 actions/bwc_prep_release_for_bwc_cli.sh delete mode 100644 actions/bwc_prep_release_for_bwc_installer.meta.yaml delete mode 100644 actions/bwc_prep_release_for_bwc_installer.sh delete mode 100644 actions/bwc_prep_release_for_bwc_ipfabric_packs.meta.yaml delete mode 100644 actions/bwc_prep_release_for_bwc_ipfabric_packs.sh delete mode 100644 actions/bwc_prep_release_for_bwc_ipfabric_suite.meta.yaml delete mode 100644 actions/bwc_prep_release_for_bwc_topology.meta.yaml delete mode 100644 actions/bwc_prep_release_for_bwc_topology.sh delete mode 100644 actions/bwc_prep_release_for_enterprise_pkg.meta.yaml delete mode 100644 actions/bwc_prep_release_for_gui.meta.yaml delete mode 100644 actions/bwc_prep_release_for_gui.sh delete mode 100644 actions/bwc_prep_release_for_ipfabric_docs.meta.yaml delete mode 100644 actions/bwc_prep_release_for_ipfabric_docs.sh delete mode 100644 actions/bwc_prep_release_for_pkg_suite.meta.yaml delete mode 100644 actions/bwc_prep_release_for_pkg_suite.sh delete mode 100644 actions/workflows/bwc_prep_release.yaml diff --git a/actions/bwc_prep_release.meta.yaml b/actions/bwc_prep_release.meta.yaml deleted file mode 100755 index bbbd317c..00000000 --- a/actions/bwc_prep_release.meta.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: bwc_prep_release -runner_type: orquesta -description: Prepare bwc (st2 enterprise) for release -enabled: true -entry_point: workflows/bwc_prep_release.yaml -parameters: - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - fork: - type: string - description: Fork to use - default: StackStorm - host: - type: string - description: Host where to run the release process. - cwd: - type: string - description: Working directory where remote shell scripts use - default: /home/stanley diff --git a/actions/bwc_prep_release_for_bwc_cli.meta.yaml b/actions/bwc_prep_release_for_bwc_cli.meta.yaml deleted file mode 100644 index b68f0b97..00000000 --- a/actions/bwc_prep_release_for_bwc_cli.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_release_for_bwc_cli -description: Prepare the bwc cli repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_bwc_cli.sh -parameters: - project: - type: string - description: Project name for bwc cli - default: bwc-cli - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_bwc_cli.sh b/actions/bwc_prep_release_for_bwc_cli.sh deleted file mode 100644 index 6807a913..00000000 --- a/actions/bwc_prep_release_for_bwc_cli.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -LOCAL_REPO=$4 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -BRANCH="v${SHORT_VERSION}" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ ! -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} already exist in ${GIT_REPO}." - exit 1 -fi - - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - -echo "Creating new branch ${BRANCH}..." -git checkout -b ${BRANCH} origin/master - - -# SET NEW BWC VERSION INFO -VERSION_FILE="bwc_cli/__init__.py" -VERSION_STR="__version__ = '${VERSION}'" - -VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to ${VERSION}..." - sed -i -e "s/\(__version__ = \).*/\1'${VERSION}'/" ${VERSION_FILE} - - VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the bwc version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add ${VERSION_FILE} - git commit -qm "Update version info for release - ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_prep_release_for_bwc_installer.meta.yaml b/actions/bwc_prep_release_for_bwc_installer.meta.yaml deleted file mode 100644 index 33c12947..00000000 --- a/actions/bwc_prep_release_for_bwc_installer.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_release_for_bwc_installer -description: Prepare the ewc-installer repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_bwc_installer.sh -parameters: - project: - type: string - description: Project name for ewc-installer - default: ewc-installer - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_bwc_installer.sh b/actions/bwc_prep_release_for_bwc_installer.sh deleted file mode 100644 index 52e5093d..00000000 --- a/actions/bwc_prep_release_for_bwc_installer.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -LOCAL_REPO=$4 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -BRANCH="v${SHORT_VERSION}" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ ! -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} already exist in ${GIT_REPO}." - exit 1 -fi - - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - - -# CREATE RELEASE BRANCH AND SET NEW ST2 VERSION INFO -echo "Creating new branch ${BRANCH}..." -git checkout -b ${BRANCH} origin/master - -# XXX: No changes need to be made to the repo today. - -echo "Pushing branch ${BRANCH} to github" -git push origin ${BRANCH} - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} \ No newline at end of file diff --git a/actions/bwc_prep_release_for_bwc_ipfabric_packs.meta.yaml b/actions/bwc_prep_release_for_bwc_ipfabric_packs.meta.yaml deleted file mode 100644 index 6d62e05c..00000000 --- a/actions/bwc_prep_release_for_bwc_ipfabric_packs.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_release_for_bwc_ipfabric_packs -description: Prepare the bwc ip fabric packs repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_bwc_ipfabric_packs.sh -parameters: - project: - type: string - description: Project name for bwc ip fabric packs - default: bwc-ipfabric-packs - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_bwc_ipfabric_packs.sh b/actions/bwc_prep_release_for_bwc_ipfabric_packs.sh deleted file mode 100644 index bb25d215..00000000 --- a/actions/bwc_prep_release_for_bwc_ipfabric_packs.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -LOCAL_REPO=$4 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -BRANCH="v${SHORT_VERSION}" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ ! -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} already exist in ${GIT_REPO}." - exit 1 -fi - - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - -echo "Creating new branch ${BRANCH}..." -git checkout -b ${BRANCH} origin/master - - -# SET NEW BWC VERSION INFO -VERSION_FILE="pkg_version" -VERSION_STR="${VERSION}" - -VERSION_STR_MATCH=`grep "^${VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to ${VERSION}..." - echo ${VERSION} > ${VERSION_FILE} - - VERSION_STR_MATCH=`grep "^${VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the bwc version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add ${VERSION_FILE} - git commit -qm "Update version info for release - ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_prep_release_for_bwc_ipfabric_suite.meta.yaml b/actions/bwc_prep_release_for_bwc_ipfabric_suite.meta.yaml deleted file mode 100644 index d2978738..00000000 --- a/actions/bwc_prep_release_for_bwc_ipfabric_suite.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_release_for_bwc_ipfabric_suite -description: Prepare the bwc ip fabric suite repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for bwc ip fabric suite - default: bwc-ipfabric-suite-packages - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_bwc_topology.meta.yaml b/actions/bwc_prep_release_for_bwc_topology.meta.yaml deleted file mode 100644 index 2f7f5d2c..00000000 --- a/actions/bwc_prep_release_for_bwc_topology.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_release_for_bwc_topology -description: Prepare the bwc topology repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_bwc_topology.sh -parameters: - project: - type: string - description: Project name for bwc topology - default: bwc-topology - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_bwc_topology.sh b/actions/bwc_prep_release_for_bwc_topology.sh deleted file mode 100644 index 5368a939..00000000 --- a/actions/bwc_prep_release_for_bwc_topology.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -LOCAL_REPO=$4 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -BRANCH="v${SHORT_VERSION}" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ ! -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} already exist in ${GIT_REPO}." - exit 1 -fi - - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - -echo "Creating new branch ${BRANCH}..." -git checkout -b ${BRANCH} origin/master - - -# SET NEW BWC VERSION INFO -VERSION_FILE="bwc/__init__.py" -VERSION_STR="__version__ = '${VERSION}'" - -VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to ${VERSION}..." - sed -i -e "s/\(__version__ = \).*/\1'${VERSION}'/" ${VERSION_FILE} - - VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the bwc version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add ${VERSION_FILE} - git commit -qm "Update version info for release - ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_prep_release_for_enterprise_pkg.meta.yaml b/actions/bwc_prep_release_for_enterprise_pkg.meta.yaml deleted file mode 100644 index ceebde01..00000000 --- a/actions/bwc_prep_release_for_enterprise_pkg.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_release_for_enterprise_pkg -description: Prepare the bwc (st2 enterprise) packaging repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for bwc enterprise packaging repo - default: bwc-enterprise-package - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_gui.meta.yaml b/actions/bwc_prep_release_for_gui.meta.yaml deleted file mode 100644 index 2828d8a8..00000000 --- a/actions/bwc_prep_release_for_gui.meta.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: bwc_prep_release_for_gui -description: Prepare the GUI repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_gui.sh -parameters: - project: - type: string - description: Project name for bwc - required: true - enum: - - bwc-ui - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_gui.sh b/actions/bwc_prep_release_for_gui.sh deleted file mode 100644 index 85d5b357..00000000 --- a/actions/bwc_prep_release_for_gui.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -LOCAL_REPO=$4 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -DEV_VERSION="${SHORT_VERSION}dev" -BRANCH="v${SHORT_VERSION}" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ ! -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} already exist in ${GIT_REPO}." - exit 1 -fi - - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - -echo "Creating new branch ${BRANCH}..." -git checkout -b ${BRANCH} origin/master - - -# SET NEW ST2 VERSION INFO -VERSION_FILE="package.json" -VERSION_STR="\"st2_version\": \"${VERSION}\"" - -VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to ${VERSION}..." - sed -i -e "s/\(^ \"st2_version\": \"\).*\(\"\)/\1${VERSION}\2/" ${VERSION_FILE} - - VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the st2 version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add ${VERSION_FILE} - git commit -qm "Update version info for release - ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_prep_release_for_ipfabric_docs.meta.yaml b/actions/bwc_prep_release_for_ipfabric_docs.meta.yaml deleted file mode 100644 index 5e57c1c7..00000000 --- a/actions/bwc_prep_release_for_ipfabric_docs.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_release_for_ipfabric_docs -description: Prepare the bwc ip fabric docs repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_ipfabric_docs.sh -parameters: - project: - type: string - description: Project name for ewcdocs - default: ipfabric-docs - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_ipfabric_docs.sh b/actions/bwc_prep_release_for_ipfabric_docs.sh deleted file mode 100644 index 12624a50..00000000 --- a/actions/bwc_prep_release_for_ipfabric_docs.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -LOCAL_REPO=$4 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -BRANCH="v${SHORT_VERSION}" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ ! -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} already exist in ${GIT_REPO}." - exit 1 -fi - - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - -# VERSION BRANCH IS REQUIRED FOR MAKE BWCDOCS -echo "Creating new branch ${BRANCH}..." -git checkout -b ${BRANCH} origin/master -git push origin ${BRANCH} -q - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_prep_release_for_pkg_suite.meta.yaml b/actions/bwc_prep_release_for_pkg_suite.meta.yaml deleted file mode 100644 index 0ac9e6d3..00000000 --- a/actions/bwc_prep_release_for_pkg_suite.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_release_for_pkg_suite -description: Prepare any bwc packaging suite repo for release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_release_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for the package suite - required: true - position: 0 - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: StackStorm - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_release_for_pkg_suite.sh b/actions/bwc_prep_release_for_pkg_suite.sh deleted file mode 100644 index 5b0382d0..00000000 --- a/actions/bwc_prep_release_for_pkg_suite.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -LOCAL_REPO=$4 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -BRANCH="master" -CWD=`pwd` - - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - - -# SET NEW BWC VERSION INFO -VERSION_FILE="update-versions" -VERSION_STR=`cat ${VERSION_FILE}` -VERSION_ARRAY=(${VERSION_STR}) -OLD_DEV_VERSION=${VERSION_ARRAY[0]} -OLD_VERSION_STR="${VERSION_STR}" -NEW_VERSION_STR="${OLD_DEV_VERSION} ${VERSION}" - -NEW_VERSION_STR_MATCH=`grep "${NEW_VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to \"${NEW_VERSION_STR}\"..." - sed -i "s/${OLD_VERSION_STR}/${NEW_VERSION_STR}/g" ${VERSION_FILE} - - NEW_VERSION_STR_MATCH=`grep "${NEW_VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add ${VERSION_FILE} - git commit -qm "Update version to ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/workflows/bwc_prep_release.yaml b/actions/workflows/bwc_prep_release.yaml deleted file mode 100644 index 997a589a..00000000 --- a/actions/workflows/bwc_prep_release.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -version: '1.0' -description: Prepare bwc (st2 enterprise) for release. -input: - - version - - fork - - host - - cwd -vars: - - local_repo_sfx: -tasks: - init: - action: core.local - input: - cmd: echo `date +'%s'`_`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - next: - - when: <% succeeded() and (ctx().host = null) %> - publish: - - local_repo_sfx: <% result().stdout %> - do: - - get_host - - when: <% succeeded() and (ctx().host != null) %> - publish: - - local_repo_sfx: <% result().stdout %> - do: - - prep - get_host: - action: linux.dig - input: - hostname: st2-build-slave-ubuntu.service.consul - rand: true - count: 1 - next: - - when: <% succeeded() %> - publish: - - host: <% result().result[0] %> - do: - - prep - prep: - next: - - do: - - prep_bwc_enterprise_pkg - prep_bwc_enterprise_pkg: - action: st2cd.bwc_prep_release_for_enterprise_pkg - input: - project: bwc-enterprise-package - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'bwc_enterprise_package_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2enterprise_ldap - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2enterprise_ldap: - action: st2cd.st2_prep_release_for_enterprise_ldap - input: - project: st2-enterprise-auth-backend-ldap - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'st2enterprise_auth_ldap_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2enterprise_rbac_backend - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2enterprise_rbac_backend: - action: st2cd.st2_prep_release_for_enterprise_rbac_backend - input: - project: st2-enterprise-rbac-backend - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'st2enterprise_rbac_backend_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_bwc_ui - - when: <% failed() %> - do: - - cleanup_on_failure - prep_bwc_ui: - action: st2cd.bwc_prep_release_for_gui - input: - project: bwc-ui - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'bwc_ui_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2flow - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2flow: - action: st2cd.st2_prep_release_for_gui - input: - project: st2flow - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'st2flow_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_ewc_docs - - when: <% failed() %> - do: - - cleanup_on_failure - prep_ewc_docs: - action: st2cd.bwc_prep_release_for_ipfabric_docs - input: - project: ipfabric-docs - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'bwc_ipfabric_docs_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_bwc_installer - - when: <% failed() %> - do: - - cleanup_on_failure - prep_bwc_installer: - action: st2cd.bwc_prep_release_for_bwc_installer - input: - project: ewc-installer - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'ewc-installer_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% failed() %> - do: - - cleanup_on_failure - - cleanup_on_failure: - next: - - when: <% ctx().local_repo_sfx != null %> - do: - - cleanup - - when: <% ctx().local_repo_sfx = null %> - do: - - fail - cleanup: - action: core.remote - input: - cmd: <% 'rm -rf ' + ctx().cwd + '/st2*' + ctx().local_repo_sfx + ' ' + ctx().cwd + '/bwc*' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - next: - - do: - - fail From 85e708a74efe1873061230488c98a3b854e718f2 Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 18:46:46 -0800 Subject: [PATCH 04/37] Install pip from the same branch of st2 --- actions/setup_e2e_tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 25d35324..26ad5116 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -132,7 +132,12 @@ st2ctl reload --register-all # Robotframework requirements cd st2tests -sudo ${PIP} install --upgrade "pip>=9.0,<9.1" +if [[ -z "$VERSION" ]]; then + PIP_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/${BRANCH}/Makefile | grep 'PIP_VERSION ?= ' | awk '{ print $3 }') +else + PIP_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/v${VERSION}/Makefile | grep 'PIP_VERSION ?= ' | awk '{ print $3 }') +fi +sudo ${PIP} install --upgrade "pip==$PIP_VERSION" sudo ${PIP} install --upgrade "virtualenv==15.1.0" virtualenv --no-download venv From 4a5f94386d83e2e7aee426dd3e5e5f7281857b1e Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 20:04:14 -0800 Subject: [PATCH 05/37] Echo commands as they are run --- actions/setup_e2e_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 26ad5116..22dc21fb 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex BRANCH=$1 From 73efed7319267d41d6be5205edf15315e38ff003 Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 20:42:23 -0800 Subject: [PATCH 06/37] Also look for the virtualenv executable in ~/.local/bin --- actions/setup_e2e_tests.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 22dc21fb..38eff3de 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -140,8 +140,22 @@ fi sudo ${PIP} install --upgrade "pip==$PIP_VERSION" sudo ${PIP} install --upgrade "virtualenv==15.1.0" -virtualenv --no-download venv +# I'm not entirely sure what the original author of this script (who very well +# could have been me) was thinking. At least on Ubuntu Xenial, installing the +# Python virtualenv package will not install it in any of the system +# directories, it will install it in your ~/.local/bin directory. +# However, this must have worked at some point in time, and so instead of +# calling the virtualenv binary by it's full path (which may be different on +# other operating systems), we simply extend PATH with $HOME/.local/bin to help +# Bash find the virtualenv executable. +PATH=$PATH:$HOME/.local/bin virtualenv --no-download venv . venv/bin/activate +# Set pip and virtualenv within the virtualenv to ensure the Python 3-only +# dependencies can be successfully installed +${PIP} install --upgrade "pip==$PIP_VERSION" +${PIP} install --upgrade "virtualenv==15.1.0" + +# Install the test dependencies ${PIP} install -r test-requirements.txt From 69a456a929c3f8480488c7a510906a632f94f35b Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 21:23:10 -0800 Subject: [PATCH 07/37] Try to make the script idempotent --- actions/setup_e2e_tests.sh | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 38eff3de..16e135ba 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -20,12 +20,14 @@ PIP="pip" DEBTEST=`lsb_release -a 2> /dev/null | grep Distributor | awk '{print $3}'` RHTEST=`cat /etc/redhat-release 2> /dev/null | sed -e "s~\(.*\)release.*~\1~g"` -# Decrease interval for MongoDB TTL expire thread. By default it runs every 60 seconds which -# means we would need to wait at least 60 seconds in our key expire end to end tests. -# By decreasing it, we can speed up those tests -# TODO: Use db.adminCommand, but for that we need to fix admin user permissions in bootstrap script -echo "Updating MongoDB config..." -echo -e "\nsetParameter:\n ttlMonitorSleepSecs: 1" | sudo tee -a /etc/mongod.conf > /dev/null +if ! grep -q ttlMonitorSleepSecs /etc/mongod.conf; then + # Decrease interval for MongoDB TTL expire thread. By default it runs every 60 seconds which + # means we would need to wait at least 60 seconds in our key expire end to end tests. + # By decreasing it, we can speed up those tests + # TODO: Use db.adminCommand, but for that we need to fix admin user permissions in bootstrap script + echo "Updating MongoDB config..." + echo -e "\nsetParameter:\n ttlMonitorSleepSecs: 1" | sudo tee -a /etc/mongod.conf > /dev/null +fi sudo cat /etc/mongod.conf if [[ -n "$RHTEST" ]]; then @@ -90,11 +92,17 @@ if [[ ! -e "${CRYPTO_KEY_FILE}" ]]; then sudo chgrp st2packs ${CRYPTO_KEY_FILE} fi -# This looks overly complicated... -sudo bash -c "cat <>${ST2_CONF} +if ! grep -qE "encryption_key_path[[:space:]]*=[[:space:]]*${CRYPTO_KEY_FILE}" ${ST2_CONF}; then + # Add a new keyvalue.encryption_key_path + # This looks overly complicated... + sudo bash -c "cat <>${ST2_CONF} [keyvalue] -encryption_key_path=${CRYPTO_KEY_FILE} +encryption_key_path = ${CRYPTO_KEY_FILE} keyvalue_options" +elif ! grep -qE "encryption_key_path[[:space:]]*=[[:space:]]*" ${ST2_CONF}; then + # If keyvalue.encryption_key_path exists, then modify it + sed -i "s|^encryption_key_path[[:space:]]*=[[:space:]]*[^[:space:]]\{1,\}$|encryption_key_path = ${CRYPTO_KEY_FILE}|" ${ST2_CONF} +fi # Reload required for testing st2 upgrade st2ctl reload --register-all @@ -122,8 +130,11 @@ sudo cp -R st2tests/packs/* /opt/stackstorm/packs/ echo "Apply st2 CI configuration if it exists..." if [ -f st2tests/conf/st2.ci.conf ]; then - sudo cp -f /etc/st2/st2.conf /etc/st2/st2.conf.bkup - sudo crudini --merge /etc/st2/st2.conf < st2tests/conf/st2.ci.conf + # Skip the CI config if it's already applied + if [[ ! $(grep -qE 'enable_common_libs[[:space:]]*=[[:space:]]*True' /etc/st2/st2.conf) ]]; then + sudo cp -f /etc/st2/st2.conf /etc/st2/st2.conf.bkup + sudo crudini --merge /etc/st2/st2.conf < st2tests/conf/st2.ci.conf + fi fi sudo cp -R /usr/share/doc/st2/examples /opt/stackstorm/packs/ From c988ca6cabccd77914c0db417a7f591457b43577 Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 22:16:58 -0800 Subject: [PATCH 08/37] Create the virtualenv with Python 3 --- actions/setup_e2e_tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 16e135ba..ce01a1e3 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -159,7 +159,9 @@ sudo ${PIP} install --upgrade "virtualenv==15.1.0" # calling the virtualenv binary by it's full path (which may be different on # other operating systems), we simply extend PATH with $HOME/.local/bin to help # Bash find the virtualenv executable. -PATH=$PATH:$HOME/.local/bin virtualenv --no-download venv +# Also, it's 2021, but we still have to tell virtualenv to configure the +# virtualenv to use Python 3. +PATH=$PATH:$HOME/.local/bin virtualenv --no-download --python=python3 venv . venv/bin/activate # Set pip and virtualenv within the virtualenv to ensure the Python 3-only # dependencies can be successfully installed From bff836a881a26198ebae7909db27fa1fdeebccbd Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 22:21:34 -0800 Subject: [PATCH 09/37] Use $() instead of backticks --- actions/setup_e2e_tests.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index ce01a1e3..3c3e9ba5 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -17,8 +17,8 @@ fi PIP="pip" # Install OS specific pre-reqs (Better moved to puppet at some point.) -DEBTEST=`lsb_release -a 2> /dev/null | grep Distributor | awk '{print $3}'` -RHTEST=`cat /etc/redhat-release 2> /dev/null | sed -e "s~\(.*\)release.*~\1~g"` +DEBTEST=$(lsb_release -a 2> /dev/null | grep Distributor | awk '{print $3}') +RHTEST=$(cat /etc/redhat-release 2> /dev/null | sed -e "s~\(.*\)release.*~\1~g") if ! grep -q ttlMonitorSleepSecs /etc/mongod.conf; then # Decrease interval for MongoDB TTL expire thread. By default it runs every 60 seconds which @@ -31,7 +31,7 @@ fi sudo cat /etc/mongod.conf if [[ -n "$RHTEST" ]]; then - RHVERSION=`cat /etc/redhat-release 2> /dev/null | sed -r 's/([^0-9]*([0-9]*)){1}.*/\2/'` + RHVERSION=$(cat /etc/redhat-release 2> /dev/null | sed -r 's/([^0-9]*([0-9]*)){1}.*/\2/') echo "*** Detected Distro is ${RHTEST} - ${RHVERSION} ***" echo "Restarting MongoDB..." @@ -55,8 +55,8 @@ if [[ -n "$RHTEST" ]]; then fi elif [[ -n "$DEBTEST" ]]; then - DEBVERSION=`lsb_release --release | awk '{ print $2 }'` - SUBTYPE=`lsb_release -a 2>&1 | grep Codename | grep -v "LSB" | awk '{print $2}'` + DEBVERSION=$(lsb_release --release | awk '{ print $2 }') + SUBTYPE=$(lsb_release -a 2>&1 | grep Codename | grep -v "LSB" | awk '{print $2}') echo "*** Detected Distro is ${DEBTEST} - ${DEBVERSION} ***" echo "Restarting MongoDB..." From afa64e49ca690186de893e578adb3ff0d341d347 Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 2 Mar 2021 22:55:25 -0800 Subject: [PATCH 10/37] Explicitly specify Python 3.6 for the virtualenv --- actions/setup_e2e_tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 3c3e9ba5..26a11750 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -15,6 +15,7 @@ if [[ $BRANCH =~ v?[[:digit:]]{1,}\.[[:digit:]]{1,} ]]; then fi PIP="pip" +PYTHON3=python3.6 # Can't just specify python3 on Ubuntu Xenial # Install OS specific pre-reqs (Better moved to puppet at some point.) DEBTEST=$(lsb_release -a 2> /dev/null | grep Distributor | awk '{print $3}') @@ -161,7 +162,7 @@ sudo ${PIP} install --upgrade "virtualenv==15.1.0" # Bash find the virtualenv executable. # Also, it's 2021, but we still have to tell virtualenv to configure the # virtualenv to use Python 3. -PATH=$PATH:$HOME/.local/bin virtualenv --no-download --python=python3 venv +PATH=$PATH:$HOME/.local/bin virtualenv --no-download --python=$PYTHON3 venv . venv/bin/activate # Set pip and virtualenv within the virtualenv to ensure the Python 3-only # dependencies can be successfully installed From 1502f0b4fdebcffa8de769e0471569e1dcf66921 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 01:24:38 -0800 Subject: [PATCH 11/37] Create and chown a .hubot_history file --- actions/setup_e2e_tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 26a11750..d4101eab 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -140,6 +140,8 @@ fi sudo cp -R /usr/share/doc/st2/examples /opt/stackstorm/packs/ st2 run packs.setup_virtualenv packs=examples,tests,asserts,fixtures,webui,chatops_tests +sudo touch /opt/stackstorm/chatops/.hubot_history +sudo chown stanley:stanley /opt/stackstorm/chatops/.hubot_history st2ctl reload --register-all # Robotframework requirements From bc90f97b57b881bd0d2da5dbf531afb8a853bb59 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 13:05:32 -0800 Subject: [PATCH 12/37] Add a fallback curl for PIP_VERSION --- actions/setup_e2e_tests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index d4101eab..2e4f7e99 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -151,6 +151,10 @@ if [[ -z "$VERSION" ]]; then else PIP_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/v${VERSION}/Makefile | grep 'PIP_VERSION ?= ' | awk '{ print $3 }') fi +# Fallback +if [[ -z "$PIP_VERSION" ]]; then + PIP_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/master/Makefile | grep 'PIP_VERSION ?= ' | awk '{ print $3 }') +fi sudo ${PIP} install --upgrade "pip==$PIP_VERSION" sudo ${PIP} install --upgrade "virtualenv==15.1.0" From bef618a46a60ddcedc54fbc031d5ce3040c78b68 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 15:14:48 -0800 Subject: [PATCH 13/37] Rip out ChatOps end-to-end tests on Ubuntu Xenial --- actions/workflows/st2_chatops_e2e_tests.yaml | 27 ++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/actions/workflows/st2_chatops_e2e_tests.yaml b/actions/workflows/st2_chatops_e2e_tests.yaml index 32d36f03..4e292196 100644 --- a/actions/workflows/st2_chatops_e2e_tests.yaml +++ b/actions/workflows/st2_chatops_e2e_tests.yaml @@ -105,16 +105,23 @@ tasks: # Run the tests with Slack, ST2 IUT on Ubuntu 16.04 run_with_slack_u16: - action: st2cd.st2_chatops_e2e_tests_with_slack - input: - host_ip: <% ctx().host_ip %> - st2_auth_token: <% ctx().env.ST2_AUTH_TOKEN %> - websocket: <% ctx().websocket %> - slack_channel: <% ctx().chatops_e2e_tests_slack_channel_u16 %> - slack_bot_username: "{{ ctx().chatops_e2e_tests_slack_bot_username_u16 }}" - slack_bot_api_token: "{{ ctx().chatops_e2e_tests_slack_bot_api_token_u16 }}" - slack_user_username: "{{ ctx().chatops_e2e_tests_slack_user_username_u16 }}" - slack_user_api_token: "{{ ctx().chatops_e2e_tests_slack_user_api_token_u16 }}" + # Removing these tests because: + # 1. They are failing for stupid reasons + # 2. I don't _think_ they are the root cause of the failure, I think it's something else + # 3. They only fail on Ubuntu Xenial + # 4. Other ChatOps end-to-end runs are passing successfully + # 5. Ubuntu Xenial is EOL in ~1 month anyway + action: core.noop + # action: st2cd.st2_chatops_e2e_tests_with_slack + # input: + # host_ip: <% ctx().host_ip %> + # st2_auth_token: <% ctx().env.ST2_AUTH_TOKEN %> + # websocket: <% ctx().websocket %> + # slack_channel: <% ctx().chatops_e2e_tests_slack_channel_u16 %> + # slack_bot_username: "{{ ctx().chatops_e2e_tests_slack_bot_username_u16 }}" + # slack_bot_api_token: "{{ ctx().chatops_e2e_tests_slack_bot_api_token_u16 }}" + # slack_user_username: "{{ ctx().chatops_e2e_tests_slack_user_username_u16 }}" + # slack_user_api_token: "{{ ctx().chatops_e2e_tests_slack_user_api_token_u16 }}" # Run the tests with Slack, ST2 IUT on Ubuntu 18.04 run_with_slack_u18: From 5fb8c6824d4b9bdfcd4163bf47eb05f1c8ae6fa6 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 16:38:52 -0800 Subject: [PATCH 14/37] Remove enterprise tasks from st2_e2e_tests --- actions/st2_e2e_tests.meta.yaml | 3 --- actions/workflows/st2_e2e_tests.yaml | 20 ++------------------ 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/actions/st2_e2e_tests.meta.yaml b/actions/st2_e2e_tests.meta.yaml index 1ce81845..14b6332f 100755 --- a/actions/st2_e2e_tests.meta.yaml +++ b/actions/st2_e2e_tests.meta.yaml @@ -41,9 +41,6 @@ parameters: st2tests_version: type: string description: Branch or version string used for the release. Should include the patch e.g. 0.1.0 - enterprise: - type: boolean - default: false chatops: type: boolean default: false diff --git a/actions/workflows/st2_e2e_tests.yaml b/actions/workflows/st2_e2e_tests.yaml index cebbac57..762d098e 100644 --- a/actions/workflows/st2_e2e_tests.yaml +++ b/actions/workflows/st2_e2e_tests.yaml @@ -12,7 +12,6 @@ input: - windows_username - windows_password - st2tests_version - - enterprise - chatops tasks: init: @@ -78,10 +77,7 @@ tasks: env: <% ctx().st2_cli_env %> protocol: <% ctx().protocol %> next: - - when: <% succeeded() and ctx().enterprise %> - do: - - run_enterprise_tests - - when: <% succeeded() and not ctx().enterprise %> + - when: <% succeeded() %> do: # - run_windows_tests - echo_st2_cli_env @@ -103,21 +99,9 @@ tasks: # env: <% ctx().st2_cli_env %> # protocol: <% ctx().protocol %> # next: - # - when: <% succeeded() and ctx().enterprise %> - # do: - # - run_enterprise_tests - # - when: <% succeeded() and not ctx().enterprise %> + # - when: <% succeeded() %> # do: # - run_docs_tests - run_enterprise_tests: - action: st2cd.st2_enterprise_tests - input: - host_ip: <% ctx().host_ip %> - next: - - when: <% succeeded() %> - do: - - echo_st2_cli_env - - run_docs_tests run_docs_tests: action: core.remote input: From ee68d8a071955c725697e05fe98e414ba69dd2a7 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 16:57:31 -0800 Subject: [PATCH 15/37] Remove bwc_release_packages workflow --- actions/bwc_release_packages.meta.yaml | 19 ------------------- actions/workflows/bwc_release_packages.yaml | 14 -------------- 2 files changed, 33 deletions(-) delete mode 100755 actions/bwc_release_packages.meta.yaml delete mode 100644 actions/workflows/bwc_release_packages.yaml diff --git a/actions/bwc_release_packages.meta.yaml b/actions/bwc_release_packages.meta.yaml deleted file mode 100755 index 6579f265..00000000 --- a/actions/bwc_release_packages.meta.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: bwc_release_packages -pack: st2cd -description: Promote all stable bwc packages from staging to production for all supported distros -enabled: true -runner_type: orquesta -entry_point: workflows/bwc_release_packages.yaml -parameters: - distros: - type: array - immutable: true - default: - - RHEL7 - - RHEL8 - - UBUNTU16 - - UBUNTU18 - version: - type: string - required: true diff --git a/actions/workflows/bwc_release_packages.yaml b/actions/workflows/bwc_release_packages.yaml deleted file mode 100644 index 760c2af8..00000000 --- a/actions/workflows/bwc_release_packages.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -version: '1.0' -input: - - distros - - version -tasks: - promote_all_distros: - with: - items: distro in <% ctx().distros %> - action: st2ci.bwc_pkg_promote_all - input: - distro: <% item(distro) %> - release: stable - version: <% ctx().version %> From 5f24b478160f37c317709930e71cd70b7914a051 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 18:07:40 -0800 Subject: [PATCH 16/37] Remove enterprise rules --- .../st2_pkg_test_stable_rhel7_enterprise.yaml | 27 ------------------- .../st2_pkg_test_stable_rhel8_enterprise.yaml | 27 ------------------- rules/st2_pkg_test_stable_u16_enterprise.yaml | 27 ------------------- rules/st2_pkg_test_stable_u18_enterprise.yaml | 27 ------------------- 4 files changed, 108 deletions(-) delete mode 100644 rules/st2_pkg_test_stable_rhel7_enterprise.yaml delete mode 100644 rules/st2_pkg_test_stable_rhel8_enterprise.yaml delete mode 100644 rules/st2_pkg_test_stable_u16_enterprise.yaml delete mode 100644 rules/st2_pkg_test_stable_u18_enterprise.yaml diff --git a/rules/st2_pkg_test_stable_rhel7_enterprise.yaml b/rules/st2_pkg_test_stable_rhel7_enterprise.yaml deleted file mode 100644 index 6531d3b1..00000000 --- a/rules/st2_pkg_test_stable_rhel7_enterprise.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: st2_pkg_test_stable_rhel7_enterprise -pack: st2cd -description: Test stable packages -enabled: false - -trigger: - type: core.st2.CronTimer - parameters: - timezone: US/Pacific - hour: 7 - minute: 0 - second: 0 - -criteria: {} - -action: - ref: st2ci.st2_pkg_e2e_test - parameters: - hostname: st2-ent-pkg-stable-el7 - distro: RHEL7 - pkg_env: production - release: stable - version: "3.3.0" - enterprise: true - enterprise_key: "{{st2kv.system.enterprise_key_prd_stable}}" - chatops: true diff --git a/rules/st2_pkg_test_stable_rhel8_enterprise.yaml b/rules/st2_pkg_test_stable_rhel8_enterprise.yaml deleted file mode 100644 index 285ea0bf..00000000 --- a/rules/st2_pkg_test_stable_rhel8_enterprise.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: st2_pkg_test_stable_rhel8_enterprise -pack: st2cd -description: Test stable packages -enabled: false - -trigger: - type: core.st2.CronTimer - parameters: - timezone: US/Pacific - hour: 7 - minute: 0 - second: 0 - -criteria: {} - -action: - ref: st2ci.st2_pkg_e2e_test - parameters: - hostname: st2-ent-pkg-stable-el8 - distro: RHEL8 - pkg_env: production - release: stable - version: "3.3.0" - enterprise: true - enterprise_key: "{{st2kv.system.enterprise_key_prd_stable}}" - chatops: true diff --git a/rules/st2_pkg_test_stable_u16_enterprise.yaml b/rules/st2_pkg_test_stable_u16_enterprise.yaml deleted file mode 100644 index 48e4e522..00000000 --- a/rules/st2_pkg_test_stable_u16_enterprise.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: st2_pkg_test_stable_u16_enterprise -pack: st2cd -description: Test stable packages -enabled: false - -trigger: - type: core.st2.CronTimer - parameters: - timezone: US/Pacific - hour: 7 - minute: 0 - second: 0 - -criteria: {} - -action: - ref: st2ci.st2_pkg_e2e_test - parameters: - hostname: st2-ent-pkg-stable-u16 - distro: UBUNTU16 - pkg_env: production - release: stable - version: "3.3.0" - enterprise: true - enterprise_key: "{{st2kv.system.enterprise_key_prd_stable}}" - chatops: true diff --git a/rules/st2_pkg_test_stable_u18_enterprise.yaml b/rules/st2_pkg_test_stable_u18_enterprise.yaml deleted file mode 100644 index 0790a31d..00000000 --- a/rules/st2_pkg_test_stable_u18_enterprise.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: st2_pkg_test_stable_u18_enterprise -pack: st2cd -description: Test stable packages -enabled: false - -trigger: - type: core.st2.CronTimer - parameters: - timezone: US/Pacific - hour: 7 - minute: 0 - second: 0 - -criteria: {} - -action: - ref: st2ci.st2_pkg_e2e_test - parameters: - hostname: st2-ent-pkg-stable-u18 - distro: UBUNTU18 - pkg_env: production - release: stable - version: "3.3.0" - enterprise: true - enterprise_key: "{{st2kv.system.enterprise_key_prd_stable}}" - chatops: true From 201ec61bab0317bc8640b6ffbf348d83b9d81f45 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 18:39:33 -0800 Subject: [PATCH 17/37] Remove bwc_finalize_release --- actions/bwc_finalize_release.meta.yaml | 22 ---------- actions/workflows/bwc_finalize_release.yaml | 46 --------------------- 2 files changed, 68 deletions(-) delete mode 100644 actions/bwc_finalize_release.meta.yaml delete mode 100644 actions/workflows/bwc_finalize_release.yaml diff --git a/actions/bwc_finalize_release.meta.yaml b/actions/bwc_finalize_release.meta.yaml deleted file mode 100644 index e4571acf..00000000 --- a/actions/bwc_finalize_release.meta.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: bwc_finalize_release -runner_type: orquesta -description: Finalize bwc release -enabled: true -entry_point: workflows/bwc_finalize_release.yaml -parameters: - version: - type: string - description: Version used for the release. Should include the patch e.g. 0.1.0 - required: true - fork: - type: string - description: Fork to use - default: StackStorm - host: - type: string - description: Host where to run the release process. - cwd: - type: string - description: Working directory where remote shell scripts use - default: /home/stanley diff --git a/actions/workflows/bwc_finalize_release.yaml b/actions/workflows/bwc_finalize_release.yaml deleted file mode 100644 index 8ee060df..00000000 --- a/actions/workflows/bwc_finalize_release.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -version: '1.0' -description: Finalize bwc release -input: - - version - - fork - - host - - cwd -vars: - - local_repo_sfx: -tasks: - init: - action: core.local - input: - cmd: echo `date +'%s'`_`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - next: - - when: <% succeeded() and (ctx().host = null) %> - publish: - - local_repo_sfx: <% result().stdout %> - - next_patch_version: <% ctx().version.split('.')[0] + '.' + ctx().version.split('.')[1] + '.' + str(int(ctx().version.split('.')[2]) + 1) %> - - major_minor_version: <% ctx().version.split('.')[0] + '.' + ctx().version.split('.')[1] %> - do: - - get_host - - when: <% succeeded() and (ctx().host != null) %> - publish: - - local_repo_sfx: <% result().stdout %> - - next_patch_version: <% ctx().version.split('.')[0] + '.' + ctx().version.split('.')[1] + '.' + str(int(ctx().version.split('.')[2]) + 1) %> - - major_minor_version: <% ctx().version.split('.')[0] + '.' + ctx().version.split('.')[1] %> - do: - - finalize - get_host: - action: linux.dig - input: - hostname: st2-build-slave-ubuntu.service.consul - rand: true - count: 1 - next: - - when: <% succeeded() %> - publish: - - host: <% result().result[0] %> - do: - - finalize - finalize: - next: - - do: - - noop From 3dac3b883fae36f0a423059bf3ab4de1305954c0 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 21:14:26 -0800 Subject: [PATCH 18/37] Check st2client README.rst syntax before uploading to PyPI --- actions/pypi_upload.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/actions/pypi_upload.sh b/actions/pypi_upload.sh index 94ba00ea..e92cdd9b 100755 --- a/actions/pypi_upload.sh +++ b/actions/pypi_upload.sh @@ -78,6 +78,17 @@ if [ "${REPO}" != "${PROJECT}" ]; then cd ./${PROJECT} fi +# Use the same readme renderer that PyPI uses to catch syntax issues in the +# README.rst file +# https://pypi.org/help/#description-content-type +# https://pypi.org/project/readme-renderer +# https://packaging.python.org/tutorials/packaging-projects/#description +echo "Checking README.rst syntax" +virtualenv venv-st2client-readme-checker +. venv-st2client-readme-checker/bin/activate +pip install --upgrade readme_renderer +python -m readme_renderer README.rst +deactivate echo "Currently at directory `pwd`..." sudo pip install -U twine wheel From 9741f17df4e8431c9f84bc8bbddf76e3ca5bef8b Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 22:31:20 -0800 Subject: [PATCH 19/37] Don't push enterprise Dockerfiles --- .../workflows/docker_finalize_release.yaml | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/actions/workflows/docker_finalize_release.yaml b/actions/workflows/docker_finalize_release.yaml index 53597757..76bfdb1c 100644 --- a/actions/workflows/docker_finalize_release.yaml +++ b/actions/workflows/docker_finalize_release.yaml @@ -93,63 +93,6 @@ tasks: branch: v<% ctx().major_minor_version %> hosts: <% ctx().host %> cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - wait_for_community_docker_image - - when: <% failed() %> - do: - - cleanup_on_failure - - # If it is acceptable for the enterprise build to fail, this wait is not required - wait_for_community_docker_image: - action: st2cd.wait_for_docker_image - input: - org: <% ctx().org.toLower() %> - image: st2web - version: <% ctx().version %> - tries: 13 - check_delay: 60 - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - timeout: 1000 - next: - - when: <% succeeded() %> - do: - - prep_st2enterprise_dockerfiles - - when: <% failed() %> - do: - - cleanup_on_failure - - # st2enterprise-dockerfiles requires st2-dockerfiles images - prep_st2enterprise_dockerfiles: - action: st2cd.docker_chg_ver - input: - project: st2enterprise-dockerfiles - version: <% ctx().version %> - org: extremenetworks - branch: v<% ctx().major_minor_version %> - local_repo: <% 'st2enterprise_dockerfiles_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - st2enterprise_dockerfiles_tag_release - - when: <% failed() %> - do: - - cleanup_on_failure - - st2enterprise_dockerfiles_tag_release: - action: st2cd.tag_release - input: - project: st2enterprise-dockerfiles - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'st2enterprise_dockerfiles_' + ctx().local_repo_sfx %> - branch: v<% ctx().major_minor_version %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> next: - when: <% failed() %> do: From 583e02a780f81cf7f4ca44ad82de6656931f4ed0 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 3 Mar 2021 23:22:14 -0800 Subject: [PATCH 20/37] Don't create rules for enterprise releases --- actions/st2_prep_release_cd_rules.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/actions/st2_prep_release_cd_rules.sh b/actions/st2_prep_release_cd_rules.sh index 4a0a0eb1..20232faa 100755 --- a/actions/st2_prep_release_cd_rules.sh +++ b/actions/st2_prep_release_cd_rules.sh @@ -3,7 +3,6 @@ # st2cd ############################################ # st2_pkg_test_stable_{{os}}.yaml -# st2_pkg_test_stable_{{os}}_enterprise.yaml set -e PROJECT=$1 @@ -46,7 +45,6 @@ function git_repo { function update_existing_rules { for os in $OSES; do sed -i "s/${PREV_VERSION}/${VERSION}/g" ./rules/st2_pkg_test_stable_${os}.yaml - sed -i "s/${PREV_VERSION}/${VERSION}/g" ./rules/st2_pkg_test_stable_${os}_enterprise.yaml done } From abba3793980818fd829fbf147547000ac9835271 Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 00:02:14 -0800 Subject: [PATCH 21/37] Move the LDAP and RBAC plugin prep dev workflows to st2_prep_dev, and remove now unused bwc_prep_dev actions --- actions/bwc_chg_ver_for_bwc_ui.sh | 67 --------- actions/bwc_prep_dev.meta.yaml | 22 --- actions/bwc_prep_dev_for_bwc_ui.meta.yaml | 44 ------ .../bwc_prep_dev_for_enterprise_pkg.meta.yaml | 38 ----- actions/bwc_prep_dev_for_pkg_suite.meta.yaml | 38 ----- actions/bwc_prep_dev_for_pkg_suite.sh | 64 -------- ...ta.yaml => st2_chg_ver_for_ldap.meta.yaml} | 12 +- ...bac_backend.sh => st2_chg_ver_for_ldap.sh} | 2 +- ...=> st2_chg_ver_for_rbac_backend.meta.yaml} | 10 +- ...dap.sh => st2_chg_ver_for_rbac_backend.sh} | 2 +- actions/st2_prep_dev_for_gui.meta.yaml | 1 - ...a.yaml => st2_prep_dev_for_ldap.meta.yaml} | 10 +- ...> st2_prep_dev_for_rbac_backend.meta.yaml} | 10 +- actions/workflows/bwc_prep_dev.yaml | 137 ------------------ actions/workflows/st2_prep_dev.yaml | 32 ++++ 15 files changed, 55 insertions(+), 434 deletions(-) delete mode 100644 actions/bwc_chg_ver_for_bwc_ui.sh delete mode 100755 actions/bwc_prep_dev.meta.yaml delete mode 100644 actions/bwc_prep_dev_for_bwc_ui.meta.yaml delete mode 100644 actions/bwc_prep_dev_for_enterprise_pkg.meta.yaml delete mode 100644 actions/bwc_prep_dev_for_pkg_suite.meta.yaml delete mode 100644 actions/bwc_prep_dev_for_pkg_suite.sh rename actions/{st2_chg_ver_for_enterprise_ldap.meta.yaml => st2_chg_ver_for_ldap.meta.yaml} (74%) rename actions/{st2_chg_ver_for_enterprise_rbac_backend.sh => st2_chg_ver_for_ldap.sh} (96%) rename actions/{st2_chg_ver_for_enterprise_rbac_backend.meta.yaml => st2_chg_ver_for_rbac_backend.meta.yaml} (78%) rename actions/{st2_chg_ver_for_enterprise_ldap.sh => st2_chg_ver_for_rbac_backend.sh} (96%) rename actions/{st2_prep_dev_for_enterprise_ldap.meta.yaml => st2_prep_dev_for_ldap.meta.yaml} (79%) rename actions/{st2_prep_dev_for_enterprise_rbac_backend.meta.yaml => st2_prep_dev_for_rbac_backend.meta.yaml} (77%) delete mode 100644 actions/workflows/bwc_prep_dev.yaml diff --git a/actions/bwc_chg_ver_for_bwc_ui.sh b/actions/bwc_chg_ver_for_bwc_ui.sh deleted file mode 100644 index 6f026d3e..00000000 --- a/actions/bwc_chg_ver_for_bwc_ui.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -BRANCH=$4 -LOCAL_REPO=$5 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} does not exist in ${GIT_REPO}." - exit 1 -fi - - -# GIT CLONE SPECIFIC BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone -b ${BRANCH} --single-branch ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - - -# SET NEW ST2 VERSION INFO -VERSION_FILE="package.json" -VERSION_STR="\"st2_version\": \"${VERSION}\"" - -VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to ${VERSION}..." - sed -i -e "s/\(^ \"st2_version\": \"\).*\(\"\)/\1${VERSION}\2/" ${VERSION_FILE} - - VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the st2 version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add ${VERSION_FILE} - git commit -qm "Update version to ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_prep_dev.meta.yaml b/actions/bwc_prep_dev.meta.yaml deleted file mode 100755 index 18bf0876..00000000 --- a/actions/bwc_prep_dev.meta.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: bwc_prep_dev -runner_type: orquesta -description: Prepare bwc for next iteration of development -enabled: true -entry_point: workflows/bwc_prep_dev.yaml -parameters: - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - fork: - type: string - description: Fork to use - default: StackStorm - host: - type: string - description: Host where to run the release process. - cwd: - type: string - description: Working directory where remote shell scripts use - default: /home/stanley diff --git a/actions/bwc_prep_dev_for_bwc_ui.meta.yaml b/actions/bwc_prep_dev_for_bwc_ui.meta.yaml deleted file mode 100644 index e9a416fc..00000000 --- a/actions/bwc_prep_dev_for_bwc_ui.meta.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -name: bwc_prep_dev_for_bwc_ui -description: Prepare the BWC GUI repo for next iteration of development -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_ui.sh -parameters: - project: - type: string - description: Project name for st2 - required: true - default: bwc-ui - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_dev_for_enterprise_pkg.meta.yaml b/actions/bwc_prep_dev_for_enterprise_pkg.meta.yaml deleted file mode 100644 index 0e8414c4..00000000 --- a/actions/bwc_prep_dev_for_enterprise_pkg.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_dev_for_enterprise_pkg -description: Prepare the bwc (st2 enterprise) packaging repo for next iteration of development -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_dev_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for bwc (st2 enterprise) packaging - default: bwc-enterprise-package - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_dev_for_pkg_suite.meta.yaml b/actions/bwc_prep_dev_for_pkg_suite.meta.yaml deleted file mode 100644 index 0f1f0908..00000000 --- a/actions/bwc_prep_dev_for_pkg_suite.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_dev_for_pkg_suite -description: Prepare any bwc packaging suite repo for next iteration of development -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_dev_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for the package suite - required: true - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: StackStorm - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_dev_for_pkg_suite.sh b/actions/bwc_prep_dev_for_pkg_suite.sh deleted file mode 100644 index 8c359784..00000000 --- a/actions/bwc_prep_dev_for_pkg_suite.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -LOCAL_REPO=$4 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -DEV_VERSION="${SHORT_VERSION}dev" -BRANCH="master" -CWD=`pwd` - - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - - -# SET NEW PKG VERSION INFO -VERSION_FILE="update-versions" -VERSION_STR=`cat ${VERSION_FILE}` -VERSION_ARRAY=(${VERSION_STR}) -STABLE_VERSION=${VERSION_ARRAY[1]} -OLD_VERSION_STR="${VERSION_STR}" -NEW_VERSION_STR="${DEV_VERSION} ${STABLE_VERSION}" - -NEW_VERSION_STR_MATCH=`grep "${NEW_VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to \"${NEW_VERSION_STR}\"..." - sed -i "s/${OLD_VERSION_STR}/${NEW_VERSION_STR}/g" ${VERSION_FILE} - - NEW_VERSION_STR_MATCH=`grep "${NEW_VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add ${VERSION_FILE} - git commit -qm "Update version to ${DEV_VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/st2_chg_ver_for_enterprise_ldap.meta.yaml b/actions/st2_chg_ver_for_ldap.meta.yaml similarity index 74% rename from actions/st2_chg_ver_for_enterprise_ldap.meta.yaml rename to actions/st2_chg_ver_for_ldap.meta.yaml index 903d7c79..46e2a56d 100644 --- a/actions/st2_chg_ver_for_enterprise_ldap.meta.yaml +++ b/actions/st2_chg_ver_for_ldap.meta.yaml @@ -1,14 +1,14 @@ --- -name: st2_chg_ver_for_enterprise_ldap -description: Change the version for the st2 enterprise ldap repo +name: st2_chg_ver_for_ldap +description: Change the version for the ST2 LDAP repo enabled: true runner_type: remote-shell-script -entry_point: st2_chg_ver_for_enterprise_ldap.sh +entry_point: st2_chg_ver_for_ldap.sh parameters: project: type: string - description: Project name for st2 enterprise ldap auth backend - default: st2-enterprise-auth-backend-ldap + description: Project name for ST2 LDAP auth backend + default: st2-auth-ldap position: 0 version: type: string @@ -18,7 +18,7 @@ parameters: fork: type: string description: Fork to use - default: extremenetworks + default: StackStorm position: 2 branch: type: string diff --git a/actions/st2_chg_ver_for_enterprise_rbac_backend.sh b/actions/st2_chg_ver_for_ldap.sh similarity index 96% rename from actions/st2_chg_ver_for_enterprise_rbac_backend.sh rename to actions/st2_chg_ver_for_ldap.sh index 3a65ff99..9d4a5b59 100644 --- a/actions/st2_chg_ver_for_enterprise_rbac_backend.sh +++ b/actions/st2_chg_ver_for_ldap.sh @@ -38,7 +38,7 @@ echo "Currently at directory `pwd`..." # SET ST2 VERSION INFO -VERSION_FILE="st2rbac_enterprise_backend/__init__.py" +VERSION_FILE="st2auth_ldap/__init__.py" VERSION_STR="__version__ = '${VERSION}'" VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` diff --git a/actions/st2_chg_ver_for_enterprise_rbac_backend.meta.yaml b/actions/st2_chg_ver_for_rbac_backend.meta.yaml similarity index 78% rename from actions/st2_chg_ver_for_enterprise_rbac_backend.meta.yaml rename to actions/st2_chg_ver_for_rbac_backend.meta.yaml index 20a4710f..e6b52394 100644 --- a/actions/st2_chg_ver_for_enterprise_rbac_backend.meta.yaml +++ b/actions/st2_chg_ver_for_rbac_backend.meta.yaml @@ -1,14 +1,14 @@ --- -name: st2_chg_ver_for_enterprise_rbac_backend -description: Change the version for the st2-enterprise-rbac-backend repo +name: st2_chg_ver_for_rbac_backend +description: Change the version for the st2-rbac-backend repo enabled: true runner_type: remote-shell-script -entry_point: st2_chg_ver_for_enterprise_rbac_backend.sh +entry_point: st2_chg_ver_for_rbac_backend.sh parameters: project: type: string description: Github project name - default: st2-enterprise-rbac-backend + default: st2-rbac-backend position: 0 version: type: string @@ -18,7 +18,7 @@ parameters: fork: type: string description: Fork to use - default: extremenetworks + default: StackStorm position: 2 branch: type: string diff --git a/actions/st2_chg_ver_for_enterprise_ldap.sh b/actions/st2_chg_ver_for_rbac_backend.sh similarity index 96% rename from actions/st2_chg_ver_for_enterprise_ldap.sh rename to actions/st2_chg_ver_for_rbac_backend.sh index 86898f5e..f9464f4a 100644 --- a/actions/st2_chg_ver_for_enterprise_ldap.sh +++ b/actions/st2_chg_ver_for_rbac_backend.sh @@ -38,7 +38,7 @@ echo "Currently at directory `pwd`..." # SET ST2 VERSION INFO -VERSION_FILE="st2auth_enterprise_ldap_backend/__init__.py" +VERSION_FILE="st2rbac_backend/__init__.py" VERSION_STR="__version__ = '${VERSION}'" VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` diff --git a/actions/st2_prep_dev_for_gui.meta.yaml b/actions/st2_prep_dev_for_gui.meta.yaml index 26e0cc08..42818018 100644 --- a/actions/st2_prep_dev_for_gui.meta.yaml +++ b/actions/st2_prep_dev_for_gui.meta.yaml @@ -11,7 +11,6 @@ parameters: required: true enum: - st2chatops - - st2flow - st2web position: 0 version: diff --git a/actions/st2_prep_dev_for_enterprise_ldap.meta.yaml b/actions/st2_prep_dev_for_ldap.meta.yaml similarity index 79% rename from actions/st2_prep_dev_for_enterprise_ldap.meta.yaml rename to actions/st2_prep_dev_for_ldap.meta.yaml index 6801ebeb..9f464ea2 100644 --- a/actions/st2_prep_dev_for_enterprise_ldap.meta.yaml +++ b/actions/st2_prep_dev_for_ldap.meta.yaml @@ -1,14 +1,14 @@ --- -name: st2_prep_dev_for_enterprise_ldap +name: st2_prep_dev_for_ldap description: Prepare the st2 enterprise ldap repo for next iteration of development enabled: true runner_type: remote-shell-script -entry_point: st2_chg_ver_for_enterprise_ldap.sh +entry_point: st2_chg_ver_for_ldap.sh parameters: project: type: string - description: Project name for st2 enterprise ldap auth backend - default: st2-enterprise-auth-backend-ldap + description: Project name for ST2 LDAP auth backend + default: st2-auth-ldap position: 0 version: type: string @@ -18,7 +18,7 @@ parameters: fork: type: string description: Fork to use - default: extremenetworks + default: StackStorm position: 2 branch: type: string diff --git a/actions/st2_prep_dev_for_enterprise_rbac_backend.meta.yaml b/actions/st2_prep_dev_for_rbac_backend.meta.yaml similarity index 77% rename from actions/st2_prep_dev_for_enterprise_rbac_backend.meta.yaml rename to actions/st2_prep_dev_for_rbac_backend.meta.yaml index e644a7e5..c2525cff 100644 --- a/actions/st2_prep_dev_for_enterprise_rbac_backend.meta.yaml +++ b/actions/st2_prep_dev_for_rbac_backend.meta.yaml @@ -1,14 +1,14 @@ --- -name: st2_prep_dev_for_enterprise_rbac_backend -description: Prepare the st2-enterprise-rbac-backend repo for next iteration of development +name: st2_prep_dev_for_rbac_backend +description: Prepare the st2-rbac-backend repo for next iteration of development enabled: true runner_type: remote-shell-script -entry_point: st2_chg_ver_for_enterprise_rbac_backend.sh +entry_point: st2_chg_ver_for_rbac_backend.sh parameters: project: type: string description: Github project name - default: st2-enterprise-rbac-backend + default: st2-rbac-backend position: 0 version: type: string @@ -18,7 +18,7 @@ parameters: fork: type: string description: Fork to use - default: extremenetworks + default: StackStorm position: 2 branch: type: string diff --git a/actions/workflows/bwc_prep_dev.yaml b/actions/workflows/bwc_prep_dev.yaml deleted file mode 100644 index 1b82758e..00000000 --- a/actions/workflows/bwc_prep_dev.yaml +++ /dev/null @@ -1,137 +0,0 @@ ---- -version: '1.0' -description: Prepare bwc for next iteration of development. -input: - - version - - fork - - host - - cwd -vars: - - dev_version: <% ctx().version.split('.')[0] + '.' + ctx().version.split('.')[1] + 'dev' %> - - local_repo_sfx: -tasks: - init: - action: core.local - input: - cmd: echo `date +'%s'`_`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - next: - - when: <% succeeded() and (ctx().host = null) %> - publish: - - local_repo_sfx: <% result().stdout %> - do: - - get_host - - when: <% succeeded() and (ctx().host != null) %> - publish: - - local_repo_sfx: <% result().stdout %> - do: - - prep - get_host: - action: linux.dig - input: - hostname: st2-build-slave-ubuntu.service.consul - rand: true - count: 1 - next: - - when: <% succeeded() %> - publish: - - host: <% result().result[0] %> - do: - - prep - prep: - next: - - do: - - prep_bwc_enterprise_pkg - prep_bwc_enterprise_pkg: - action: st2cd.bwc_prep_dev_for_enterprise_pkg - input: - project: bwc-enterprise-package - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'bwc_enterprise_package_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2enterprise_ldap - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2enterprise_ldap: - action: st2cd.st2_prep_dev_for_enterprise_ldap - input: - project: st2-enterprise-auth-backend-ldap - version: <% ctx().dev_version %> - fork: extremenetworks - local_repo: <% 'st2enterprise_auth_ldap_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2enterprise_rbac_backend - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2enterprise_rbac_backend: - action: st2cd.st2_prep_dev_for_enterprise_rbac_backend - input: - project: st2-enterprise-rbac-backend - version: <% ctx().dev_version %> - fork: extremenetworks - local_repo: <% 'st2enterprise_rbac_backend' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_bwc_ui - - when: <% failed() %> - do: - - cleanup_on_failure - prep_bwc_ui: - action: st2cd.bwc_prep_dev_for_bwc_ui - input: - project: bwc-ui - version: <% ctx().dev_version %> - fork: extremenetworks - local_repo: <% 'bwc_ui_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2flow - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2flow: - action: st2cd.st2_prep_dev_for_gui - input: - project: st2flow - version: <% ctx().dev_version %> - fork: extremenetworks - local_repo: <% 'st2flow_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% failed() %> - do: - - cleanup_on_failure - - cleanup_on_failure: - next: - - when: <% ctx().local_repo_sfx != null %> - do: - - cleanup - - when: <% ctx().local_repo_sfx = null %> - do: - - fail - cleanup: - action: core.remote - input: - cmd: <% 'rm -rf ' + ctx().cwd + '/st2*' + ctx().local_repo_sfx + ' ' + ctx().cwd + '/bwc*' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - next: - - do: - - fail diff --git a/actions/workflows/st2_prep_dev.yaml b/actions/workflows/st2_prep_dev.yaml index daba250c..68be1ebd 100644 --- a/actions/workflows/st2_prep_dev.yaml +++ b/actions/workflows/st2_prep_dev.yaml @@ -50,6 +50,38 @@ tasks: local_repo: <% 'st2_' + ctx().local_repo_sfx %> hosts: <% ctx().host %> cwd: <% ctx().cwd %> + next: + - when: <% succeeded() %> + do: + - prep_st2_ldap + - when: <% failed() %> + do: + - cleanup_on_failure + prep_st2_ldap: + action: st2cd.st2_prep_dev_for_ldap + input: + project: st2-auth-ldap + version: <% ctx().dev_version %> + fork: StackStorm + local_repo: <% 'st2_auth_ldap_' + ctx().local_repo_sfx %> + hosts: <% ctx().host %> + cwd: <% ctx().cwd %> + next: + - when: <% succeeded() %> + do: + - prep_st2_rbac_backend + - when: <% failed() %> + do: + - cleanup_on_failure + prep_st2_rbac_backend: + action: st2cd.st2_prep_dev_for_rbac_backend + input: + project: st2-rbac-backend + version: <% ctx().dev_version %> + fork: StackStorm + local_repo: <% 'st2_rbac_backend' + ctx().local_repo_sfx %> + hosts: <% ctx().host %> + cwd: <% ctx().cwd %> next: - when: <% succeeded() %> do: From 454134448cb02d202a4df9ac4688d6709c0af019 Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 00:45:31 -0800 Subject: [PATCH 22/37] Update docker_pre_dev workflow --- actions/workflows/docker_prep_dev.yaml | 39 -------------------------- 1 file changed, 39 deletions(-) diff --git a/actions/workflows/docker_prep_dev.yaml b/actions/workflows/docker_prep_dev.yaml index 483cc308..ec411f02 100644 --- a/actions/workflows/docker_prep_dev.yaml +++ b/actions/workflows/docker_prep_dev.yaml @@ -54,45 +54,6 @@ tasks: local_repo: <% 'st2_dockerfiles_' + ctx().local_repo_sfx %> hosts: <% ctx().host %> cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - wait_for_community_docker_image - - when: <% failed() %> - do: - - cleanup_on_failure - - # If it is acceptable for the enterprise build to fail, this wait is not required - wait_for_community_docker_image: - action: st2cd.wait_for_docker_image - input: - org: <% ctx().org %> - image: st2web - version: <% ctx().dev_version %> - tries: 10 - check_delay: 60 - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - timeout: 650 - next: - - when: <% succeeded() %> - do: - - prep_st2enterprise_dockerfiles - - when: <% failed() %> - do: - - cleanup_on_failure - - # st2enterprise-dockerfiles requires st2-dockerfiles images - prep_st2enterprise_dockerfiles: - action: st2cd.docker_chg_ver - input: - project: st2enterprise-dockerfiles - version: <% ctx().dev_version %> - org: extremenetworks - branch: master - local_repo: <% 'st2enterprise_dockerfiles_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> next: - when: <% failed() %> do: From e83fa405f55a2d34b9c012ff5e37c133e42dc8ef Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 01:13:41 -0800 Subject: [PATCH 23/37] Remove unused bwc workflows --- actions/bwc_chg_ver_for_bwc_cli.meta.yaml | 43 ------- actions/bwc_chg_ver_for_bwc_cli.sh | 66 ---------- ...c_chg_ver_for_bwc_ipfabric_packs.meta.yaml | 43 ------- actions/bwc_chg_ver_for_bwc_ipfabric_packs.sh | 66 ---------- .../bwc_chg_ver_for_bwc_topology.meta.yaml | 43 ------- actions/bwc_chg_ver_for_bwc_topology.sh | 66 ---------- actions/bwc_chg_ver_for_pkg_suite.meta.yaml | 43 ------- actions/bwc_chg_ver_for_pkg_suite.sh | 70 ----------- actions/bwc_prep_dev_for_bwc_cli.meta.yaml | 43 ------- ..._prep_dev_for_bwc_ipfabric_packs.meta.yaml | 43 ------- ..._prep_dev_for_bwc_ipfabric_suite.meta.yaml | 38 ------ .../bwc_prep_dev_for_bwc_topology.meta.yaml | 43 ------- actions/bwc_prep_patch.meta.yaml | 22 ---- actions/bwc_prep_patch_for_bwc_cli.meta.yaml | 43 ------- ...rep_patch_for_bwc_ipfabric_packs.meta.yaml | 43 ------- ...rep_patch_for_bwc_ipfabric_suite.meta.yaml | 43 ------- .../bwc_prep_patch_for_bwc_topology.meta.yaml | 43 ------- ...wc_prep_patch_for_enterprise_pkg.meta.yaml | 43 ------- actions/bwc_stage_release_packages.meta.yaml | 33 ----- actions/workflows/bwc_prep_patch.yaml | 118 ------------------ .../workflows/bwc_stage_release_packages.yaml | 50 -------- 21 files changed, 1045 deletions(-) delete mode 100644 actions/bwc_chg_ver_for_bwc_cli.meta.yaml delete mode 100644 actions/bwc_chg_ver_for_bwc_cli.sh delete mode 100644 actions/bwc_chg_ver_for_bwc_ipfabric_packs.meta.yaml delete mode 100644 actions/bwc_chg_ver_for_bwc_ipfabric_packs.sh delete mode 100644 actions/bwc_chg_ver_for_bwc_topology.meta.yaml delete mode 100644 actions/bwc_chg_ver_for_bwc_topology.sh delete mode 100644 actions/bwc_chg_ver_for_pkg_suite.meta.yaml delete mode 100644 actions/bwc_chg_ver_for_pkg_suite.sh delete mode 100644 actions/bwc_prep_dev_for_bwc_cli.meta.yaml delete mode 100644 actions/bwc_prep_dev_for_bwc_ipfabric_packs.meta.yaml delete mode 100644 actions/bwc_prep_dev_for_bwc_ipfabric_suite.meta.yaml delete mode 100644 actions/bwc_prep_dev_for_bwc_topology.meta.yaml delete mode 100755 actions/bwc_prep_patch.meta.yaml delete mode 100644 actions/bwc_prep_patch_for_bwc_cli.meta.yaml delete mode 100644 actions/bwc_prep_patch_for_bwc_ipfabric_packs.meta.yaml delete mode 100644 actions/bwc_prep_patch_for_bwc_ipfabric_suite.meta.yaml delete mode 100644 actions/bwc_prep_patch_for_bwc_topology.meta.yaml delete mode 100644 actions/bwc_prep_patch_for_enterprise_pkg.meta.yaml delete mode 100755 actions/bwc_stage_release_packages.meta.yaml delete mode 100644 actions/workflows/bwc_prep_patch.yaml delete mode 100644 actions/workflows/bwc_stage_release_packages.yaml diff --git a/actions/bwc_chg_ver_for_bwc_cli.meta.yaml b/actions/bwc_chg_ver_for_bwc_cli.meta.yaml deleted file mode 100644 index f0a0d8b7..00000000 --- a/actions/bwc_chg_ver_for_bwc_cli.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_chg_ver_for_bwc_cli -description: Change the version for the bwc cli repo -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_cli.sh -parameters: - project: - type: string - description: Project name for bwc cli - default: bwc-cli - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_chg_ver_for_bwc_cli.sh b/actions/bwc_chg_ver_for_bwc_cli.sh deleted file mode 100644 index 7cd9f378..00000000 --- a/actions/bwc_chg_ver_for_bwc_cli.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -BRANCH=$4 -LOCAL_REPO=$5 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} does not exist in ${GIT_REPO}." - exit 1 -fi - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone -b ${BRANCH} --single-branch ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - - -# SET BWC VERSION INFO -VERSION_FILE="bwc_cli/__init__.py" -VERSION_STR="__version__ = '${VERSION}'" - -VERSION_STR_MATCH=`grep "^${VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to ${VERSION}..." - sed -i -e "s/\(__version__ = \).*/\1'${VERSION}'/" ${VERSION_FILE} - - VERSION_STR_MATCH=`grep "^${VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add -A - git commit -qm "Update version to ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_chg_ver_for_bwc_ipfabric_packs.meta.yaml b/actions/bwc_chg_ver_for_bwc_ipfabric_packs.meta.yaml deleted file mode 100644 index 1c88206e..00000000 --- a/actions/bwc_chg_ver_for_bwc_ipfabric_packs.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_chg_dev_for_bwc_ipfabric_packs -description: Change the version for the bwc ip fabric packs repo -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_ipfabric_packs.sh -parameters: - project: - type: string - description: Project name for bwc ip fabric packs - default: bwc-ipfabric-packs - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_chg_ver_for_bwc_ipfabric_packs.sh b/actions/bwc_chg_ver_for_bwc_ipfabric_packs.sh deleted file mode 100644 index abbb4ef2..00000000 --- a/actions/bwc_chg_ver_for_bwc_ipfabric_packs.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -BRANCH=$4 -LOCAL_REPO=$5 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} does not exist in ${GIT_REPO}." - exit 1 -fi - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone -b ${BRANCH} --single-branch ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - - -# SET BWC VERSION INFO -VERSION_FILE="pkg_version" -VERSION_STR="${VERSION}" - -VERSION_STR_MATCH=`grep "^${VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to ${VERSION}..." - echo ${VERSION} > ${VERSION_FILE} - - VERSION_STR_MATCH=`grep "^${VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add -A - git commit -qm "Update version to ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_chg_ver_for_bwc_topology.meta.yaml b/actions/bwc_chg_ver_for_bwc_topology.meta.yaml deleted file mode 100644 index f29d6a91..00000000 --- a/actions/bwc_chg_ver_for_bwc_topology.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_chg_dev_for_bwc_topology -description: Change the version for the bwc topology repo -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_topology.sh -parameters: - project: - type: string - description: Project name for bwc topology - default: bwc-topology - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_chg_ver_for_bwc_topology.sh b/actions/bwc_chg_ver_for_bwc_topology.sh deleted file mode 100644 index ddeb49f3..00000000 --- a/actions/bwc_chg_ver_for_bwc_topology.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -BRANCH=$4 -LOCAL_REPO=$5 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} does not exist in ${GIT_REPO}." - exit 1 -fi - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone -b ${BRANCH} --single-branch ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - - -# SET BWC VERSION INFO -VERSION_FILE="bwc/__init__.py" -VERSION_STR="__version__ = '${VERSION}'" - -VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to ${VERSION}..." - sed -i -e "s/\(__version__ = \).*/\1'${VERSION}'/" ${VERSION_FILE} - - VERSION_STR_MATCH=`grep "${VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add -A - git commit -qm "Update version to ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_chg_ver_for_pkg_suite.meta.yaml b/actions/bwc_chg_ver_for_pkg_suite.meta.yaml deleted file mode 100644 index 46446856..00000000 --- a/actions/bwc_chg_ver_for_pkg_suite.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_chg_dev_for_pkg_suite -description: Change the version for any bwc packaging suite -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for package suite - required: true - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: StackStorm - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_chg_ver_for_pkg_suite.sh b/actions/bwc_chg_ver_for_pkg_suite.sh deleted file mode 100644 index bac3c0af..00000000 --- a/actions/bwc_chg_ver_for_pkg_suite.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -set -e - -PROJECT=$1 -VERSION=$2 -FORK=$3 -BRANCH=$4 -LOCAL_REPO=$5 -GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -CWD=`pwd` - - -# CHECK IF BRANCH EXISTS -BRANCH_EXISTS=`git ls-remote --heads ${GIT_REPO} | grep refs/heads/${BRANCH} || true` - -if [[ -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} does not exist in ${GIT_REPO}." - exit 1 -fi - -# GIT CLONE AND BRANCH -if [[ -z ${LOCAL_REPO} ]]; then - CURRENT_TIMESTAMP=`date +'%s'` - RANDOM_NUMBER=`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - LOCAL_REPO=${PROJECT}_${CURRENT_TIMESTAMP}_${RANDOM_NUMBER} -fi - -echo "Cloning ${GIT_REPO} to ${LOCAL_REPO}..." - -if [ -d "${LOCAL_REPO}" ]; then - rm -rf ${LOCAL_REPO} -fi - -git clone -b ${BRANCH} --single-branch ${GIT_REPO} ${LOCAL_REPO} - -cd ${LOCAL_REPO} -echo "Currently at directory `pwd`..." - - -# SET NEW BWC VERSION INFO -VERSION_FILE="update-versions" -VERSION_STR=`cat ${VERSION_FILE}` -VERSION_ARRAY=(${VERSION_STR}) -DEV_VERSION=${VERSION_ARRAY[0]} -OLD_VERSION_STR="${VERSION_STR}" -NEW_VERSION_STR="${DEV_VERSION} ${VERSION}" - -NEW_VERSION_STR_MATCH=`grep "${NEW_VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_VERSION_STR_MATCH}" ]]; then - echo "Setting version in ${VERSION_FILE} to \"${NEW_VERSION_STR}\"..." - sed -i "s/${OLD_VERSION_STR}/${NEW_VERSION_STR}/g" ${VERSION_FILE} - - NEW_VERSION_STR_MATCH=`grep "${NEW_VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the version in ${VERSION_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - git add ${VERSION_FILE} - git commit -qm "Update version to ${VERSION}" - git push origin ${BRANCH} -q -fi - - -# CLEANUP -cd ${CWD} -rm -rf ${LOCAL_REPO} diff --git a/actions/bwc_prep_dev_for_bwc_cli.meta.yaml b/actions/bwc_prep_dev_for_bwc_cli.meta.yaml deleted file mode 100644 index 5c61c7fc..00000000 --- a/actions/bwc_prep_dev_for_bwc_cli.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_prep_dev_for_bwc_cli -description: Prepare the bwc cli repo for next iteration of development -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_cli.sh -parameters: - project: - type: string - description: Project name for bwc cli - default: bwc-cli - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_dev_for_bwc_ipfabric_packs.meta.yaml b/actions/bwc_prep_dev_for_bwc_ipfabric_packs.meta.yaml deleted file mode 100644 index 9e7ca34d..00000000 --- a/actions/bwc_prep_dev_for_bwc_ipfabric_packs.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_prep_dev_for_bwc_ipfabric_packs -description: Prepare the bwc ip fabric packs repo for next iteration of development -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_ipfabric_packs.sh -parameters: - project: - type: string - description: Project name for bwc ip fabric packs - default: bwc-ipfabric-packs - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_dev_for_bwc_ipfabric_suite.meta.yaml b/actions/bwc_prep_dev_for_bwc_ipfabric_suite.meta.yaml deleted file mode 100644 index e55589c0..00000000 --- a/actions/bwc_prep_dev_for_bwc_ipfabric_suite.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: bwc_prep_dev_for_bwc_ipfabric_suite -description: Prepare the bwc ip fabric suite repo for next iteration of development -enabled: true -runner_type: remote-shell-script -entry_point: bwc_prep_dev_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for bwc ip fabric suite - default: bwc-ipfabric-suite-packages - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 3 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_dev_for_bwc_topology.meta.yaml b/actions/bwc_prep_dev_for_bwc_topology.meta.yaml deleted file mode 100644 index 4e61de4e..00000000 --- a/actions/bwc_prep_dev_for_bwc_topology.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_prep_dev_for_bwc_topology -description: Prepare the bwc topology repo for next iteration of development -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_topology.sh -parameters: - project: - type: string - description: Project name for bwc topology - default: bwc-topology - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_patch.meta.yaml b/actions/bwc_prep_patch.meta.yaml deleted file mode 100755 index c2d24b92..00000000 --- a/actions/bwc_prep_patch.meta.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: bwc_prep_patch -runner_type: orquesta -description: Prepare bwc for patch release -enabled: true -entry_point: workflows/bwc_prep_patch.yaml -parameters: - version: - type: string - description: Version to use for the patch release. Should include the patch e.g. 0.1.0 - required: true - fork: - type: string - description: Fork to use - default: StackStorm - host: - type: string - description: Host where to run the release process. - cwd: - type: string - description: Working directory where remote shell scripts use - default: /home/stanley diff --git a/actions/bwc_prep_patch_for_bwc_cli.meta.yaml b/actions/bwc_prep_patch_for_bwc_cli.meta.yaml deleted file mode 100644 index 855cf5dd..00000000 --- a/actions/bwc_prep_patch_for_bwc_cli.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_prep_patch_for_bwc_cli -description: Prepare the bwc cli repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_cli.sh -parameters: - project: - type: string - description: Project name for bwc cli - default: bwc-cli - position: 0 - version: - type: string - description: Version to use for the patch release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: v{{version.split('.')[0]}}.{{version.split('.')[1]}} - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_patch_for_bwc_ipfabric_packs.meta.yaml b/actions/bwc_prep_patch_for_bwc_ipfabric_packs.meta.yaml deleted file mode 100644 index 3d00134f..00000000 --- a/actions/bwc_prep_patch_for_bwc_ipfabric_packs.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_prep_patch_for_bwc_ipfabric_packs -description: Prepare the bwc ip fabric packs repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_ipfabric_packs.sh -parameters: - project: - type: string - description: Project name for bwc ip fabric packs - default: bwc-ipfabric-packs - position: 0 - version: - type: string - description: Version to use for the patch release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: v{{version.split('.')[0]}}.{{version.split('.')[1]}} - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_patch_for_bwc_ipfabric_suite.meta.yaml b/actions/bwc_prep_patch_for_bwc_ipfabric_suite.meta.yaml deleted file mode 100644 index eae6758c..00000000 --- a/actions/bwc_prep_patch_for_bwc_ipfabric_suite.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_prep_patch_for_bwc_ipfabric_suite -description: Prepare the bwc ip fabric suite repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for bwc ip fabric suite - default: bwc-ipfabric-suite-packages - position: 0 - version: - type: string - description: Version to use for the patch release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_patch_for_bwc_topology.meta.yaml b/actions/bwc_prep_patch_for_bwc_topology.meta.yaml deleted file mode 100644 index 13bc3d8c..00000000 --- a/actions/bwc_prep_patch_for_bwc_topology.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_prep_patch_for_bwc_topology -description: Prepare the bwc topology repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_bwc_topology.sh -parameters: - project: - type: string - description: Project name for bwc topology - default: bwc-topology - position: 0 - version: - type: string - description: Version to use for the patch release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: v{{version.split('.')[0]}}.{{version.split('.')[1]}} - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_prep_patch_for_enterprise_pkg.meta.yaml b/actions/bwc_prep_patch_for_enterprise_pkg.meta.yaml deleted file mode 100644 index 0219cda2..00000000 --- a/actions/bwc_prep_patch_for_enterprise_pkg.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: bwc_prep_patch_for_enterprise_pkg -description: Prepare the bwc (st2 enterprise) packaging repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_pkg_suite.sh -parameters: - project: - type: string - description: Project name for bwc enterprise packaging repo - default: bwc-enterprise-package - position: 0 - version: - type: string - description: Version to use for the patch release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/bwc_stage_release_packages.meta.yaml b/actions/bwc_stage_release_packages.meta.yaml deleted file mode 100755 index 45320761..00000000 --- a/actions/bwc_stage_release_packages.meta.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: bwc_stage_release_packages -runner_type: orquesta -description: Stage bwc packages for release. Run this only if circleci doesn't build automatically. -enabled: true -entry_point: workflows/bwc_stage_release_packages.yaml -parameters: - version: - type: string - description: Version to use for the release. Should include the patch e.g. 0.1.0 - required: true - projects: - type: array - items: - type: string - enum: - - bwc-cli - - bwc-enterprise-package - - bwc-ipfabric-packs - - bwc-ipfabric-suite-packages - - bwc-topology - - bwc-ui - - st2-enterprise-auth-backend-ldap - description: The list of projects to stage release. - required: true - wait: - type: boolean - description: If true, then wait until package jobs are completed. - default: false - workflow: - default: st2cd.bwc_stage_release_packages.main - immutable: true - type: string diff --git a/actions/workflows/bwc_prep_patch.yaml b/actions/workflows/bwc_prep_patch.yaml deleted file mode 100644 index 16cbc401..00000000 --- a/actions/workflows/bwc_prep_patch.yaml +++ /dev/null @@ -1,118 +0,0 @@ ---- -version: '1.0' -description: Prepare bwc for patch release. -input: - - version - - fork - - host - - cwd -vars: - - local_repo_sfx: -tasks: - init: - action: core.local - input: - cmd: echo `date +'%s'`_`awk -v min=100 -v max=999 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'` - next: - - when: <% succeeded() and (ctx().host = null) %> - publish: - - local_repo_sfx: <% result().stdout %> - do: - - get_host - - when: <% succeeded() and (ctx().host != null) %> - publish: - - local_repo_sfx: <% result().stdout %> - do: - - prep - get_host: - action: linux.dig - input: - hostname: st2-build-slave-ubuntu.service.consul - rand: true - count: 1 - next: - - when: <% succeeded() %> - publish: - - host: <% result().result[0] %> - do: - - prep - prep: - next: - - do: - - prep_bwc_enterprise_pkg - prep_bwc_enterprise_pkg: - action: st2cd.bwc_prep_patch_for_enterprise_pkg - input: - project: bwc-enterprise-package - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'bwc_enterprise_package_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2enterprise_ldap - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2enterprise_ldap: - action: st2cd.st2_prep_patch_for_enterprise_ldap - input: - project: st2-enterprise-auth-backend-ldap - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'st2enterprise_auth_ldap_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2enterprise_rbac_backend - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2enterprise_rbac_backend: - action: st2cd.st2_prep_patch_for_enterprise_rbac_backend - input: - project: st2-enterprise-rbac-backend - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'st2enterprise_rbac_backend_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_bwc_ui - - when: <% failed() %> - do: - - cleanup_on_failure - prep_bwc_ui: - action: st2cd.bwc_stage_release_packages - input: - version: <% ctx().version %> - projects: - - bwc-ui - wait: false - next: - - when: <% failed() %> - do: - - cleanup_on_failure - - cleanup_on_failure: - next: - - when: <% ctx().local_repo_sfx != null %> - do: - - cleanup - - when: <% ctx().local_repo_sfx = null %> - do: - - fail - cleanup: - action: core.remote - input: - cmd: <% 'rm -rf ' + ctx().cwd + '/st2*' + ctx().local_repo_sfx + ' ' + ctx().cwd + '/bwc*' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - next: - - do: - - fail diff --git a/actions/workflows/bwc_stage_release_packages.yaml b/actions/workflows/bwc_stage_release_packages.yaml deleted file mode 100644 index 9cd134f3..00000000 --- a/actions/workflows/bwc_stage_release_packages.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -version: '1.0' -description: Stage bwc packages for release. - -input: - - version - - projects - - wait - - distros: - RHEL7: el7 - RHEL8: el8 - UBUNTU16: u16 - UBUNTU18: u18 - -vars: - - username: StackStorm - -tasks: - init: - action: core.local - input: - cmd: echo -n '"'; echo -n <% ctx().version %> | cut -d "." -f1-2 | tr -d '\n'; echo -n '"' - next: - - when: <% succeeded() %> - publish: - - branch: v<% result().stdout %> - do: - - package_all - package_all: - with: - items: project in <% ctx().projects %> - action: circle_ci.run_build - input: - project: <% item(project) %> - username: <% ctx().username %> - branch: <% ctx().branch %> - next: - - when: <% succeeded() and (ctx().wait) %> - publish: - - package_jobs: <% result().select( [$.result.reponame, $.result.build_num]) %> - do: - - wait_for_packages - wait_for_packages: - with: - items: package_job in <% ctx().package_jobs %> - action: st2cd.wait_for_package - input: - project: <% item(package_job)[0] %> - username: <% ctx().username %> - build_number: <% str(item(package_job)[1]) %> From c3e4b06324fa7c27ece55744b66b97ede4402727 Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:06:36 -0800 Subject: [PATCH 24/37] Rename typo st2_get_intalled_version.meta.yaml -> st2_get_installed_version.meta.yaml --- ...lled_version.meta.yaml => st2_get_installed_version.meta.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename actions/{st2_get_intalled_version.meta.yaml => st2_get_installed_version.meta.yaml} (100%) diff --git a/actions/st2_get_intalled_version.meta.yaml b/actions/st2_get_installed_version.meta.yaml similarity index 100% rename from actions/st2_get_intalled_version.meta.yaml rename to actions/st2_get_installed_version.meta.yaml From bc1953f5c8a7f0a4537f3a176ff3bf259b10069f Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:07:29 -0800 Subject: [PATCH 25/37] Remove non-packages from st2_get_installed_version packages parameter --- actions/st2_get_installed_version.meta.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/actions/st2_get_installed_version.meta.yaml b/actions/st2_get_installed_version.meta.yaml index 9be64700..7c5904ba 100755 --- a/actions/st2_get_installed_version.meta.yaml +++ b/actions/st2_get_installed_version.meta.yaml @@ -13,9 +13,6 @@ parameters: type: array required: true default: - - st2-auth-ldap - - st2-rbac-backend - - st2flow - st2web - st2chatops - st2 From d83ce8481c4ee08c579da10647ce989e3f8564b1 Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:19:39 -0800 Subject: [PATCH 26/37] Remove the st2_upgrade_to_enterprise action --- actions/st2_upgrade_to_enterprise.meta.yaml | 69 ------- actions/st2_upgrade_to_enterprise.sh | 191 -------------------- 2 files changed, 260 deletions(-) delete mode 100644 actions/st2_upgrade_to_enterprise.meta.yaml delete mode 100755 actions/st2_upgrade_to_enterprise.sh diff --git a/actions/st2_upgrade_to_enterprise.meta.yaml b/actions/st2_upgrade_to_enterprise.meta.yaml deleted file mode 100644 index 7e55ae72..00000000 --- a/actions/st2_upgrade_to_enterprise.meta.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -name: st2_upgrade_to_enterprise -description: Run enterprise upgrade -enabled: true -runner_type: remote-shell-script -entry_point: st2_upgrade_to_enterprise.sh -parameters: - license_key: - type: string - required: true - position: 0 - distro: - type: string - required: true - enum: - - RHEL7 - - RHEL8 - - UBUNTU16 - - UBUNTU18 - position: 1 - release: - type: string - enum: - - stable - - unstable - default: stable - position: 2 - pkg_env: - type: string - enum: - - staging - - production - default: production - position: 3 - version: # example: 1.5.1 - type: string - position: 4 - ldap_host: - type: string - default: "{{st2kv.system.enterprise_ad_host}}" - position: 5 - ldap_bind_dn: - type: string - default: "{{st2kv.system.enterprise_ad_bind_dn}}" - position: 6 - ldap_bind_passwd: - type: string - default: "{{st2kv.system.enterprise_ad_bind_passwd}}" - position: 7 - ldap_base_ou: - type: string - default: "{{st2kv.system.enterprise_ad_base_ou}}" - position: 8 - ldap_group_dn: - type: string - default: "{{st2kv.system.enterprise_ad_group_dn}}" - position: 9 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: true - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/st2_upgrade_to_enterprise.sh b/actions/st2_upgrade_to_enterprise.sh deleted file mode 100755 index ed3fcb66..00000000 --- a/actions/st2_upgrade_to_enterprise.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/bin/bash -set -e - -LICENSE_KEY=$1 -DISTRO=$2 -RELEASE=$3 -PKG_ENV=$4 -VERSION=$5 # Should be of the form ${major}.${minor}.${patch} -LDAP_HOST=$6 -LDAP_BIND_DN=$7 -LDAP_BIND_PASSWD=$8 -LDAP_BASE_OU=$9 -LDAP_GROUP_DN=${10} -ST2_USERNAME=st2admin -REPO=enterprise - -if [[ "$VERSION" = "None" ]]; then - VERSION='' -fi - -if [[ "${PKG_ENV}" = "staging" ]]; then - REPO="${PKG_ENV}-${REPO}" -fi - -if [[ "${RELEASE}" = "unstable" ]]; then - REPO="${REPO}-${RELEASE}" -fi - -# NOTE: st2-rbac-backend package has been introduced in v3.0.0(dev) so we only try to install -# it if version >= 3.0.0[dev] -if [[ "$VERSION" =~ ^[3-9]+\.[0-9]+\.[0-9]+$ ]] || [[ "$VERSION" =~ ^[3-9]+\.[0-9]+dev$ ]]; then - IS_V300_OR_ABOVE="true" -else - IS_V300_OR_ABOVE="false" -fi - -get_apt_pkg_latest_revision() { - # Returns string of form 1.5.1-5. Note how this is different from rpm :/ - local PKG_NAME=$1 - local PKG_VERSION=$2 - - apt-cache show $PKG_NAME | grep Version | awk '{print $2}' | grep $PKG_VERSION | sort --version-sort | tail -n 1 -} - -get_rpm_pkg_name_with_latest_revision() { - # Returns string of form st2-0:1.5.1-3.x86_64 - local PKG_NAME=$1 - local PKG_VERSION=$2 - - repoquery --quiet --show-duplicates $PKG_NAME-$PKG_VERSION* 2>/dev/null | sort --version-sort | tail -n 1 -} - -install_enterprise_bits() { - # Install enterprise bits from packagecloud - echo "Downloading from repo ${REPO}..." - echo "Version: $VERSION" - - if [[ "${DISTRO}" = UBUNTU* ]]; then - curl -s https://${LICENSE_KEY}:@packagecloud.io/install/repositories/StackStorm/${REPO}/script.deb.sh | bash - if [[ -z "$VERSION" ]]; then - apt-get install -y bwc-enterprise - else - local BWC_ENTERPRISE_PKG_VERSION=$(get_apt_pkg_latest_revision bwc-enterprise $VERSION) - local ST2FLOW_PKG_VERSION=$(get_apt_pkg_latest_revision st2flow $VERSION) - local ST2LDAP_PKG_VERSION=$(get_apt_pkg_latest_revision st2-auth-ldap $VERSION) - if [ "${IS_V300_OR_ABOVE}" = "true" ]; then - local ST2RBAC_BACKEND_PKG_VERSION=$(get_apt_pkg_latest_revision st2-rbac-backend $VERSION) - fi - local BWCUI_PKG_VERSION=$(get_apt_pkg_latest_revision bwc-ui $VERSION) - echo "##########################################################" - echo "#### Following versions of packages will be installed ####" - echo "bwc-enterprise${BWC_ENTERPRISE_PKG_VERSION}" - echo "st2flow${ST2FLOW_PKG_VERSION}" - echo "st2-auth-ldap${ST2LDAP_PKG_VERSION}" - if [ "${IS_V300_OR_ABOVE}" = "true" ]; then - echo "st2-rbac-backend${ST2RBAC_BACKEND_PKG_VERSION}" - fi - echo "bwc-ui${BWCUI_PKG_VERSION}" - echo "##########################################################" - if [ "${IS_V300_OR_ABOVE}" = "true" ]; then - apt-get install -y bwc-enterprise=${BWC_ENTERPRISE_PKG_VERSION} st2flow=${ST2FLOW_PKG_VERSION} st2-auth-ldap=${ST2LDAP_PKG_VERSION} st2-rbac-backend=${ST2RBAC_BACKEND_PKG_VERSION} bwc-ui=${BWCUI_PKG_VERSION} - else - apt-get install -y bwc-enterprise=${BWC_ENTERPRISE_PKG_VERSION} st2flow=${ST2FLOW_PKG_VERSION} st2-auth-ldap=${ST2LDAP_PKG_VERSION} bwc-ui=${BWCUI_PKG_VERSION} - fi - fi - else - curl -s https://${LICENSE_KEY}:@packagecloud.io/install/repositories/StackStorm/${REPO}/script.rpm.sh | sudo bash - if [[ -z "$VERSION" ]]; then - yum install -y bwc-enterprise - else - yum install -y yum-utils # need repoquery - local BWC_PKG=$(get_rpm_pkg_name_with_latest_revision bwc-enterprise $VERSION) - local ST2FLOW_PKG=$(get_rpm_pkg_name_with_latest_revision st2flow $VERSION) - local ST2LDAP_PKG=$(get_rpm_pkg_name_with_latest_revision st2-auth-ldap $VERSION) - if [ "${IS_V300_OR_ABOVE}" = "true" ]; then - local ST2RBAC_BACKEND_PKG=$(get_rpm_pkg_name_with_latest_revision st2-rbac-backend $VERSION) - fi - local BWCUI_PKG=$(get_rpm_pkg_name_with_latest_revision bwc-ui $VERSION) - if [ "${IS_V300_OR_ABOVE}" = "true" ]; then - local BWC_ENTERPRISE_PKG="${BWC_PKG} ${ST2FLOW_PKG} ${ST2LDAP_PKG} ${ST2RBAC_BACKEND_PKG} ${BWCUI_PKG}" - else - local BWC_ENTERPRISE_PKG="${BWC_PKG} ${ST2FLOW_PKG} ${ST2LDAP_PKG} ${BWCUI_PKG}" - fi - echo "##########################################################" - echo "#### Following versions of packages will be installed ####" - echo "${BWC_ENTERPRISE_PKG}" - echo "##########################################################" - yum install -y $BWC_ENTERPRISE_PKG - fi - fi -} - - - -update_st2_conf() { - # Replace the auth section - echo "Updating st2.conf..." - sed -i -e '/\[system\]/ p' -e '/\[auth\]/,/\[system\]/ d' /etc/st2/st2.conf - -cat <> /etc/st2/st2.conf - -[auth] -host = 0.0.0.0 -port = 9100 -use_ssl = False -debug = False -enable = True -logging = /etc/st2/logging.auth.conf - -mode = standalone - -# Note: Settings below are only used in "standalone" mode -backend = ldap -backend_kwargs = {"bind_dn": "${LDAP_BIND_DN}", "bind_password": "${LDAP_BIND_PASSWD}", "base_ou": "${LDAP_BASE_OU}", "group_dns": ["${LDAP_GROUP_DN}"], "id_attr": "samAccountName", "host": "${LDAP_HOST}"} - -# Base URL to the API endpoint excluding the version (e.g. http://myhost.net:9101/) -api_url = - -CONF -} - -enable_and_configure_rbac() { - echo "Enabling and configuring RBAC in st2.conf" - - if [[ "${DISTRO}" = UBUNTU* ]]; then - sudo apt-get install -y crudini - else - sudo yum install -y crudini - fi - - # Enable RBAC - echo "Enabling rbac in st2.conf" - - sudo crudini --set /etc/st2/st2.conf rbac enable 'True' - sudo crudini --set /etc/st2/st2.conf rbac backend 'enterprise' - - # TODO: Move directory creation to package - sudo mkdir -p /opt/stackstorm/rbac/assignments/ - sudo mkdir -p /opt/stackstorm/rbac/roles/ - - # Write role assignment for admin user - ROLE_ASSIGNMENT_FILE="/opt/stackstorm/rbac/assignments/${ST2_USERNAME}.yaml" - sudo bash -c "cat > ${ROLE_ASSIGNMENT_FILE}" < ${ROLE_ASSIGNMENT_FILE}" < Date: Thu, 4 Mar 2021 02:22:01 -0800 Subject: [PATCH 27/37] Remove st2_enterprise_tests action --- ...rbac_admin_role_assignments_are_present.sh | 30 ------- actions/st2_enterprise_tests.meta.yaml | 11 --- ...ac_admin_role_assignments_are_present.yaml | 7 -- actions/workflows/st2_enterprise_tests.yaml | 82 ------------------- 4 files changed, 130 deletions(-) delete mode 100755 actions/scripts/verify_default_rbac_admin_role_assignments_are_present.sh delete mode 100644 actions/st2_enterprise_tests.meta.yaml delete mode 100644 actions/st2_enterprise_verify_default_rbac_admin_role_assignments_are_present.yaml delete mode 100644 actions/workflows/st2_enterprise_tests.yaml diff --git a/actions/scripts/verify_default_rbac_admin_role_assignments_are_present.sh b/actions/scripts/verify_default_rbac_admin_role_assignments_are_present.sh deleted file mode 100755 index 84fecde1..00000000 --- a/actions/scripts/verify_default_rbac_admin_role_assignments_are_present.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -RBAC_ASSIGNMENTS_DIR="/opt/stackstorm/rbac/assignments" - -function role_assignment_exists() { - username=$1 - role=$2 - assignment_file_path="${RBAC_ASSIGNMENTS_DIR}/${username}.yaml" - - # Verify assignment file exists - if [ ! -f ${assignment_file_path} ]; then - echo "RBAC role assignment file '${assignment_file_path}' for user '${username}' doesn't exist" - exit 1 - fi - - # Verify assignment file contains "admin" role assignment - cat ${assignment_file_path} | grep -q "\- \"${role}\"" - exit_code=$? - - if [ ${exit_code} -ne 0 ]; then - echo "RBAC role assignment file '${assignment_file_path}' for user '${username}' is missing '${role}' role assignment" - exit 1 - fi -} - -role_assignment_exists "st2admin" "system_admin" -role_assignment_exists "stanley" "admin" - -echo "All role assignmet files exist" -exit 0 diff --git a/actions/st2_enterprise_tests.meta.yaml b/actions/st2_enterprise_tests.meta.yaml deleted file mode 100644 index 0ac7d18f..00000000 --- a/actions/st2_enterprise_tests.meta.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: st2_enterprise_tests -pack: st2cd -description: Run the set of st2 enterprise tests -enabled: true -runner_type: orquesta -entry_point: workflows/st2_enterprise_tests.yaml -parameters: - host_ip: - type: string - required: true diff --git a/actions/st2_enterprise_verify_default_rbac_admin_role_assignments_are_present.yaml b/actions/st2_enterprise_verify_default_rbac_admin_role_assignments_are_present.yaml deleted file mode 100644 index 5b748a0b..00000000 --- a/actions/st2_enterprise_verify_default_rbac_admin_role_assignments_are_present.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- - name: "st2_enterprise_verify_default_rbac_admin_role_assignments_are_present" - runner_type: "remote-shell-script" - description: "Script which verifies that default RBAC admin role assignments exist for all the necessary users" - enabled: true - entry_point: "scripts/verify_default_rbac_admin_role_assignments_are_present.sh" - parameters: {} diff --git a/actions/workflows/st2_enterprise_tests.yaml b/actions/workflows/st2_enterprise_tests.yaml deleted file mode 100644 index 534866d2..00000000 --- a/actions/workflows/st2_enterprise_tests.yaml +++ /dev/null @@ -1,82 +0,0 @@ ---- -version: '1.0' -input: - - host_ip -tasks: - verify_stanley_ssh_key_is_generated_and_installed: - action: core.remote_sudo - input: - hosts: <% ctx().host_ip %> - cmd: (test -f /home/stanley/.ssh/stanley_rsa) || (echo "SSH key for stanley user not installed" ; exit 1) - timeout: 10 - next: - - when: <% succeeded() %> - do: - - verify_rbac_is_enabled - verify_rbac_is_enabled: - action: core.remote_sudo - input: - hosts: <% ctx().host_ip %> - # The following formats are all considered as valid - # - # [rbac] - # backend = enterprise - # enable = True - # - # [rbac] - # enable = True - # backend = enterprise - # - # TODO: Eventually use crudini in a custom shell script? - cmd: grep -zlP '\[rbac\]\senable\s?=\s?True\sbackend\s?=\s?enterprise' /etc/st2/st2.conf || grep -zlP '\[rbac\]\sbackend\s?=\s?enterprise\senable\s?=\s?True' /etc/st2/st2.conf - timeout: 10 - next: - - when: <% succeeded() %> - do: - - verify_default_rbac_admin_role_assignments_are_present - verify_default_rbac_admin_role_assignments_are_present: - action: st2cd.st2_enterprise_verify_default_rbac_admin_role_assignments_are_present - input: - hosts: <% ctx().host_ip %> - sudo: true - next: - - when: <% succeeded() %> - do: - - verify_flow_is_installed - verify_flow_is_installed: - action: core.remote_sudo - input: - hosts: <% ctx().host_ip %> - cmd: (test -d /opt/stackstorm/static/webui/flow && test -f /opt/stackstorm/static/webui/flow/index.html) || (echo "Flow directory doesnt exist" ; exit 1) - timeout: 10 - next: - - when: <% succeeded() %> - do: - - verify_flow_is_available - verify_flow_is_available: - action: core.remote_sudo - input: - hosts: <% ctx().host_ip %> - cmd: sleep 20 && curl -sSL -k --fail https://127.0.0.1/flow - timeout: 30 - next: - - when: <% succeeded() %> - do: - - verify_ldap_auth_backend_is_installed - verify_ldap_auth_backend_is_installed: - action: core.remote_sudo - input: - hosts: <% ctx().host_ip %> - cmd: /opt/stackstorm/st2/bin/python -c "import st2auth_enterprise_ldap_backend" - timeout: 10 - next: - - when: <% succeeded() %> - do: - - verify_enterprise_rbac_backend_is_installed - # NOTE: RBAC has become a standalone package in StackStorm v3.0.0 - verify_enterprise_rbac_backend_is_installed: - action: core.remote_sudo - input: - hosts: <% ctx().host_ip %> - cmd: /opt/stackstorm/st2/bin/python -c "import st2rbac_enterprise_backend" - timeout: 10 From 2cf63357e8791c5a2808aefbbb3a48227f4ad2d1 Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:23:10 -0800 Subject: [PATCH 28/37] Remove flow_pkg action and the corresponding flow_build workflow --- actions/flow_pkg.meta.yaml | 35 ------------ actions/workflows/flow_build.yaml | 91 ------------------------------- 2 files changed, 126 deletions(-) delete mode 100644 actions/flow_pkg.meta.yaml delete mode 100644 actions/workflows/flow_build.yaml diff --git a/actions/flow_pkg.meta.yaml b/actions/flow_pkg.meta.yaml deleted file mode 100644 index 9541e00c..00000000 --- a/actions/flow_pkg.meta.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- - name: "flow_pkg" - runner_type: "action-chain" - description: "Builds Flow artifacts" - enabled: true - entry_point: "workflows/flow_build.yaml" - parameters: - repo: - type: "string" - description: "Url of the repo to clone." - default: "https://{{st2kv.system.st2_github_token}}:x-oauth-basic@github.com/extremenetworks/st2flow.git" - required: false - repo_target: - type: "string" - default: "/home/stanley/st2_flow_{{branch}}" - description: "Directory where the repo is cloned." - branch: - type: "string" - description: "The branch to build." - default: "master" - required: false - build: - type: "string" - description: "build number" - dl_server: - type: "string" - description: "Server where the build artifacts are published." - required: false - environment: - type: "string" - description: "Environment where to run the packaging action" - version: - type: "string" - description: "Version of Flow to build" - required: true diff --git a/actions/workflows/flow_build.yaml b/actions/workflows/flow_build.yaml deleted file mode 100644 index 588a496f..00000000 --- a/actions/workflows/flow_build.yaml +++ /dev/null @@ -1,91 +0,0 @@ ---- - chain: - - - name: "get_build_server" - ref: "linux.dig" - params: - hostname: "st2-build-slave-ubuntu.service.consul" - rand: true - count: 1 - publish: - build_server: "{{get_build_server.result[0]}}" - on-success: "clone_repo" - - - name: "clone_repo" - ref: "st2cd.git_clone" - params: - hosts: "{{build_server}}" - repo: "{{repo}}" - target: "{{repo_target}}" - branch: "{{branch}}" - publish: - repodir: "{{clone_repo[build_server].stdout}}" - on-success: "install_build_dependencies" - - - name: "install_build_dependencies" - ref: "core.remote" - params: - hosts: "{{build_server}}" - cmd: "cd {{repodir}} && npm install bower ; npm install gulp" - timeout: 600 - on-success: "install_npm_library_dependencies" - - - name: "install_npm_library_dependencies" - ref: "core.remote" - params: - hosts: "{{build_server}}" - cmd: "cd {{repodir}} && npm install" - timeout: 600 - on-success: "build_flow" - - - name: "build_flow" - ref: "core.remote" - params: - hosts: "{{build_server}}" - cmd: "cd {{repodir}} && node_modules/.bin/gulp build" - timeout: 600 - on-success: "create_build_artifact" - - - name: "create_build_artifact" - ref: "core.remote" - params: - hosts: "{{build_server}}" - cmd: "cd {{repodir}} && tar --transform='s/dist/flow/' -cvzpf flow-{{version}}.tar.gz dist/" - timeout: 300 - on-success: "s3_build_artifact" - - - name: "s3_build_artifact" - ref: "core.remote_sudo" - params: - hosts: "{{build_server}}" - cmd: "s3cmd put --no-mime-magic --guess-mime-type --recursive --force {{repodir}}/flow-{{version}}.tar.gz s3://st2flow/" - timeout: 600 - on-success: "scp_artifact" - on-failure: "scp_artifact" - - - name: "scp_artifact" - ref: "linux.rsync" - params: - hosts: "{{build_server}}" - args: "-avzr -e 'ssh -i /home/stanley/.ssh/dl_rsync -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'" - source: "{{repodir}}/flow-{{version}}.tar.gz" - dest_server: "{{dl_server}}" - destination: "/tmp/" - timeout: 600 - on-success: "mv_artifact" - - - name: "mv_artifact" - ref: "core.remote_sudo" - params: - hosts: "{{dl_server}}" - cmd: "cp -Rf /tmp/flow-{{version}}.tar.gz /var/www/sites/releases/html/st2enterprise/apt/trusty/st2flow/ && cp -Rf /tmp/flow-{{version}}.tar.gz /var/www/sites/releases/html/st2enterprise/yum/el/7/st2flow/ && cp -Rf /tmp/flow-{{version}}.tar.gz /var/www/sites/releases/html/st2enterprise/yum/el/8/st2flow/" - timeout: 1800 - on-success: "clean_repo" - - - name: "clean_repo" - ref: "core.remote" - params: - hosts: "{{build_server}}" - cmd: "rm -Rf {{repodir}}" - - default: "get_build_server" From 42823ebc78af212863360b4f699733be5559b10c Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:27:48 -0800 Subject: [PATCH 29/37] Remove st2_auth_ldap_pkg_enterprise and st2_auth_pam_pkg actions and st2_auth_backend_pkg workflow --- .../st2_auth_ldap_pkg_enterprise.meta.yaml | 45 ------------------ actions/st2_auth_pam_pkg.yaml | 45 ------------------ actions/workflows/st2_auth_backend_pkg.yaml | 47 ------------------- 3 files changed, 137 deletions(-) delete mode 100644 actions/st2_auth_ldap_pkg_enterprise.meta.yaml delete mode 100644 actions/st2_auth_pam_pkg.yaml delete mode 100644 actions/workflows/st2_auth_backend_pkg.yaml diff --git a/actions/st2_auth_ldap_pkg_enterprise.meta.yaml b/actions/st2_auth_ldap_pkg_enterprise.meta.yaml deleted file mode 100644 index ed241ebe..00000000 --- a/actions/st2_auth_ldap_pkg_enterprise.meta.yaml +++ /dev/null @@ -1,45 +0,0 @@ ---- - name: "st2_auth_ldap_pkg_enterprise" - runner_type: "action-chain" - description: "Builds st2enterprise LDAP auth backend egg" - enabled: true - entry_point: "workflows/st2_auth_backend_pkg.yaml" - parameters: - repo: - type: "string" - description: "Url of the repo to clone." - default: "https://{{github_token}}:x-oauth-basic@github.com/{{repo_name}}.git" - immutable: true - s3_bucket: - type: "string" - description: "S3 bucket to push built egg to." - required: true - default: "st2enterprise" - github_token: - type: "string" - description: "GitHub auth token" - default: "{{st2kv.system.st2_github_token}}" - repo_name: - type: "string" - description: "GitHub repo ex. ORG/REPO" - required: true - default: "extremenetworks/st2-enterprise-auth-backend-ldap" - repo_target: - type: "string" - default: "/home/stanley/st2_ldap_auth_{{branch}}" - description: "Directory where the repo is cloned." - branch: - type: "string" - description: "The branch to build." - default: "master" - required: false - build: - type: "string" - description: "build number" - dl_server: - type: "string" - description: "Server where the build artifacts are published." - required: false - environment: - type: "string" - description: "Environment where to run the packaging action" diff --git a/actions/st2_auth_pam_pkg.yaml b/actions/st2_auth_pam_pkg.yaml deleted file mode 100644 index 875b78f0..00000000 --- a/actions/st2_auth_pam_pkg.yaml +++ /dev/null @@ -1,45 +0,0 @@ ---- - name: "st2_auth_pam_pkg" - runner_type: "action-chain" - description: "Builds st2 PAM auth backend egg" - enabled: true - entry_point: "workflows/st2_auth_backend_pkg.yaml" - parameters: - repo: - type: "string" - description: "Url of the repo to clone." - default: "https://{{github_token}}:x-oauth-basic@github.com/{{repo_name}}.git" - immutable: true - s3_bucket: - type: "string" - description: "S3 bucket to push built egg to." - required: true - default: "st2community" - github_token: - type: "string" - description: "GitHub auth token" - default: "{{st2kv.system.st2_github_token}}" - repo_name: - type: "string" - description: "GitHub repo ex. ORG/REPO" - required: true - default: "StackStorm/st2-auth-backend-pam" - repo_target: - type: "string" - default: "/home/stanley/st2_pam_auth_{{branch}}" - description: "Directory where the repo is cloned." - branch: - type: "string" - description: "The branch to build." - default: "master" - required: false - build: - type: "string" - description: "build number" - dl_server: - type: "string" - description: "Server where the build artifacts are published." - required: false - environment: - type: "string" - description: "Environment where to run the packaging action" diff --git a/actions/workflows/st2_auth_backend_pkg.yaml b/actions/workflows/st2_auth_backend_pkg.yaml deleted file mode 100644 index 0f1e141c..00000000 --- a/actions/workflows/st2_auth_backend_pkg.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- - chain: - - - name: "get_build_server" - ref: "linux.dig" - params: - hostname: "st2-build-slave-ubuntu.service.consul" - rand: true - count: 1 - publish: - build_server: "{{get_build_server.result[0]}}" - on-success: "clone_repo" - - - name: "clone_repo" - ref: "st2cd.git_clone" - params: - hosts: "{{build_server}}" - repo: "{{repo}}" - target: "{{repo_target}}" - branch: "{{branch}}" - publish: - repodir: "{{clone_repo[build_server].stdout}}" - on-success: "build_pkg" - - - name: "build_pkg" - ref: "core.remote" - params: - hosts: "{{build_server}}" - cmd: "cd {{repodir}} && python setup.py bdist_egg" - timeout: 600 - on-success: "s3_build_artifact" - - - name: "s3_build_artifact" - ref: "core.remote_sudo" - params: - hosts: "{{build_server}}" - cmd: "s3cmd put --no-mime-magic --guess-mime-type --recursive --force {{repodir}}/dist/*.egg s3://{{s3_bucket}}/" - timeout: 600 - on-success: "clean_repo" - - - name: "clean_repo" - ref: "core.remote" - params: - hosts: "{{build_server}}" - cmd: "rm -Rf {{repodir}}" - - default: "get_build_server" From 1f9e2639029a5dfd70b036514899cb7c55472711 Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:29:48 -0800 Subject: [PATCH 30/37] Fix description of st2_prep_dev_for_ldap action --- actions/st2_prep_dev_for_ldap.meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/st2_prep_dev_for_ldap.meta.yaml b/actions/st2_prep_dev_for_ldap.meta.yaml index 9f464ea2..c63c0573 100644 --- a/actions/st2_prep_dev_for_ldap.meta.yaml +++ b/actions/st2_prep_dev_for_ldap.meta.yaml @@ -1,6 +1,6 @@ --- name: st2_prep_dev_for_ldap -description: Prepare the st2 enterprise ldap repo for next iteration of development +description: Prepare the ST2 LDAP repo for next iteration of development enabled: true runner_type: remote-shell-script entry_point: st2_chg_ver_for_ldap.sh From b45a5f1f97a2d72e2faa1e61da4a6230eda3f778 Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:33:08 -0800 Subject: [PATCH 31/37] Remove st2_prep_patch_for_enterprise actions for LDAP and RBAC --- ...2_prep_patch_for_enterprise_ldap.meta.yaml | 43 ------------------- ...atch_for_enterprise_rbac_backend.meta.yaml | 43 ------------------- 2 files changed, 86 deletions(-) delete mode 100644 actions/st2_prep_patch_for_enterprise_ldap.meta.yaml delete mode 100644 actions/st2_prep_patch_for_enterprise_rbac_backend.meta.yaml diff --git a/actions/st2_prep_patch_for_enterprise_ldap.meta.yaml b/actions/st2_prep_patch_for_enterprise_ldap.meta.yaml deleted file mode 100644 index 9a4a8686..00000000 --- a/actions/st2_prep_patch_for_enterprise_ldap.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: st2_prep_patch_for_enterprise_ldap -description: Prepare the st2 enterprise ldap repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: st2_chg_ver_for_enterprise_ldap.sh -parameters: - project: - type: string - description: Project name for st2 enterprise ldap auth backend - default: st2-enterprise-auth-backend-ldap - position: 0 - version: - type: string - description: Version for the patch release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: v{{version.split('.')[0]}}.{{version.split('.')[1]}} - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/st2_prep_patch_for_enterprise_rbac_backend.meta.yaml b/actions/st2_prep_patch_for_enterprise_rbac_backend.meta.yaml deleted file mode 100644 index 9e908235..00000000 --- a/actions/st2_prep_patch_for_enterprise_rbac_backend.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: st2_prep_patch_for_enterprise_rbac_backend -description: Prepare the st2 enterprise ldap repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: st2_chg_ver_for_enterprise_rbac_backend.sh -parameters: - project: - type: string - description: Github project name - default: st2-enterprise-rbac-backend - position: 0 - version: - type: string - description: Version for the patch release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: extremenetworks - position: 2 - branch: - type: string - description: Branch to update - default: v{{version.split('.')[0]}}.{{version.split('.')[1]}} - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" From f04099c628627e8f26324a992b86abc6e3552c8d Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:39:25 -0800 Subject: [PATCH 32/37] Remove outdated release checklist --- CHECKLIST.md | 78 ---------------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 CHECKLIST.md diff --git a/CHECKLIST.md b/CHECKLIST.md deleted file mode 100644 index b6441ff5..00000000 --- a/CHECKLIST.md +++ /dev/null @@ -1,78 +0,0 @@ -# Release checklist - -A checklist for pre-release, release and post-release procedures. Not necessarily to be followed step-by-step, but please consult this checklist for every release and make sure that if a step is skipped, there was a _really_ good reason for it. Some of the steps might seem obvious, but they should be documented for people who might've fallen out of context for one reason or other. Everything about the release should be crystal clear for everyone in the team. - -The right thing to do would be copying this list into our discussions for every release and update it when the steps are done, so that everyone could see the progress and comment on it in one place. - -## 1. Organizational procedure - -- [ ] Create a release discussion or announce to everyone in any other way: make it clear what features will make it into the release. -- [ ] Agree on the release timeline. -- [ ] Agree on the community announcement/outreach plan (@epowell101 has to validate). -- [ ] Assign release owners. - -## 2. Features - -A list of planned features—different for every release, of course–should follow. Cross the features out only after they're reviewed and merged into master. - -## 3. Pre-release procedure - -- [ ] Test every feature manually in CentOS/RHEL 7. -- [ ] Test every feature manually in CentOS/RHEL 8. -- [ ] Test every feature manually in Ubuntu 16. -- [ ] Test every feature manually in Ubuntu 18. -- [ ] Ask someone else to test every feature manually in CentOS/RHEL 7. -- [ ] Ask someone else to test every feature manually in CentOS/RHEL 8. -- [ ] Ask someone else to test every feature manually in Ubuntu 16. -- [ ] Ask someone else to test every feature manually in Ubuntu 18. -- [ ] If something failed, fix and repeat from the beginning. -- [ ] If something failed and can't be fixed, write it down, make it a priority for the next patch release, get a KB article out. -- [ ] Make sure that change logs are up to date. -- [ ] Make sure that documentation at `docs.stackstorm.com` is up to date; if there's a specific migration/upgrade procedure, describe it in the ["Upgrade Notes" section](https://docs.stackstorm.com/upgrade_notes.html). - -## 4. Release machinery - -Valid for minor releases. For patches see [RELEASE_HOWTO.md](https://github.com/StackStorm/st2cd/blob/master/RELEASE_HOWTO.md). - -- [ ] Make sure the build box (st2build002 at the time of writing) is working correctly. -- [ ] Launch `st2cd.prepare-for-release` workflow: `st2_release_version` has to have a patch (e.g. `1.2.0`), `st2_base_url` should __not__ be `localhost` (e.g. `http://st2build002:9101/v1/`). -- [ ] Change the dev version in [st2web/package.json](https://github.com/StackStorm/st2web/blob/master/package.json#L4): e.g. if `1.2.0` is released then `1.3dev` should be in the file. -- [ ] Change the dev version in [st2client](https://github.com/StackStorm/st2/blob/master/st2client/st2client/__init__.py) and [st2common](https://github.com/StackStorm/st2/blob/master/st2common/st2common/__init__.py): same rules as in the previous step apply. -- [ ] Change the dev version in [st2docs/version.txt](https://github.com/StackStorm/st2docs/blob/master/version.txt#L1): e.g. if `1.3.0` is released then `1.4dev` should be in the file. -- [ ] Add new version in [st2docs/docs/source/conf.py](https://github.com/StackStorm/st2docs/blob/master/docs/source/conf.py#L79) e.g. if `1.3.0` is release then `1.3` should be added to the list. -- [ ] Set the version values in the KV store of the build box: -``` -st2 key set st2_stable_version 1.2 -st2 key set st2_unstable_version 1.3dev -st2 key set st2_master_build_number 1 -``` -- [ ] Make sure packaging is completed for st2web, st2flow, and st2 itself (x4: Ubuntu 16.04, Ubuntu 18.04, RHEL7, RHEL8). -- [ ] Make sure `pytests` are passing and no sudden upstream issues happened (hi, oslo.utils!). -- [ ] Create a temporary version tag say v1.3.0 if releasing v1.3.0 so that st2workroom_test passes. Also, remove tag before finalize. -- [ ] Run `st2cd.package-publish-release` to push the packages to the download server and finalize the release. -- [ ] Start flow packages manually for released and new dev builds. `st2 run st2cd.flow_pkg branch=master dl_server=dl-origin001.uswest2.stackstorm.net version=1.3.0` and `st2 run st2cd.flow_pkg branch=master dl_server=dl-origin001.uswest2.stackstorm.net version=1.4dev` if released version was `1.3.0`. -- [ ] This may also be a good time to run entreprise ldap packaging. `st2 run st2cd.st2_auth_ldap_pkg_enterprise` - note that the command simply overwrites old build but this is likely a problem for future us :) -- [ ] Make sure your new version is now on [the download server](http://downloads.stackstorm.net/releases/st2/). - -## 5. Getting the release out - -- [ ] Get some rest, grab a cup of coffee, meditate, listen to delightful music, hug someone. Calm down. The next step is going to be very exciting. -- [ ] Change the version in [st2workroom](https://github.com/StackStorm/st2workroom/blob/ef992a96b721a6c5bf225991749ef52d86ccec1a/hieradata/role/st2.yaml#L8-L11). __This is the point where people start getting your release by default. That's it. It's done.__ -- [ ] Announce to the team that the code is out, bathe in fame and glory. -- [ ] Test every feature manually in Ubuntu 16. -- [ ] Test every feature manually in Ubuntu 18. -- [ ] Test every feature manually in CentOS/RHEL 7. -- [ ] Test every feature manually in CentOS/RHEL 8. -- [ ] Ask someone else to test every feature manually in Ubuntu 16. -- [ ] Ask someone else to test every feature manually in Ubuntu 18. -- [ ] Ask someone else to test every feature manually in CentOS/RHEL 7. -- [ ] Ask someone else to test every feature manually in CentOS/RHEL 8. -- [ ] If something failed, fix and repeat from the beginning (I know, I know). -- [ ] If something failed and can't be fixed, write it down, make it a priority for the next patch release, get a KB article out. - -## 6. Post-release procedure - -- [ ] Announce to the community using `@here` or `@channel` (`@channel` might wake someone up, but some people—wink-wink, DZ–still don't shy away from using it). -- [ ] Get a blog post / multiple blog posts out according to the plan. -- [ ] Send an announcement e-mail, execute the rest of the outreach plan—whatever it is. -- [ ] Watch the community: if more than two people encounter the same issue when installing or upgrading, it's already worth creating a KB article about. From 101006888da226e5c982ce10b9d3b6d44034b7ea Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 4 Mar 2021 02:41:57 -0800 Subject: [PATCH 33/37] Remove unused wait_for_docker_image action --- actions/wait_for_docker_image.meta.yaml | 32 -------------------- actions/wait_for_docker_image.sh | 39 ------------------------- 2 files changed, 71 deletions(-) delete mode 100644 actions/wait_for_docker_image.meta.yaml delete mode 100755 actions/wait_for_docker_image.sh diff --git a/actions/wait_for_docker_image.meta.yaml b/actions/wait_for_docker_image.meta.yaml deleted file mode 100644 index 963dbfe2..00000000 --- a/actions/wait_for_docker_image.meta.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: wait_for_docker_image -description: Wait until specified docker image exists -enabled: true -runner_type: remote-shell-script -entry_point: wait_for_docker_image.sh -parameters: - org: - type: string - description: Docker Hub organization - default: StackStorm - position: 0 - image: - type: string - description: Image name - required: true - position: 1 - version: - type: string - description: Image version - required: true - position: 2 - tries: - type: integer - description: Check for image this many times - required: true - position: 3 - check_delay: - type: integer - description: Number of seconds to delay between each check - required: true - position: 4 diff --git a/actions/wait_for_docker_image.sh b/actions/wait_for_docker_image.sh deleted file mode 100755 index b74258f3..00000000 --- a/actions/wait_for_docker_image.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -set -e - -ORG=$1 -IMAGE=$2 -VERSION=$3 -TRIES=$4 -DELAY=$5 - -if [[ -z "${ORG}" || -z "${IMAGE}" || -z "${VERSION}" ]]; then - echo "ERROR: Missing required parameter" - echo "Usage: $0 ORG PROJECT VERSION" - exit 1 -fi - -function docker_tag_exists() { - ORG_LCASE=`echo "${ORG}" | tr '[:upper:]' '[:lower:]'` - URI="https://hub.docker.com/v2/repositories/${ORG_LCASE}/${IMAGE}/tags" - echo ${URI} - curl --silent --fail -lSL ${URI} | grep \"${VERSION}\" >/dev/null -} - -i=0 -while ! docker_tag_exists "${ORG}/${IMAGE}" $VERSION; -do - if (( ${TRIES} == 0 )); then - sleep ${DELAY} - continue - fi - if (( ++i < ${TRIES} )); then - sleep ${DELAY} - else - echo "ERROR: Failed to find image ${ORG}/${IMAGE}:${VERSION} within requested time." - exit 1 - fi -done - -echo "SUCCESS!" From 5430d501e15e44ccd2ba9a6e22eba0e6d85444fd Mon Sep 17 00:00:00 2001 From: blag Date: Fri, 12 Mar 2021 13:45:04 -0800 Subject: [PATCH 34/37] Remove updating st2flow from st2_prep_patch --- actions/workflows/st2_prep_patch.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/actions/workflows/st2_prep_patch.yaml b/actions/workflows/st2_prep_patch.yaml index f03cab92..1cfb112d 100644 --- a/actions/workflows/st2_prep_patch.yaml +++ b/actions/workflows/st2_prep_patch.yaml @@ -80,22 +80,6 @@ tasks: local_repo: <% 'st2chatops_' + ctx().local_repo_sfx %> hosts: <% ctx().host %> cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_st2flow - - when: <% failed() %> - do: - - cleanup_on_failure - prep_st2flow: - action: st2cd.st2_prep_patch_for_gui - input: - project: st2flow - version: <% ctx().version %> - fork: extremenetworks - local_repo: <% 'st2flow_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> next: - when: <% succeeded() %> do: From ba338c7606a509a97ad0af426a4385b30bd32e75 Mon Sep 17 00:00:00 2001 From: blag Date: Mon, 15 Mar 2021 18:20:58 -0700 Subject: [PATCH 35/37] Remove README checker - that should be done as an ST2 CI lint task --- actions/pypi_upload.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/actions/pypi_upload.sh b/actions/pypi_upload.sh index e92cdd9b..040e9464 100755 --- a/actions/pypi_upload.sh +++ b/actions/pypi_upload.sh @@ -78,18 +78,6 @@ if [ "${REPO}" != "${PROJECT}" ]; then cd ./${PROJECT} fi -# Use the same readme renderer that PyPI uses to catch syntax issues in the -# README.rst file -# https://pypi.org/help/#description-content-type -# https://pypi.org/project/readme-renderer -# https://packaging.python.org/tutorials/packaging-projects/#description -echo "Checking README.rst syntax" -virtualenv venv-st2client-readme-checker -. venv-st2client-readme-checker/bin/activate -pip install --upgrade readme_renderer -python -m readme_renderer README.rst -deactivate - echo "Currently at directory `pwd`..." sudo pip install -U twine wheel From 224d95456ca8f40ff433004e080e7f6e0a88c334 Mon Sep 17 00:00:00 2001 From: blag Date: Mon, 12 Apr 2021 12:16:05 -0700 Subject: [PATCH 36/37] Grab virtualenv version from fixed-requirements.txt --- actions/setup_e2e_tests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 2e4f7e99..d4d885d4 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -148,15 +148,17 @@ st2ctl reload --register-all cd st2tests if [[ -z "$VERSION" ]]; then PIP_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/${BRANCH}/Makefile | grep 'PIP_VERSION ?= ' | awk '{ print $3 }') + VENV_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/${BRANCH}/fixed-requirements.txt | grep '^virtualenv.*=' | tr '<>=' ' ' | awk '{ print $2 }') else PIP_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/v${VERSION}/Makefile | grep 'PIP_VERSION ?= ' | awk '{ print $3 }') + VENV_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/v${VERSION}/fixed-requirements.txt | grep '^virtualenv.*=' | tr '<>=' ' ' | awk '{ print $2 }') fi # Fallback if [[ -z "$PIP_VERSION" ]]; then PIP_VERSION=$(curl --silent https://raw.githubusercontent.com/StackStorm/st2/master/Makefile | grep 'PIP_VERSION ?= ' | awk '{ print $3 }') fi sudo ${PIP} install --upgrade "pip==$PIP_VERSION" -sudo ${PIP} install --upgrade "virtualenv==15.1.0" +sudo ${PIP} install --upgrade "virtualenv==$VENV_VERSION" # I'm not entirely sure what the original author of this script (who very well # could have been me) was thinking. At least on Ubuntu Xenial, installing the @@ -173,7 +175,7 @@ PATH=$PATH:$HOME/.local/bin virtualenv --no-download --python=$PYTHON3 venv # Set pip and virtualenv within the virtualenv to ensure the Python 3-only # dependencies can be successfully installed ${PIP} install --upgrade "pip==$PIP_VERSION" -${PIP} install --upgrade "virtualenv==15.1.0" +${PIP} install --upgrade "virtualenv==$VENV_VERSION" # Install the test dependencies ${PIP} install -r test-requirements.txt From 61c92d58bf762b3ee233423d3cc59a6e846c1f56 Mon Sep 17 00:00:00 2001 From: blag Date: Mon, 12 Apr 2021 12:20:41 -0700 Subject: [PATCH 37/37] Add the ChatOps tests for Ubuntu 16.04 back in --- actions/workflows/st2_chatops_e2e_tests.yaml | 27 ++++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/actions/workflows/st2_chatops_e2e_tests.yaml b/actions/workflows/st2_chatops_e2e_tests.yaml index 4e292196..32d36f03 100644 --- a/actions/workflows/st2_chatops_e2e_tests.yaml +++ b/actions/workflows/st2_chatops_e2e_tests.yaml @@ -105,23 +105,16 @@ tasks: # Run the tests with Slack, ST2 IUT on Ubuntu 16.04 run_with_slack_u16: - # Removing these tests because: - # 1. They are failing for stupid reasons - # 2. I don't _think_ they are the root cause of the failure, I think it's something else - # 3. They only fail on Ubuntu Xenial - # 4. Other ChatOps end-to-end runs are passing successfully - # 5. Ubuntu Xenial is EOL in ~1 month anyway - action: core.noop - # action: st2cd.st2_chatops_e2e_tests_with_slack - # input: - # host_ip: <% ctx().host_ip %> - # st2_auth_token: <% ctx().env.ST2_AUTH_TOKEN %> - # websocket: <% ctx().websocket %> - # slack_channel: <% ctx().chatops_e2e_tests_slack_channel_u16 %> - # slack_bot_username: "{{ ctx().chatops_e2e_tests_slack_bot_username_u16 }}" - # slack_bot_api_token: "{{ ctx().chatops_e2e_tests_slack_bot_api_token_u16 }}" - # slack_user_username: "{{ ctx().chatops_e2e_tests_slack_user_username_u16 }}" - # slack_user_api_token: "{{ ctx().chatops_e2e_tests_slack_user_api_token_u16 }}" + action: st2cd.st2_chatops_e2e_tests_with_slack + input: + host_ip: <% ctx().host_ip %> + st2_auth_token: <% ctx().env.ST2_AUTH_TOKEN %> + websocket: <% ctx().websocket %> + slack_channel: <% ctx().chatops_e2e_tests_slack_channel_u16 %> + slack_bot_username: "{{ ctx().chatops_e2e_tests_slack_bot_username_u16 }}" + slack_bot_api_token: "{{ ctx().chatops_e2e_tests_slack_bot_api_token_u16 }}" + slack_user_username: "{{ ctx().chatops_e2e_tests_slack_user_username_u16 }}" + slack_user_api_token: "{{ ctx().chatops_e2e_tests_slack_user_api_token_u16 }}" # Run the tests with Slack, ST2 IUT on Ubuntu 18.04 run_with_slack_u18: