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. 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_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_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_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/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_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_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/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_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.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.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/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/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/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/pypi_upload.sh b/actions/pypi_upload.sh index 94ba00ea..040e9464 100755 --- a/actions/pypi_upload.sh +++ b/actions/pypi_upload.sh @@ -78,7 +78,6 @@ if [ "${REPO}" != "${PROJECT}" ]; then cd ./${PROJECT} fi - echo "Currently at directory `pwd`..." sudo pip install -U twine wheel 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/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 25d35324..d4d885d4 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 @@ -15,21 +15,24 @@ 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}'` -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 +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 + # 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 - 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..." @@ -53,8 +56,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..." @@ -90,11 +93,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,21 +131,53 @@ 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/ 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 cd st2tests -sudo ${PIP} install --upgrade "pip>=9.0,<9.1" -sudo ${PIP} install --upgrade "virtualenv==15.1.0" - -virtualenv --no-download venv +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==$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 +# 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. +# 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 +${PIP} install --upgrade "pip==$PIP_VERSION" +${PIP} install --upgrade "virtualenv==$VENV_VERSION" + +# Install the test dependencies ${PIP} install -r test-requirements.txt 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/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_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/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/st2_get_intalled_version.meta.yaml b/actions/st2_get_installed_version.meta.yaml similarity index 84% rename from actions/st2_get_intalled_version.meta.yaml rename to actions/st2_get_installed_version.meta.yaml index 9be64700..7c5904ba 100755 --- a/actions/st2_get_intalled_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 diff --git a/actions/st2_prep_dev_for_enterprise_ldap.meta.yaml b/actions/st2_prep_dev_for_enterprise_ldap.meta.yaml deleted file mode 100644 index 6801ebeb..00000000 --- a/actions/st2_prep_dev_for_enterprise_ldap.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: st2_prep_dev_for_enterprise_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 -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 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/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/bwc_chg_ver_for_pkg_suite.meta.yaml b/actions/st2_prep_dev_for_ldap.meta.yaml similarity index 79% rename from actions/bwc_chg_ver_for_pkg_suite.meta.yaml rename to actions/st2_prep_dev_for_ldap.meta.yaml index 46446856..c63c0573 100644 --- a/actions/bwc_chg_ver_for_pkg_suite.meta.yaml +++ b/actions/st2_prep_dev_for_ldap.meta.yaml @@ -1,14 +1,14 @@ --- -name: bwc_chg_dev_for_pkg_suite -description: Change the version for any bwc packaging suite +name: st2_prep_dev_for_ldap +description: Prepare the ST2 LDAP repo for next iteration of development enabled: true runner_type: remote-shell-script -entry_point: bwc_chg_ver_for_pkg_suite.sh +entry_point: st2_chg_ver_for_ldap.sh parameters: project: type: string - description: Project name for package suite - required: true + description: Project name for ST2 LDAP auth backend + default: st2-auth-ldap position: 0 version: 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/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: "--" 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 } diff --git a/actions/st2_prep_release_for_enterprise_ldap.meta.yaml b/actions/st2_prep_release_for_enterprise_ldap.meta.yaml deleted file mode 100644 index ab40ede0..00000000 --- a/actions/st2_prep_release_for_enterprise_ldap.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: st2_prep_release_for_enterprise_ldap -description: Prepare the st2 enterprise ldap repo for release -enabled: true -runner_type: remote-shell-script -entry_point: st2_prep_release_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 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/st2_prep_release_for_enterprise_rbac_backend.meta.yaml b/actions/st2_prep_release_for_enterprise_rbac_backend.meta.yaml deleted file mode 100644 index 5c6de60a..00000000 --- a/actions/st2_prep_release_for_enterprise_rbac_backend.meta.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: st2_prep_release_for_enterprise_rbac_backend -description: Prepare the st2 enterprise RBAC backend repo for release -enabled: true -runner_type: remote-shell-script -entry_point: st2_prep_release_for_enterprise_rbac_backend.sh -parameters: - project: - type: string - description: Project name for st2 enterprise rbac backend - default: st2-enterprise-rbac-backend - 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_pkg_suite.meta.yaml b/actions/st2_prep_release_for_ldap_backend.meta.yaml similarity index 77% rename from actions/bwc_prep_release_for_pkg_suite.meta.yaml rename to actions/st2_prep_release_for_ldap_backend.meta.yaml index 0ac9e6d3..8a1c43b1 100644 --- a/actions/bwc_prep_release_for_pkg_suite.meta.yaml +++ b/actions/st2_prep_release_for_ldap_backend.meta.yaml @@ -1,14 +1,14 @@ --- -name: bwc_prep_release_for_pkg_suite -description: Prepare any bwc packaging suite 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: bwc_prep_release_for_pkg_suite.sh +entry_point: st2_prep_release_for_ldap_backend.sh parameters: project: type: string - description: Project name for the package suite - required: true + description: Project name for ST2 LDAP auth backend + default: st2-auth-ldap position: 0 version: 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/bwc_prep_release_for_gui.meta.yaml b/actions/st2_prep_release_for_rbac_backend.meta.yaml similarity index 74% rename from actions/bwc_prep_release_for_gui.meta.yaml rename to actions/st2_prep_release_for_rbac_backend.meta.yaml index 2828d8a8..781b0f1e 100644 --- a/actions/bwc_prep_release_for_gui.meta.yaml +++ b/actions/st2_prep_release_for_rbac_backend.meta.yaml @@ -1,16 +1,14 @@ --- -name: bwc_prep_release_for_gui -description: Prepare the GUI 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: bwc_prep_release_for_gui.sh +entry_point: st2_prep_release_for_rbac_backend.sh parameters: project: type: string - description: Project name for bwc - required: true - enum: - - bwc-ui + description: Project name for ST2 RBAC backend + default: st2-rbac-backend position: 0 version: type: string @@ -20,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/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}" </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!" 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 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/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_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 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 %> 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]) %> 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: 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: 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" 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" diff --git a/actions/workflows/st2_e2e_tests.yaml b/actions/workflows/st2_e2e_tests.yaml index fa03d363..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: @@ -80,31 +79,29 @@ tasks: 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 - run_enterprise_tests: - action: st2cd.st2_enterprise_tests + echo_st2_cli_env: + action: core.echo input: - host_ip: <% ctx().host_ip %> - next: - - when: <% succeeded() %> - do: - - run_docs_tests + 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() %> + # do: + # - run_docs_tests run_docs_tests: action: core.remote input: @@ -116,6 +113,7 @@ tasks: next: - when: <% succeeded() %> do: + - echo_st2_cli_env - run_cli_tests run_cli_tests: action: core.remote 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 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: 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: 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: 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