Skip to content

Commit

Permalink
SCALRCORE-24559: Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vyahello committed Dec 20, 2022
1 parent 53615e4 commit fbe3f9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/default.yml
Expand Up @@ -58,21 +58,17 @@ jobs:
- name: Copy secrets
shell: bash
run: |
echo "::group::Copy secrets"
mkdir ~/.scalr-labs
gsutil cp gs://drone_bucket/prod/private.d/.secrets.yaml fatmouse/tacobell/.secrets.yaml
gsutil cp gs://drone_bucket/prod/private.d/github.json ~/.scalr-labs/github.json
echo "::endgroup::"
- name: Configure docker
shell: bash
run: gcloud auth configure-docker eu.gcr.io
- name: Pull python builder
shell: bash
run: |
echo "::group::Pull python builder image"
docker pull eu.gcr.io/development-156220/fatmouse/python-builder:master
docker tag eu.gcr.io/development-156220/fatmouse/python-builder:master fatmouse/python-builder:master
echo "::endgroup::"
- name: Get current job log URL
uses: Tiryoh/gha-jobid-action@v0
id: get-job-id
Expand All @@ -81,12 +77,17 @@ jobs:
job_name: ${{ github.job }}
- name: Generate run tag
shell: bash
run: echo "RUN_TAG=${{ github.workflow }}-${{ github.job }}-${{ github.run_number }}" >> $GITHUB_ENV
run: |
if [ ${{ github.run_attempt }} = 1 ]; then
RERUN_SUFFIX=""
else
RERUN_SUFFIX=$(echo -${{ github.run_attempt }})
fi
echo "RUN_TAG=${{ github.workflow }}-${{ github.job }}-${{ github.run_number }}${RERUN_SUFFIX}" >> $GITHUB_ENV
- name: Create container
id: create
shell: bash
run: |
echo "::group::Create test app"
if [ -z ${{ env.API_BRANCH }} ] || [ -z ${{ env.DB_BRANCH }} ]; then
BRANCHES=""
else
Expand All @@ -102,7 +103,6 @@ jobs:
fatmouse/python-builder:master python -u clickfile.py te up ${BRANCHES} \
--run-url ${{ steps.get-job-id.outputs.html_url }} \
--dedicated ${{ env.RUN_TAG }}
echo "::endgroup::"
- name: Get Scalr hostname
shell: bash
run: |
Expand Down Expand Up @@ -134,15 +134,13 @@ jobs:
if: ${{ always() }}
shell: bash
run: |
echo "::group::Delete test app"
docker run --rm \
-w /fatmouse \
-v $PWD/fatmouse:/fatmouse \
-v ~/.scalr-labs:/etc/scalr-labs \
fatmouse/python-builder:master \
python -u clickfile.py te rm \
--no-wait ${{ env.RUN_TAG }}
echo "::endgroup::"
upload-dev:
name: upload-dev
needs: [lint, unit-tests, acc-tests]
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/upstream.yml
Expand Up @@ -49,21 +49,17 @@ jobs:
- name: Copy secrets
shell: bash
run: |
echo "::group::Copy secrets"
mkdir ~/.scalr-labs
gsutil cp gs://drone_bucket/prod/private.d/.secrets.yaml fatmouse/tacobell/.secrets.yaml
gsutil cp gs://drone_bucket/prod/private.d/github.json ~/.scalr-labs/github.json
echo "::endgroup::"
- name: Configure docker
shell: bash
run: gcloud auth configure-docker eu.gcr.io
- name: Pull python builder
shell: bash
run: |
echo "::group::Pull python builder image"
docker pull eu.gcr.io/development-156220/fatmouse/python-builder:master
docker tag eu.gcr.io/development-156220/fatmouse/python-builder:master fatmouse/python-builder:master
echo "::endgroup::"
- name: Get current job log URL
uses: Tiryoh/gha-jobid-action@v0
id: get-job-id
Expand All @@ -72,12 +68,17 @@ jobs:
job_name: ${{ github.job }}
- name: Generate run tag
shell: bash
run: echo "RUN_TAG=${{ github.workflow }}-${{ github.job }}-${{ github.run_number }}" >> $GITHUB_ENV
run: |
if [ ${{ github.run_attempt }} = 1 ]; then
RERUN_SUFFIX=""
else
RERUN_SUFFIX=$(echo -${{ github.run_attempt }})
fi
echo "RUN_TAG=${{ github.workflow }}-${{ github.job }}-${{ github.run_number }}${RERUN_SUFFIX}" >> $GITHUB_ENV
- name: Create container
id: create
shell: bash
run: |
echo "::group::Create test app"
if [ ${{ env.API_BRANCH }} = "master" ] && [ ${{ env.DB_BRANCH }} = "master" ]; then
BRANCHES=""
else
Expand All @@ -93,7 +94,6 @@ jobs:
fatmouse/python-builder:master python -u clickfile.py te up ${BRANCHES} \
--run-url ${{ steps.get-job-id.outputs.html_url }} \
--dedicated ${{ env.RUN_TAG }}
echo "::endgroup::"
- name: Get Scalr hostname
shell: bash
run: |
Expand All @@ -117,15 +117,13 @@ jobs:
if: ${{ always() }}
shell: bash
run: |
echo "::group::Delete test app"
docker run --rm \
-w /fatmouse \
-v $PWD/fatmouse:/fatmouse \
-v ~/.scalr-labs:/etc/scalr-labs \
fatmouse/python-builder:master \
python -u clickfile.py te rm \
--no-wait ${{ env.RUN_TAG }}
echo "::endgroup::"
- name: Notify upstream about success
if: ${{ success() }}
run: make notify-upstream upstream_sha=${{ github.event.inputs.upstream-sha }} state=success run_id=${{ github.run_id }}
Expand Down

0 comments on commit fbe3f9b

Please sign in to comment.