Skip to content

Commit

Permalink
Merge branch 'develop' into feature/SCALRCORE-26056
Browse files Browse the repository at this point in the history
  • Loading branch information
ostasyuk committed May 4, 2023
2 parents b488fcf + 02ef69e commit babda99
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/default.yml
Expand Up @@ -52,9 +52,6 @@ jobs:
- name: Set API_BRANCH
if: ${{ contains(github.event.head_commit.message, '[API_BRANCH]') }}
run: echo "API_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Set DB_BRANCH
if: ${{ contains(github.event.head_commit.message, '[DB_BRANCH]') }}
run: echo "DB_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- id: auth
uses: google-github-actions/auth@v0
with:
Expand Down Expand Up @@ -101,12 +98,6 @@ jobs:
FATMOUSE_BRANCH="--fatmouse-branch ${{ env.API_BRANCH }}"
fi
if [ -z ${{ env.DB_BRANCH }} ]; then
SCALR_BRANCH=""
else
SCALR_BRANCH="--scalr-branch ${{ env.DB_BRANCH }}"
fi
TEV2_BRANCH=${{ env.API_BRANCH }}
NORMALIZED_BRANCH=$(echo $TEV2_BRANCH | tr / - | tr '[:upper:]' '[:lower:]')
if docker manifest inspect eu.gcr.io/development-156220/fatmouse/scalr-server-te:${NORMALIZED_BRANCH} ; then
Expand All @@ -129,7 +120,7 @@ jobs:
-v $GITHUB_OUTPUT:/fatmouse/output \
-v ~/.scalr-labs:/etc/scalr-labs \
fatmouse/python-builder:master python -u clickfile.py te up \
${FATMOUSE_BRANCH} ${SCALR_BRANCH} ${IMAGE} \
${FATMOUSE_BRANCH} ${IMAGE} \
--run-url ${{ steps.get-job-id.outputs.html_url }} \
--skip-ui-build \
--cpu=1 \
Expand Down
28 changes: 19 additions & 9 deletions .github/workflows/upstream.yml
Expand Up @@ -11,7 +11,7 @@ on:
required: true
default: "master"
db-branch:
description: "DB Branch"
description: "Not used, left for backward compatibility"
required: false
default: "master"
py-req:
Expand All @@ -21,6 +21,9 @@ on:
upstream-base-ref:
description: "Upstream base branch (e.g. 'master' or 'release/8.57.0')"
required: false
pr-id:
description: The number of the pull request
required: false

jobs:
acc-tests:
Expand All @@ -30,12 +33,13 @@ jobs:
ORG_ADMIN_TOKEN: ${{ secrets.ORG_ADMIN_TOKEN }}
SCALR_TOKEN: ${{ secrets.SCALR_TOKEN }}
API_BRANCH: ${{ github.event.inputs.api-branch }}
DB_BRANCH: ${{ github.event.inputs.db-branch }}
PY_REQ: ${{ github.event.inputs.py-req }}
UPSTREAM_ID: ${{ github.run_number }}
UPSTREAM_BASE_REF: ${{ github.event.inputs.upstream-base-ref }}
steps:
- uses: actions/checkout@v3
- name: Notify upstream about pending
run: make notify-upstream upstream_sha=${{ github.event.inputs.upstream-sha }} state=pending run_id=${{ github.run_id }}
- uses: actions/setup-go@v3
with:
go-version: "1.18"
Expand All @@ -46,6 +50,18 @@ jobs:
path: fatmouse
ref: ${{ env.API_BRANCH }}
token: ${{ secrets.GH_PAT }}
- name: Get pr labels
id: pr-labels
if: ${{ inputs.pr-id != '' }}
uses: ./fatmouse/.github/actions/pr-labels
with:
github_token: ${{ secrets.GH_PAT }}
owner: Scalr
repo: fatmouse
pr_id: ${{ inputs.pr-id }}
- name: Set py-req on PR with label
if: ${{ inputs.pr-id != '' && contains(steps.pr-labels.outputs.labels, ' py-req ') }}
run: echo "PY_REQ=yes" >> $GITHUB_ENV
- id: auth
uses: google-github-actions/auth@v0
with:
Expand Down Expand Up @@ -94,12 +110,6 @@ jobs:
FATMOUSE_BRANCH="--fatmouse-branch ${{ env.API_BRANCH }}"
fi
if [ ${{ env.DB_BRANCH }} = "master" ]; then
SCALR_BRANCH=""
else
SCALR_BRANCH="--scalr-branch ${{ env.DB_BRANCH }}"
fi
TEV2_BRANCH=${{ env.API_BRANCH }}
NORMALIZED_BRANCH=$(echo $TEV2_BRANCH | tr / - | tr '[:upper:]' '[:lower:]')
if docker manifest inspect eu.gcr.io/development-156220/fatmouse/scalr-server-te:${NORMALIZED_BRANCH} ; then
Expand All @@ -122,7 +132,7 @@ jobs:
-v $GITHUB_OUTPUT:/fatmouse/output \
-v ~/.scalr-labs:/etc/scalr-labs \
fatmouse/python-builder:master python -u clickfile.py te up \
${FATMOUSE_BRANCH} ${SCALR_BRANCH} ${IMAGE} \
${FATMOUSE_BRANCH} ${IMAGE} \
--run-url ${{ steps.get-job-id.outputs.html_url }} \
--skip-ui-build \
--cpu=1 \
Expand Down
2 changes: 0 additions & 2 deletions README.md
Expand Up @@ -126,13 +126,11 @@ TESTARGS="-run TestAccScalrWorkspace_basic TestAccScalrWorkspace_update" make te
To run tests with the container from the current branch. You need to specify branch flags in the commit message.
Flags:
- `[API_BRANCH]` - whether to use current branch as API branch.
- `[DB_BRANCH]` - whether to use current branch as DB branch.

For example, commit message:
```
Commit title
Some description
[API_BRANCH]
[DB_BRANCH]
```

0 comments on commit babda99

Please sign in to comment.