diff --git a/CHECKLIST.md b/CHECKLIST.md index 9512c671..b6441ff5 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -35,7 +35,6 @@ A list of planned features—different for every release, of course–should fol 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. -- [ ] Note whether Mistral has a new version branch: you'll need it for st2workroom later. - [ ] 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. @@ -47,7 +46,7 @@ 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, Mistral, and st2 itself (x4: Ubuntu 16.04, Ubuntu 18.04, RHEL7, RHEL8). +- [ ] 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. diff --git a/actions/mistral_branch_candidate.yaml b/actions/mistral_branch_candidate.yaml deleted file mode 100644 index 74575969..00000000 --- a/actions/mistral_branch_candidate.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: mistral_branch_candidate -description: Create a new release candidate for Mistral. -enabled: true -runner_type: orquesta -entry_point: workflows/mistral_branch_candidate.yaml -parameters: - host: - type: string - description: The name of the hosts where the build process will run. - version: - type: string - description: The release version major.minor.patch. - required: true - repo_main: - type: string - default: git@github.com:StackStorm/mistral.git - repo_client: - type: string - default: git@github.com:StackStorm/python-mistralclient.git - repo_action: - type: string - default: git@github.com:StackStorm/st2mistral.git - repo_branch: - type: string - default: master - repo_dir: - type: string - default: /mnt/repos - requirements: - type: string - description: List of python dependencies from pip freeze. - default: '' - debug: - type: boolean - default: false diff --git a/actions/mistral_create_branch.sh b/actions/mistral_create_branch.sh deleted file mode 100755 index 1e293dd8..00000000 --- a/actions/mistral_create_branch.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/bash -set -e - -VERSION=$1 -REPO_MAIN=$2 -REPO_CLIENT=$3 -REPO_ACTION=$4 -REQUIREMENTS=$(echo "$5" | sed 's/\\\\n/\n/g' | sed 's/\\n/\n/g') - -GIT=`which git` -SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` -BRANCH=st2-${VERSION} - -REGEX="^([0-9])+.([0-9])+.([0-9])+$" - -if ! [[ ${VERSION} =~ ${REGEX} ]]; then - >&2 echo "ERROR: Invalid version format." - exit 1 -fi - -echo "Checking if branches exist..." -REPOS=( - ${REPO_MAIN} - ${REPO_CLIENT} - ${REPO_ACTION} -) - -for REPO in "${REPOS[@]}" -do - if [[ ! -d "${REPO}" ]]; then - >&2 echo "ERROR: ${REPO} does not exist." - exit 1 - fi - - cd ${REPO} - BRANCH_EXISTS=`${GIT} ls-remote --heads | grep refs/heads/${BRANCH}; echo $?` - if [[ ${BRANCH_EXISTS} != 1 ]]; then - >&2 echo "ERROR: Branch ${BRANCH} already exists in ${REPO}." - exit 1 - fi -done - - - -echo "Creating branch for mistralclient..." -cd ${REPO_CLIENT} -${GIT} checkout -b ${BRANCH} - -VERSION_FILE="mistralclient/__init__.py" -echo "Setting version in ${VERSION_FILE} to ${VERSION}..." -echo "__version__ = '${VERSION}'" > ${VERSION_FILE} -${GIT} add ${VERSION_FILE} - -VERSION_FILE="setup.cfg" -echo "Setting version in ${VERSION_FILE} to ${VERSION}..." -# 1. First delete all "version = " occurences - this way we handle both - minor and patch -# release correctly -sed -i '/^version = .*$/d' ${VERSION_FILE} -# 2. Append a version -sed -i "s/^name = python-mistralclient/name = python-mistralclient\nversion = ${VERSION}/g" ${VERSION_FILE} -${GIT} add ${VERSION_FILE} - -${GIT} commit -qm "Update version info for release - ${VERSION}" -${GIT} push origin ${BRANCH} -q - - -##################################### -# st2mistral -##################################### -echo "Creating branch for st2mistral..." -cd ${REPO_ACTION} -${GIT} checkout -b ${BRANCH} -${GIT} push origin ${BRANCH} -q - - -##################################### -# mistral -##################################### -echo "Creating branch for mistral..." -cd ${REPO_MAIN} -${GIT} checkout -b ${BRANCH} - -VERSION_FILE="version_st2.py" -echo "Setting version in ${VERSION_FILE} to ${VERSION}..." -sed -i -e "s/\(__version__ = \).*/\1'${VERSION}'/" ${VERSION_FILE} - - -# Update 'ST2_PACKAGES_BRANCH' to latest stable "vX.Y" branch at '.circleci/config.yml' -VERSION_FILE=".circleci/config.yml" -NEW_ST2_PACKAGES_BRANCH_STR="ST2_PACKAGES_BRANCH: v${SHORT_VERSION}" -NEW_ST2_PACKAGES_BRANCH_STR_MATCH=`grep "${NEW_ST2_PACKAGES_BRANCH_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_ST2_PACKAGES_BRANCH_STR_MATCH}" ]]; then - echo "[mistral][${BRANCH}] Setting 'ST2_PACKAGES_BRANCH' in '${VERSION_FILE}' to latest stable 'v${SHORT_VERSION}' branch..." - sed -i -e "s/\(ST2_PACKAGES_BRANCH:\).*/\1 v${SHORT_VERSION}/" ${VERSION_FILE} - - NEW_ST2_PACKAGES_BRANCH_STR_MATCH=`grep "${NEW_ST2_PACKAGES_BRANCH_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_ST2_PACKAGES_BRANCH_STR_MATCH}" ]]; then - >&2 echo "[mistral][${BRANCH}] ERROR: Unable to update the 'ST2_PACKAGES_BRANCH' in '${VERSION_FILE}'!" - exit 1 - fi -fi - -# Update 'ST2MISTRAL_GITREV' to latest stable "st2-X.Y.Z" branch at '.circleci/config.yml' -VERSION_FILE=".circleci/config.yml" -NEW_ST2MISTRAL_GITREV_STR="ST2MISTRAL_GITREV: ${BRANCH}" -NEW_ST2MISTRAL_GITREV_STR_MATCH=`grep "${NEW_ST2MISTRAL_GITREV_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_ST2MISTRAL_GITREV_STR_MATCH}" ]]; then - echo "[mistral][${BRANCH}] Setting 'ST2MISTRAL_GITREV' in '${VERSION_FILE}' to latest stable '${BRANCH}' branch..." - sed -i -e "s/\(ST2MISTRAL_GITREV:\).*/\1 ${BRANCH}/" ${VERSION_FILE} - - NEW_ST2MISTRAL_GITREV_STR_MATCH=`grep "${NEW_ST2MISTRAL_GITREV_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_ST2MISTRAL_GITREV_STR_MATCH}" ]]; then - >&2 echo "[mistral][${BRANCH}] ERROR: Unable to update the 'ST2MISTRAL_GITREV' in '${VERSION_FILE}'!" - exit 1 - fi -fi - - -git add -A -git commit -qm "Update version info for release - ${VERSION}" - -if [[ $(grep -c . <<< "${REQUIREMENTS}") > 1 ]]; then - echo "Updating requirements.txt..." - REQUIREMENTS=`echo "${REQUIREMENTS}" | sed '/https:\/\/github.com\/stackstorm/Id'` - echo "${REQUIREMENTS}" > requirements.txt - - grep -q 'python-mistralclient' requirements.txt || echo "git+https://github.com/StackStorm/python-mistralclient.git@${BRANCH}#egg=python-mistralclient" >> requirements.txt - - # Note: Newer versions of troveclient (>=2.10.0) don't work with our mistralclient fork because of the version changing we do - # See https://github.com/StackStorm/mistral/pull/24 for context and details - sed -i "s/^python-troveclient.*/python-troveclient==2.9.0/g" requirements.txt - - ${GIT} add requirements.txt - ${GIT} diff --quiet --exit-code --cached || ${GIT} commit -m "Pin dependencies in requirements.txt" -fi - -${GIT} push origin ${BRANCH} -q diff --git a/actions/mistral_create_branch.yaml b/actions/mistral_create_branch.yaml deleted file mode 100644 index 077764c7..00000000 --- a/actions/mistral_create_branch.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- - name: "mistral_create_branch" - runner_type: remote-shell-script - description: "Create a new branch for Mistral." - enabled: true - entry_point: "mistral_create_branch.sh" - parameters: - version: - type: string - description: The release version major.minor.patch. - required: true - position: 0 - repo_main: - type: string - description: Location of cloned mistral repo on disk. - required: true - position: 1 - default: /home/stanley/mistral - repo_client: - type: string - description: Location of cloned python-mistralclient repo on disk. - required: true - position: 2 - default: /home/stanley/mistralclient - repo_action: - type: string - description: Location of cloned st2mistral repo on disk. - required: true - position: 3 - default: /home/stanley/st2mistral - requirements: - type: string - description: List of python dependencies from pip freeze. - position: 4 - default: "" - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/mistral_create_tag.sh b/actions/mistral_create_tag.sh deleted file mode 100755 index 39029731..00000000 --- a/actions/mistral_create_tag.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -set -e - -VERSION=$1 -REPO_MAIN=$2 -REPO_CLIENT=$3 -REPO_ACTION=$4 - -GIT=`which git` - -BRANCH=st2-${VERSION} -TAGGED_VERSION=${BRANCH} -echo "Tagging release for version ${BRANCH}..." - -REGEX="^([0-9])+.([0-9])+.([0-9])+$" - -if ! [[ ${VERSION} =~ ${REGEX} ]]; then - >&2 echo "ERROR: Invalid version format." - exit 1 -fi - -echo "Checking if branches exist..." -REPOS=( - ${REPO_MAIN} - ${REPO_CLIENT} - ${REPO_ACTION} -) - -for REPO in "${REPOS[@]}" -do - if [[ ! -d "${REPO}" ]]; then - >&2 echo "ERROR: ${REPO} does not exist." - exit 1 - fi - - cd ${REPO} - BRANCH_EXISTS=`${GIT} ls-remote --heads | grep refs/heads/${BRANCH}` - if [[ -z "${BRANCH_EXISTS}" ]]; then - >&2 echo "ERROR: Branch ${BRANCH} does not exist in ${REPO}." - exit 1 - fi -done - -for REPO in "${REPOS[@]}" -do - echo "Creating tag in ${REPO}..." - cd ${REPO} - - TAGGED=`git tag -l ${TAGGED_VERSION} || true` - if [[ -z "${TAGGED}" ]]; then - # TAG RELEASE - echo "Tagging release ${TAGGED_VERSION} for ${REPO}..." - ${GIT} tag -a ${BRANCH} -m "Release for st2 v${VERSION}" - ${GIT} push --tags - else - echo "Tag ${TAGGED_VERSION} already exists." - fi -done diff --git a/actions/mistral_create_tag.yaml b/actions/mistral_create_tag.yaml deleted file mode 100644 index b32bcc93..00000000 --- a/actions/mistral_create_tag.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- - name: "mistral_create_tag" - runner_type: remote-shell-script - description: "Create a new tag for Mistral." - enabled: true - entry_point: "mistral_create_tag.sh" - parameters: - version: - type: string - description: The release version major.minor.patch. - required: true - position: 0 - repo_main: - type: string - description: Location of cloned mistral repo on disk. - required: true - position: 1 - default: /home/stanley/mistral - repo_client: - type: string - description: Location of cloned python-mistralclient repo on disk. - required: true - position: 2 - default: /home/stanley/mistralclient - repo_action: - type: string - description: Location of cloned st2mistral repo on disk. - required: true - position: 3 - default: /home/stanley/st2mistral - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/mistral_release_candidate.yaml b/actions/mistral_release_candidate.yaml deleted file mode 100644 index 7eb26977..00000000 --- a/actions/mistral_release_candidate.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: mistral_release_candidate -description: Run the pipeline to release candidate for Mistral. -enabled: true -runner_type: orquesta -entry_point: workflows/mistral_release_candidate.yaml -parameters: - version: - type: string - description: The release version major.minor.patch. - required: true - test_host: - type: string - description: The name of the hosts where the integration test(s) will run. - build_host: - type: string - description: The name of the hosts where the build process will run. - mis_repo_main: - type: string - default: git@github.com:StackStorm/mistral.git - mis_repo_client: - type: string - default: git@github.com:StackStorm/python-mistralclient.git - mis_repo_action: - type: string - default: git@github.com:StackStorm/st2mistral.git - mis_repo_branch: - type: string - default: master - mis_repo_dir: - type: string - default: /mnt/repos - st2_repo_branch: - type: string - default: master - debug: - type: boolean - default: false diff --git a/actions/mistral_tag_release.yaml b/actions/mistral_tag_release.yaml deleted file mode 100644 index ea6a4be6..00000000 --- a/actions/mistral_tag_release.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: mistral_tag_release -description: Tag the release for Mistral. -enabled: true -runner_type: orquesta -entry_point: workflows/mistral_tag_release.yaml -parameters: - version: - type: string - description: The release version major.minor.patch. - required: true - host: - type: string - description: The name of the hosts where the build process will run. - repo_main: - type: string - default: git@github.com:StackStorm/mistral.git - repo_client: - type: string - default: git@github.com:StackStorm/python-mistralclient.git - repo_action: - type: string - default: git@github.com:StackStorm/st2mistral.git - repo_branch: - type: string - default: st2-{{version}} - immutable: true - repo_dir: - type: string - default: /home/stanley - debug: - type: boolean - default: false diff --git a/actions/st2_chg_ver_for_mistral.meta.yaml b/actions/st2_chg_ver_for_mistral.meta.yaml deleted file mode 100644 index 503ba936..00000000 --- a/actions/st2_chg_ver_for_mistral.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: st2_chg_ver_for_mistral -description: Change the version for the mistral repo -enabled: true -runner_type: remote-shell-script -entry_point: st2_chg_ver_for_mistral.sh -parameters: - project: - type: string - description: Project name for mistral - default: mistral - position: 0 - version: - type: string - description: Version to update to. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: StackStorm - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/st2_chg_ver_for_mistral.sh b/actions/st2_chg_ver_for_mistral.sh deleted file mode 100644 index f7178d4c..00000000 --- a/actions/st2_chg_ver_for_mistral.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 ST2 VERSION INFO -VERSION_FILE="version_st2.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 ${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/st2_chg_ver_for_mistralclient.meta.yaml b/actions/st2_chg_ver_for_mistralclient.meta.yaml deleted file mode 100644 index 436b71dc..00000000 --- a/actions/st2_chg_ver_for_mistralclient.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: st2_chg_ver_for_mistralclient -description: Change the version for the mistral client repo -enabled: true -runner_type: remote-shell-script -entry_point: st2_chg_ver_for_mistralclient.sh -parameters: - project: - type: string - description: Project name for mistral client - default: python-mistralclient - position: 0 - version: - type: string - description: Version to update to. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: StackStorm - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/st2_chg_ver_for_mistralclient.sh b/actions/st2_chg_ver_for_mistralclient.sh deleted file mode 100644 index 5c8e42f4..00000000 --- a/actions/st2_chg_ver_for_mistralclient.sh +++ /dev/null @@ -1,82 +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 VERSION INFO -VERSION_FILE="mistralclient/__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 - -VERSION_FILE="setup.cfg" -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/st2_chg_ver_for_st2.meta.yaml b/actions/st2_chg_ver_for_st2.meta.yaml index beda1ca1..a0b21d24 100644 --- a/actions/st2_chg_ver_for_st2.meta.yaml +++ b/actions/st2_chg_ver_for_st2.meta.yaml @@ -25,20 +25,15 @@ parameters: description: Branch to update default: master position: 3 - update_mistral: - type: boolean - description: If true, update mistralclient version in requirements.txt. - default: false - position: 4 update_changelog: type: boolean description: If true, update version in changelog. default: false - position: 5 + position: 4 local_repo: type: string description: Location where to clone the repo. Programmatically determined if not provided. - position: 6 + position: 5 dir: immutable: true default: /home/stanley/ diff --git a/actions/st2_chg_ver_for_st2.sh b/actions/st2_chg_ver_for_st2.sh index 627f9538..fe3add38 100644 --- a/actions/st2_chg_ver_for_st2.sh +++ b/actions/st2_chg_ver_for_st2.sh @@ -5,18 +5,16 @@ PROJECT=$1 VERSION=$2 FORK=$3 BRANCH=$4 -UPDATE_MISTRAL=$5 -UPDATE_CHANGELOG=$6 -LOCAL_REPO=$7 +UPDATE_CHANGELOG=$5 +LOCAL_REPO=$6 GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" CWD=`pwd` PUSH=0 # Temporary workaround until we fix "False" default value for boolean # See https://github.com/StackStorm/st2/issues/4649 -if [ "$#" -eq 5 ]; then - # UPDATE_MISTRAL and UPDATE_CHANGELOG not provided due to bug in StackStorm - UPDATE_MISTRAL="0" +if [ "$#" -eq 4 ]; then + # UPDATE_CHANGELOG not provided due to bug in StackStorm UPDATE_CHANGELOG="0" fi @@ -145,56 +143,6 @@ if [[ ! -z "${MODIFIED}" ]]; then fi -# SET NEW MISTRAL VERSION -if [ "${UPDATE_MISTRAL}" -eq "1" ]; then - MISTRAL_VERSION=st2-${VERSION} - MISTRALCLIENT_REPO_NAME="python-mistralclient" - MISTRALCLIENT_REPO="https://github.com/StackStorm/${MISTRALCLIENT_REPO_NAME}.git" - MISTRALCLIENT_REPO_ESC="https:\/\/github.com\/StackStorm\/${MISTRALCLIENT_REPO_NAME}.git" - MISTRAL_REQ_STR="git+${MISTRALCLIENT_REPO}@${MISTRAL_VERSION}#egg=${MISTRALCLIENT_REPO_NAME}" - - # Check if the branch exists in the python-mistralclient repo. - MISTRAL_BRANCH_EXISTS=`git ls-remote --heads ${MISTRALCLIENT_REPO} | grep refs/heads/${MISTRAL_VERSION} || true` - if [[ -z "${MISTRAL_BRANCH_EXISTS}" ]]; then - >&2 echo "WARNING: Branch ${MISTRAL_VERSION} does not exist in ${MISTRALCLIENT_REPO}." - fi - - # Replace the python-mistralclient version number in st2 requirements.txt. - REQ_FILES=( - "st2actions/in-requirements.txt" - "requirements.txt" - ) - - for REQ_FILE in "${REQ_FILES[@]}" - do - if [[ ! -e "${REQ_FILE}" ]]; then - >&2 echo "ERROR: Requirement file ${REQ_FILE} does not exist." - exit 1 - fi - - MISTRAL_REQ_STR_MATCH=`grep "${MISTRAL_REQ_STR}" ${REQ_FILE} || true` - if [[ -z "${MISTRAL_REQ_STR_MATCH}" ]]; then - echo "Updating mistralclient version in ${REQ_FILE} to \"${MISTRAL_VERSION}\"..." - sed -i -e "s/\(${MISTRALCLIENT_REPO_ESC}\).*\(\#egg=${MISTRALCLIENT_REPO_NAME}\)/\1@${MISTRAL_VERSION}\2/" ${REQ_FILE} - - MISTRAL_REQ_STR_MATCH=`grep "${MISTRAL_REQ_STR}" ${REQ_FILE} || true` - if [[ -z "${MISTRAL_REQ_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the mistralclient version in ${REQ_FILE}." - exit 1 - fi - fi - done - - MODIFIED=`git status | grep modified || true` - if [[ ! -z "${MODIFIED}" ]]; then - echo "Committing the mistralclient version update on branch ${BRANCH}..." - git add -A - git commit -qm "Update mistralclient version to ${MISTRAL_VERSION}" - PUSH=1 - fi -fi - - # SET VERSION AND DATE IN CHANGELOG if [ "${UPDATE_CHANGELOG}" -eq "1" ]; then DATE=`date +%s` diff --git a/actions/st2_chg_ver_for_st2_pkg.sh b/actions/st2_chg_ver_for_st2_pkg.sh index 8a433f6e..c5bc93e5 100644 --- a/actions/st2_chg_ver_for_st2_pkg.sh +++ b/actions/st2_chg_ver_for_st2_pkg.sh @@ -8,11 +8,6 @@ BRANCH=$4 LOCAL_REPO=$5 GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" -MISTRAL_BRANCH="master" -if [ "${BRANCH}" != "master" ]; then - MISTRAL_BRANCH="st2-${VERSION}" -fi - CWD=`pwd` @@ -45,34 +40,6 @@ echo "Currently at directory `pwd`..." # SET VERSION INFO VERSION_FILE="rake/build/environment.rb" -# Update the mistral version (1st location) -NEW_MISTRAL_VERSION_STR="envpass :gitrev,[ ]*'${MISTRAL_BRANCH}',[ ]*from: 'ST2MISTRAL_GITREV'" -NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - echo "Setting mistral version (1st location) in ${VERSION_FILE} to ${MISTRAL_BRANCH}..." - sed -i -e "s/\(envpass :gitrev,[ ]*'\).*\(',[ ]*from: 'ST2MISTRAL_GITREV'\)/\1${MISTRAL_BRANCH}\2/" ${VERSION_FILE} - - NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the mistral version (1st location) in ${VERSION_FILE}." - exit 1 - fi -fi - -# Update the mistral version (2nd location) -NEW_MISTRAL_VERSION_STR="envpass :mistral_version, '${VERSION}'" -NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - echo "Setting mistral version (2nd location) in ${VERSION_FILE} to ${MISTRAL_BRANCH}..." - sed -i -e "s/\(envpass :mistral_version, \).*/\1'${VERSION}'/" ${VERSION_FILE} - - NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the mistral version (2nd location) in ${VERSION_FILE}." - exit 1 - fi -fi - # Update the st2 version at rake/build/environment.rb NEW_VERSION_STR="envpass :gitrev,[ ]*'${BRANCH}',[ ]*from: 'ST2_GITREV'" NEW_VERSION_STR_MATCH=`grep "${NEW_VERSION_STR}" ${VERSION_FILE} || true` @@ -91,7 +58,6 @@ fi CIRCLE_YML_FILE=".circleci/config.yml" echo "Setting version in ${CIRCLE_YML_FILE} to ${BRANCH}..." sed -i -e "s/\(ST2_GITREV:[ ]*\).*/\1${BRANCH}/" ${CIRCLE_YML_FILE} -sed -i -e "s/\(ST2MISTRAL_GITREV:[ ]*\).*/\1${MISTRAL_BRANCH}/" ${CIRCLE_YML_FILE} MODIFIED=`git status | grep modified || true` if [[ ! -z "${MODIFIED}" ]]; then diff --git a/actions/st2_e2e_tests.meta.yaml b/actions/st2_e2e_tests.meta.yaml index 750ec833..1ce81845 100755 --- a/actions/st2_e2e_tests.meta.yaml +++ b/actions/st2_e2e_tests.meta.yaml @@ -11,7 +11,7 @@ parameters: required: true host_fqdn: type: string - description: FQDN of the ST2 VM under test - used to skip Mistral tests on Ubuntu Bionic + description: FQDN of the ST2 VM under test required: true protocol: type: string diff --git a/actions/st2_e2e_tests_test_inquiry.meta.yaml b/actions/st2_e2e_tests_test_inquiry.meta.yaml index e08888e8..50dc0e2a 100644 --- a/actions/st2_e2e_tests_test_inquiry.meta.yaml +++ b/actions/st2_e2e_tests_test_inquiry.meta.yaml @@ -9,10 +9,6 @@ parameters: host: type: string required: true - host_fqdn: - type: string - description: FQDN of the ST2 VM under test - used to skip Mistral tests on Ubuntu Bionic - required: true env: type: object required: true diff --git a/actions/st2_e2e_tests_test_mistral.meta.yaml b/actions/st2_e2e_tests_test_mistral.meta.yaml deleted file mode 100644 index aa1475d0..00000000 --- a/actions/st2_e2e_tests_test_mistral.meta.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: st2_e2e_tests_test_mistral -pack: st2cd -description: Run the set of st2 end to end tests -enabled: true -runner_type: orquesta -entry_point: workflows/st2_e2e_tests_test_mistral.yaml -parameters: - host_fqdn: - type: string - required: true - env: - type: object - required: true diff --git a/actions/st2_get_intalled_version.meta.yaml b/actions/st2_get_intalled_version.meta.yaml index 45781755..9be64700 100755 --- a/actions/st2_get_intalled_version.meta.yaml +++ b/actions/st2_get_intalled_version.meta.yaml @@ -17,6 +17,5 @@ parameters: - st2-rbac-backend - st2flow - st2web - - st2mistral - st2chatops - st2 diff --git a/actions/st2_perform_migrations.sh b/actions/st2_perform_migrations.sh index 797d1bbb..584ab9aa 100755 --- a/actions/st2_perform_migrations.sh +++ b/actions/st2_perform_migrations.sh @@ -146,12 +146,6 @@ run_migration_scripts() { done } -update_mistral_db() { - $(sudo service mistral-api stop; sudo service mistral-server stop) || true - /opt/stackstorm/mistral/bin/mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head - /opt/stackstorm/mistral/bin/mistral-db-manage --config-file /etc/mistral/mistral.conf populate -} - ## Version specific migration functions. Note that the function names must have to ## migrate_to_${major}.${minor}. Otherwise, those methods won't be run. @@ -164,7 +158,6 @@ trap 'fail' EXIT STEP="Setup args" && setup_args $@ STEP="Validate versions" && validate_versions STEP="Perform migration" && perform_migration -STEP="Perform updates" && update_mistral_db trap - EXIT ok_message diff --git a/actions/st2_prep_dev_for_mistral.meta.yaml b/actions/st2_prep_dev_for_mistral.meta.yaml deleted file mode 100644 index d4ab7765..00000000 --- a/actions/st2_prep_dev_for_mistral.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: st2_prep_dev_for_mistral -description: Prepare the mistral repo for next iteration of development -enabled: true -runner_type: remote-shell-script -entry_point: st2_chg_ver_for_mistral.sh -parameters: - project: - type: string - description: Project name for mistral - default: mistral - position: 0 - version: - type: string - description: Version to use for the next release. Should include the patch e.g. 0.1.0 - required: true - position: 1 - fork: - type: string - description: Fork to use - default: StackStorm - position: 2 - branch: - type: string - description: Branch to update - default: master - position: 3 - local_repo: - type: string - description: Location where to clone the repo. Programmatically determined if not provided. - position: 4 - dir: - immutable: true - default: /home/stanley/ - sudo: - immutable: true - default: false - cmd: - immutable: true - default: "" - kwarg_op: - immutable: true - default: "--" diff --git a/actions/st2_prep_patch_for_mistral.meta.yaml b/actions/st2_prep_patch_for_mistral.meta.yaml deleted file mode 100644 index 790381b4..00000000 --- a/actions/st2_prep_patch_for_mistral.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: st2_prep_patch_for_mistral -description: Prepare the mistral repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: st2_chg_ver_for_mistral.sh -parameters: - project: - type: string - description: Project name for mistral - default: mistral - 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: StackStorm - position: 2 - branch: - type: string - description: Branch to update - default: st2-{{version}} - 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_mistralclient.meta.yaml b/actions/st2_prep_patch_for_mistralclient.meta.yaml deleted file mode 100644 index ac3c95ee..00000000 --- a/actions/st2_prep_patch_for_mistralclient.meta.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: st2_prep_patch_for_mistralclient -description: Prepare the mistral client repo for patch release -enabled: true -runner_type: remote-shell-script -entry_point: st2_chg_ver_for_mistralclient.sh -parameters: - project: - type: string - description: Project name for mistral client - default: python-mistralclient - 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: StackStorm - position: 2 - branch: - type: string - description: Branch to update - default: st2-{{version}} - 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_st2.meta.yaml b/actions/st2_prep_patch_for_st2.meta.yaml index ba8d7b79..17a66a1d 100644 --- a/actions/st2_prep_patch_for_st2.meta.yaml +++ b/actions/st2_prep_patch_for_st2.meta.yaml @@ -25,20 +25,15 @@ parameters: description: Branch to update default: v{{version.split('.')[0]}}.{{version.split('.')[1]}} position: 3 - update_mistral: - type: boolean - description: If true, update mistralclient version in requirements.txt. - default: false - position: 4 update_changelog: type: boolean description: If true, update version in changelog. default: false - position: 5 + position: 4 local_repo: type: string description: Location where to clone the repo. Programmatically determined if not provided. - position: 6 + position: 5 dir: immutable: true default: /home/stanley/ diff --git a/actions/st2_prep_release_for_st2.sh b/actions/st2_prep_release_for_st2.sh index e5d664b4..ddc8b9de 100644 --- a/actions/st2_prep_release_for_st2.sh +++ b/actions/st2_prep_release_for_st2.sh @@ -167,69 +167,6 @@ if [[ ! -z "${MODIFIED}" ]]; then fi -# SET NEW MISTRAL VERSION -MISTRAL_VERSION=st2-${VERSION} -MISTRALCLIENT_REPO=https://github.com/StackStorm/python-mistralclient.git -MISTRALCLIENT_REPO_NAME=python-mistralclient.git - -# Check if the branch exists in the python-mistralclient repo. -MISTRAL_BRANCH_EXISTS=`git ls-remote --heads ${MISTRALCLIENT_REPO} | grep refs/heads/${MISTRAL_VERSION} || true` - -if [[ -z "${MISTRAL_BRANCH_EXISTS}" ]]; then - >&2 echo "WARNING: Branch ${MISTRAL_VERSION} does not exist in ${MISTRALCLIENT_REPO}." -fi - -# Replace the python-mistralclient version number in st2. -OLD_REQUIREMENT=${MISTRALCLIENT_REPO_NAME} -NEW_REQUIREMENT=${MISTRALCLIENT_REPO_NAME}@${MISTRAL_VERSION} - -ST2_ACTION_IN_REQ_FILE="st2actions/in-requirements.txt" - -if [[ ! -e "${ST2_ACTION_IN_REQ_FILE}" ]]; then - >&2 echo "ERROR: Requirement file ${ST2_ACTION_IN_REQ_FILE} does not exist." - exit 1 -fi - -NEW_REQUIREMENT_STR_MATCH=`grep "${NEW_REQUIREMENT}" ${ST2_ACTION_IN_REQ_FILE} || true` -if [[ -z "${NEW_REQUIREMENT_STR_MATCH}" ]]; then - echo "Updating requirement in ${ST2_ACTION_IN_REQ_FILE} to \"${NEW_REQUIREMENT}\"..." - sed -i "s/${OLD_REQUIREMENT}/${NEW_REQUIREMENT}/g" ${ST2_ACTION_IN_REQ_FILE} - - NEW_REQUIREMENT_STR_MATCH=`grep "${NEW_REQUIREMENT}" ${ST2_ACTION_IN_REQ_FILE} || true` - if [[ -z "${NEW_REQUIREMENT_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the mistralclient version in ${ST2_ACTION_IN_REQ_FILE}." - exit 1 - fi -fi - -ST2_REQ_FILE="requirements.txt" - -if [[ ! -e "${ST2_REQ_FILE}" ]]; then - >&2 echo "ERROR: Requirement file ${ST2_REQ_FILE} does not exist." - exit 1 -fi - -NEW_REQUIREMENT_STR_MATCH=`grep "${NEW_REQUIREMENT}" ${ST2_REQ_FILE} || true` -if [[ -z "${NEW_REQUIREMENT_STR_MATCH}" ]]; then - echo "Updating requirement in ${ST2_REQ_FILE} to \"${NEW_REQUIREMENT}\"..." - sed -i "s/${OLD_REQUIREMENT}/${NEW_REQUIREMENT}/g" ${ST2_REQ_FILE} - - NEW_REQUIREMENT_STR_MATCH=`grep "${NEW_REQUIREMENT}" ${ST2_REQ_FILE} || true` - if [[ -z "${NEW_REQUIREMENT_STR_MATCH}" ]]; then - >&2 echo "ERROR: Unable to update the mistralclient version in ${ST2_REQ_FILE}." - exit 1 - fi -fi - -MODIFIED=`git status | grep modified || true` -if [[ ! -z "${MODIFIED}" ]]; then - echo "Committing the mistralclient version update on branch ${BRANCH}..." - git add -A - git commit -qm "Update mistralclient version - ${MISTRAL_VERSION}" - PUSH=1 -fi - - # PUSH COMMITS TO RELEASE BRANCH if [[ ${PUSH} -eq 1 ]]; then echo "Pushing commits to origin ${BRANCH}..." diff --git a/actions/st2_prep_release_for_st2_pkg.sh b/actions/st2_prep_release_for_st2_pkg.sh index 4ce580a7..f5b33071 100644 --- a/actions/st2_prep_release_for_st2_pkg.sh +++ b/actions/st2_prep_release_for_st2_pkg.sh @@ -8,7 +8,6 @@ LOCAL_REPO=$4 GIT_REPO="git@github.com:${FORK}/${PROJECT}.git" SHORT_VERSION=`echo ${VERSION} | cut -d "." -f1-2` DEV_VERSION="$(sed "s/\(.\)\(.\)/\1.\2/" <<< "$((${SHORT_VERSION//.}+1))")dev" -MISTRAL_VERSION="st2-${VERSION}" BRANCH="v${SHORT_VERSION}" CWD=`pwd` @@ -45,21 +44,6 @@ echo "Currently at directory `pwd`..." # MASTER #################################### -# Update mistral 'mistral_version' to latest dev "X.Ydev" at 'rake/build/environment.rb' -VERSION_FILE="rake/build/environment.rb" -NEW_MISTRAL_VERSION_STR="envpass :mistral_version, '${DEV_VERSION}'" -NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - echo "[master] Setting 'mistral_version' in '${VERSION_FILE}' to latest dev: '${DEV_VERSION}'..." - sed -i -e "s/\(envpass :mistral_version, \).*/\1'${DEV_VERSION}'/" ${VERSION_FILE} - - NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - >&2 echo "[master] ERROR: Unable to update the 'mistral_version' to latest dev in '${VERSION_FILE}'." - exit 1 - fi -fi - # Update 'BRANCH' to latest stable "vX.Y" branch at 'scripts/st2_bootstrap.sh' VERSION_FILE="scripts/st2_bootstrap.sh" echo "[master] Setting 'BRANCH' version in '${VERSION_FILE}' to latest stable '${BRANCH}'..." @@ -97,46 +81,11 @@ if [[ -z "${NEW_VERSION_STR_MATCH}" ]]; then fi fi -# Update mistral 'ST2MISTRAL_GITREV' branch to latest stable 'st2-X.Y' at 'rake/build/environment.rb' -VERSION_FILE="rake/build/environment.rb" -NEW_MISTRAL_VERSION_STR="envpass :gitrev,[ ]*'${MISTRAL_VERSION}',[ ]*from: 'ST2MISTRAL_GITREV'" -NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - echo "[${BRANCH}] Setting 'ST2MISTRAL_GITREV' branch in '${VERSION_FILE}' to latest stable '${MISTRAL_VERSION}'..." - sed -i -e "s/\(envpass :gitrev,[ ]*'\).*\(',[ ]*from: 'ST2MISTRAL_GITREV'\)/\1${MISTRAL_VERSION}\2/" ${VERSION_FILE} - - NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - >&2 echo "[${BRANCH}] ERROR: Unable to update the 'ST2MISTRAL_GITREV' in '${VERSION_FILE}'." - exit 1 - fi -fi - -# Update mistral 'mistral_version' to latest stable 'X.Y' version at 'rake/build/environment.rb' -VERSION_FILE="rake/build/environment.rb" -NEW_MISTRAL_VERSION_STR="envpass :mistral_version, '${VERSION}'" -NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` -if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - echo "[${BRANCH}] Setting 'mistral_version' in '${VERSION_FILE}' to latest stable '${VERSION}'..." - sed -i -e "s/\(envpass :mistral_version, \).*/\1'${VERSION}'/" ${VERSION_FILE} - - NEW_MISTRAL_VERSION_STR_MATCH=`grep "${NEW_MISTRAL_VERSION_STR}" ${VERSION_FILE} || true` - if [[ -z "${NEW_MISTRAL_VERSION_STR_MATCH}" ]]; then - >&2 echo "[${BRANCH}] ERROR: Unable to update the 'mistral_version' in '${VERSION_FILE}'." - exit 1 - fi -fi - # Update 'ST2_GITREV' in '.circleci/config.yml' CIRCLE_YML_FILE=".circleci/config.yml" echo "[${BRANCH}] Setting 'ST2_GITREV' in '${CIRCLE_YML_FILE}' to '${BRANCH}'..." sed -i -e "s/#\s*\(ST2_GITREV:\s*\).*/\1${BRANCH}/" ${CIRCLE_YML_FILE} -# Update 'ST2MISTRAL_GITREV' in '.circleci/config.yml' -echo "[${BRANCH}] Setting 'ST2MISTRAL_GITREV' in '${CIRCLE_YML_FILE}' to '${MISTRAL_VERSION}'..." -sed -i -e "s/#\s*\(ST2MISTRAL_GITREV:\s*\).*/\1${MISTRAL_VERSION}/" ${CIRCLE_YML_FILE} - - MODIFIED=`git status | grep modified || true` if [[ ! -z "${MODIFIED}" ]]; then git add -A diff --git a/actions/workflows/e2e_tests.yaml b/actions/workflows/e2e_tests.yaml index 2e78afe3..e2269aa8 100644 --- a/actions/workflows/e2e_tests.yaml +++ b/actions/workflows/e2e_tests.yaml @@ -227,23 +227,7 @@ params: "token={{st2_token}} protocol={{protocol}}" hosts: "{{hostname}}" timeout: 600 - on-success: "test_mistral_examples" - - - name: "test_mistral_examples" - ref: "st2cd.action_run" - params: - env: - ST2_BASE_URL: "{{protocol}}://{{hostname}}" - ST2_AUTH_URL: "{{protocol}}://{{hostname}}:9100" - ST2_API_URL: "{{protocol}}://{{hostname}}:9101" - name: "test_mistral_examples" - token: "{{st2_token}}" - params: "" - action: "examples.mistral_examples" - hosts: "{{hostname}}" - timeout: 600 on-success: "test_timer_rule" - on-failure: "test_timer_rule" - name: "test_timer_rule" ref: "st2cd.action_run" diff --git a/actions/workflows/mistral_branch_candidate.yaml b/actions/workflows/mistral_branch_candidate.yaml deleted file mode 100644 index f072152a..00000000 --- a/actions/workflows/mistral_branch_candidate.yaml +++ /dev/null @@ -1,106 +0,0 @@ ---- -version: '1.0' -description: Create a new release candidate for Mistral. -input: - - host - - version - - repo_main - - repo_client - - repo_action - - repo_branch - - repo_dir - - requirements - - debug -tasks: - init: - action: core.noop - next: - - when: <% ctx().host = null or str(ctx().host).toLower() = "none" or str(ctx().host.toLower()) = "null" %> - do: - - get_host - - when: <% ctx().host != null and str(ctx().host).toLower() != "none" and str(ctx().host.toLower()) != "null" %> - do: - - clone_repos - 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: - - create_repos_dir - create_repos_dir: - action: core.remote_sudo - input: - hosts: <% ctx().host %> - cmd: mkdir -p <% ctx().repo_dir %> - next: - - when: <% succeeded() %> - do: - - change_repos_dir_owner - change_repos_dir_owner: - action: core.remote_sudo - input: - hosts: <% ctx().host %> - cmd: chown stanley:stanley <% ctx().repo_dir %> - next: - - when: <% succeeded() %> - do: - - clone_repos - clone_repos: - with: - items: proj, repo in <% zip(list(mistral, mistralclient, st2mistral), - list(ctx().repo_main, - ctx().repo_client, - ctx().repo_action)) %> - action: st2cd.git_clone - input: - hosts: <% ctx().host %> - repo: <% item(repo) %> - branch: <% ctx().repo_branch %> - target: <% ctx().repo_dir %>/<% item(proj) %>_<% ctx().repo_branch %> - next: - - when: <% succeeded() %> - publish: - - clone_paths: <% dict(mistral => result()[0].get(ctx().host).stdout, - mistralclient => result()[1].get(ctx().host).stdout, - st2mistral => result()[2].get(ctx().host).stdout) %> - do: - - create_branch - - when: <% failed() %> - publish: - - clone_paths: <% dict(mistral => result()[0].get(ctx().host).stdout, - mistralclient => result()[1].get(ctx().host).stdout, - st2mistral => result()[2].get(ctx().host).stdout) %> - do: - - remove_repos - - fail - create_branch: - action: st2cd.mistral_create_branch - input: - hosts: <% ctx().host %> - version: <% ctx().version %> - repo_main: <% ctx().clone_paths.get(mistral) %> - repo_client: <% ctx().clone_paths.get(mistralclient) %> - repo_action: <% ctx().clone_paths.get(st2mistral) %> - requirements: <% ctx().requirements %> - next: - - do: - - remove_repos - - when: <% failed() %> - do: - - fail - - remove_repos: - with: - items: repo in <% list(ctx().clone_paths.get(mistral), - ctx().clone_paths.get(mistralclient), - ctx().clone_paths.get(st2mistral)) %> - action: st2cd.git_clean - input: - hosts: <% ctx().host %> - repo: <% item(repo) %> diff --git a/actions/workflows/mistral_release_candidate.yaml b/actions/workflows/mistral_release_candidate.yaml deleted file mode 100644 index abdb59d0..00000000 --- a/actions/workflows/mistral_release_candidate.yaml +++ /dev/null @@ -1,77 +0,0 @@ ---- -version: '1.0' -description: Run the pipeline to release candidate for Mistral. -input: - - version - - test_host - - build_host - - mis_repo_main - - mis_repo_client - - mis_repo_action - - mis_repo_branch - - mis_repo_dir - - st2_repo_branch - - debug - - notify_channels: - - '#thunderdome' - - notify_failure_channels: - - '#thunderdome' - - '#opstown' - - webui_base_url: https://st2cicd.uswest2.stackstorm.net -tasks: - test: - action: st2ci.mistral - input: - test_host: <% ctx().test_host %> - build_host: <% ctx().build_host %> - mis_repo_branch: <% ctx().mis_repo_branch %> - st2_repo_branch: <% ctx().st2_repo_branch %> - next: - - when: <% succeeded() %> - publish: - - shas: <% result().output.shas %> - - deps: <% result().output.deps %> - do: - - branch - - when: <% failed() %> - do: - - notify_failure - branch: - action: st2cd.mistral_branch_candidate - input: - host: <% ctx().build_host %> - version: <% ctx().version %> - repo_main: <% ctx().mis_repo_main %> - repo_client: <% ctx().mis_repo_client %> - repo_action: <% ctx().mis_repo_action %> - repo_branch: <% ctx().mis_repo_branch %> - repo_dir: <% ctx().mis_repo_dir %> - requirements: <% ctx().deps %> - next: - - when: <% succeeded() %> - do: - - notify_success - - when: <% failed() %> - do: - - notify_failure - - notify_success: - with: - items: channel in <% ctx().notify_channels %> - action: slack.chat.postMessage - input: - channel: <% item(channel) %> - text: 'st2cd.mistral_release_candidate: SUCCEEDED' - attachments: '[{"fallback": "[st2cd.mistral_release_candidate: SUCCEEDED]", "title": "[st2cd.mistral_release_candidate: SUCCEEDED]", "title_link": "<% ctx().webui_base_url %>/#/history/<% ctx(st2).action_execution_id %>/general", "text": "Release candidate <% ctx().version %> is available.", "color": "#008000"}]' - - notify_failure: - with: - items: channel in <% ctx().notify_failure_channels %> - action: slack.chat.postMessage - input: - channel: <% item(channel) %> - text: 'st2cd.mistral_release_candidate: FAILED' - attachments: '[{"fallback": "[st2cd.mistral_release_candidate: FAILED]", "title": "[st2cd.mistral_release_candidate: FAILED]", "title_link": "<% ctx().webui_base_url %>/#/history/<% ctx(st2).action_execution_id %>/general", "text": "Error releasing candidate <% ctx().version %>.", "color": "#FF0000"}]' - next: - - do: - - fail diff --git a/actions/workflows/mistral_tag_release.yaml b/actions/workflows/mistral_tag_release.yaml deleted file mode 100644 index d52846ad..00000000 --- a/actions/workflows/mistral_tag_release.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -version: '1.0' -description: Tag the release for Mistral. -input: - - version - - host - - repo_main - - repo_client - - repo_action - - repo_branch - - repo_dir - - debug - - tagged: false -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: - - clone_repos - 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: - - clone_repos - clone_repos: - with: - items: proj, repo in <% zip(list(mistral, mistralclient, st2mistral), - list(ctx().repo_main, - ctx().repo_client, - ctx().repo_action)) %> - action: st2cd.git_clone - input: - hosts: <% ctx().host %> - repo: <% item(repo) %> - branch: <% ctx().repo_branch %> - target: <% ctx().repo_dir %>/<% item(proj) %>_<% ctx().local_repo_sfx %> - next: - - when: <% succeeded() %> - publish: - - clone_paths: <% dict(mistral => result()[0].get(ctx().host).stdout, - mistralclient => result()[1].get(ctx().host).stdout, - st2mistral => result()[2].get(ctx().host).stdout) %> - do: - - tag_release - - when: <% failed() %> - do: - - cleanup - tag_release: - action: st2cd.mistral_create_tag - input: - hosts: <% ctx().host %> - version: <% ctx().version %> - repo_main: <% ctx().clone_paths.get(mistral) %> - repo_client: <% ctx().clone_paths.get(mistralclient) %> - repo_action: <% ctx().clone_paths.get(st2mistral) %> - next: - - when: <% succeeded() %> - publish: - - tagged: true - do: - - cleanup - - when: <% failed() %> - do: - - cleanup - cleanup: - action: core.remote - input: - cmd: <% 'rm -rf ' + ctx().repo_dir + '/*mistral*' + ctx().local_repo_sfx + '*' %> - hosts: <% ctx().host %> - next: - - when: <% succeeded() and (not ctx().tagged) %> - do: - - fail diff --git a/actions/workflows/st2_e2e_tests.yaml b/actions/workflows/st2_e2e_tests.yaml index 4f47876b..fa03d363 100644 --- a/actions/workflows/st2_e2e_tests.yaml +++ b/actions/workflows/st2_e2e_tests.yaml @@ -67,26 +67,6 @@ tasks: host: <% ctx().host_ip %> env: <% ctx().st2_cli_env %> protocol: <% ctx().protocol %> - next: - - when: <% succeeded() %> - do: - - check_if_mistral_is_available - check_if_mistral_is_available: - action: core.noop - next: - - when: <% succeeded() and ('u18' in ctx().host_fqdn.toLower() or 'el8' in ctx().host_fqdn.toLower() or 'centos8' in ctx().host_fqdn.toLower()) %> - do: - # Mistral is not available on Ubuntu Bionic or RHEL 8, so skip them - - run_inquiry_tests - - when: <% succeeded() and (not 'u18' in ctx().host_fqdn.toLower()) and (not 'el8' in ctx().host_fqdn.toLower()) and (not 'centos8' in ctx().host_fqdn.toLower()) %> - do: - # Run Mistral tests after basic and quickstart - - run_mistral_tests - run_mistral_tests: - action: st2cd.st2_e2e_tests_test_mistral - input: - host_fqdn: <% ctx().host_ip %> - env: <% ctx().st2_cli_env %> next: - when: <% succeeded() %> do: @@ -95,7 +75,6 @@ tasks: action: st2cd.st2_e2e_tests_test_inquiry input: host: <% ctx().host_ip %> - host_fqdn: <% ctx().host_fqdn %> env: <% ctx().st2_cli_env %> protocol: <% ctx().protocol %> next: diff --git a/actions/workflows/st2_e2e_tests_test_inquiry.yaml b/actions/workflows/st2_e2e_tests_test_inquiry.yaml index d1f89bd9..1d511435 100644 --- a/actions/workflows/st2_e2e_tests_test_inquiry.yaml +++ b/actions/workflows/st2_e2e_tests_test_inquiry.yaml @@ -2,7 +2,6 @@ version: '1.0' input: - host - - host_fqdn - env - protocol tasks: @@ -21,24 +20,3 @@ tasks: env: <% ctx().env %> cmd: st2 run tests.test_inquiry_chain <% ctx().st2_cli_args %> timeout: 180 - next: - - when: <% succeeded() %> - do: - - check_if_mistral_is_available - check_if_mistral_is_available: - action: core.noop - next: - - when: <% succeeded() and ('u18' in ctx().host_fqdn.toLower() or 'el8' in ctx().host_fqdn.toLower() or 'centos8' in ctx().host_fqdn.toLower()) %> - do: - # Mistral is not available on Ubuntu Bionic or RHEL8, so skip Mistral tests - - noop - - when: <% succeeded() and (not 'u18' in ctx().host_fqdn.toLower()) and (not 'el8' in ctx().host_fqdn.toLower()) and (not 'centos8' in ctx().host_fqdn.toLower()) %> - do: - - test_inquiry_mistral - test_inquiry_mistral: - action: core.remote - input: - hosts: <% ctx().host %> - env: <% ctx().env %> - cmd: st2 run tests.test_inquiry_mistral <% ctx().st2_cli_args %> - timeout: 180 diff --git a/actions/workflows/st2_e2e_tests_test_mistral.yaml b/actions/workflows/st2_e2e_tests_test_mistral.yaml deleted file mode 100644 index 3000a17a..00000000 --- a/actions/workflows/st2_e2e_tests_test_mistral.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -version: '1.0' -input: - - host_fqdn - - env -tasks: - test_mistral_examples: - action: core.remote - input: - hosts: <% ctx().host_fqdn %> - env: <% ctx().env %> - cmd: st2 run examples.mistral_examples - timeout: 600 diff --git a/actions/workflows/st2_finalize_release.yaml b/actions/workflows/st2_finalize_release.yaml index 03f2759c..a8f46c95 100644 --- a/actions/workflows/st2_finalize_release.yaml +++ b/actions/workflows/st2_finalize_release.yaml @@ -76,15 +76,6 @@ tasks: fork: <% ctx().fork %> hosts: <% ctx().host %> cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - mistral_tag_release - mistral_tag_release: - action: st2cd.mistral_tag_release - input: - host: <% ctx().host %> - version: <% ctx().version %> next: - when: <% succeeded() %> do: diff --git a/actions/workflows/st2_prep_dev.yaml b/actions/workflows/st2_prep_dev.yaml index 8847a224..daba250c 100644 --- a/actions/workflows/st2_prep_dev.yaml +++ b/actions/workflows/st2_prep_dev.yaml @@ -50,22 +50,6 @@ tasks: local_repo: <% 'st2_' + ctx().local_repo_sfx %> hosts: <% ctx().host %> cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_mistral - - when: <% failed() %> - do: - - cleanup_on_failure - prep_mistral: - action: st2cd.st2_prep_dev_for_mistral - input: - project: mistral - version: <% ctx().dev_version %> - fork: <% ctx().fork %> - local_repo: <% 'mistral_' + 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 48bc8f22..f03cab92 100644 --- a/actions/workflows/st2_prep_patch.yaml +++ b/actions/workflows/st2_prep_patch.yaml @@ -44,43 +44,10 @@ tasks: project: st2 version: <% ctx().version %> fork: <% ctx().fork %> - update_mistral: true update_changelog: true local_repo: <% 'st2_' + ctx().local_repo_sfx %> hosts: <% ctx().host %> cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_mistral - - when: <% failed() %> - do: - - cleanup_on_failure - prep_mistral: - action: st2cd.st2_prep_patch_for_mistral - input: - project: mistral - version: <% ctx().version %> - fork: <% ctx().fork %> - local_repo: <% 'mistral_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> - next: - - when: <% succeeded() %> - do: - - prep_mistralclient - - when: <% failed() %> - do: - - cleanup_on_failure - prep_mistralclient: - action: st2cd.st2_prep_patch_for_mistralclient - input: - project: python-mistralclient - version: <% ctx().version %> - fork: <% ctx().fork %> - local_repo: <% 'mistralclient_' + ctx().local_repo_sfx %> - hosts: <% ctx().host %> - cwd: <% ctx().cwd %> next: - when: <% succeeded() %> do: diff --git a/pack.yaml b/pack.yaml index 94f33715..2168bdb9 100644 --- a/pack.yaml +++ b/pack.yaml @@ -1,6 +1,6 @@ --- name : st2cd description : Continuous delivery pipeline at StackStorm -version : 0.1.2 +version : 0.1.3 author : st2-dev email : info@stackstorm.com