mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
ci: remove CIRCLE_* environment variables from scripts
Instead, allow specifying free-form BUILD_ID from the command line. scripts/remote_python_packaging.sh still uses CIRCLE_ variables to avoid changing working CircleCI config.
This commit is contained in:
5
.github/workflows/remote_tests.yml
vendored
5
.github/workflows/remote_tests.yml
vendored
@@ -5,9 +5,6 @@ jobs:
|
|||||||
name: Remote Python tests
|
name: Remote Python tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
CIRCLE_BRANCH: ${{ github.ref }}
|
|
||||||
CIRCLE_JOB: remote_tests_python
|
|
||||||
CIRCLE_BUILD_NUM: ${{ github.run_number }}
|
|
||||||
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -18,4 +15,4 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
SSH_KEY: ${{ secrets.SSH_KEY }}
|
SSH_KEY: ${{ secrets.SSH_KEY }}
|
||||||
- run: scripts/remote_tests_python.sh
|
- run: scripts/remote_tests_python.sh "deltachat-core/python/${{ github.ref }}/${{ github.run_number }}"
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
export CIRCLE_JOB=remote_tests_${1:?need to specify 'rust' or 'python'}
|
|
||||||
export CIRCLE_BUILD_NUM=$USER
|
|
||||||
export CIRCLE_BRANCH=`git branch | grep \* | cut -d ' ' -f2`
|
|
||||||
export CIRCLE_PROJECT_REPONAME=$(basename `git rev-parse --show-toplevel`)
|
|
||||||
|
|
||||||
time bash scripts/$CIRCLE_JOB.sh
|
JOB=${1:?need to specify 'rust' or 'python'}
|
||||||
|
BRANCH="$(git branch | grep \* | cut -d ' ' -f2)"
|
||||||
|
REPONAME="$(basename $(git rev-parse --show-toplevel))"
|
||||||
|
|
||||||
|
time bash "scripts/remote_tests_$JOB.sh" "$USER-$BRANCH-$REPONAME"
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export BRANCH=${CIRCLE_BRANCH:-master}
|
BUILD_ID=${1:?specify build ID}
|
||||||
export REPONAME=${CIRCLE_PROJECT_REPONAME:-deltachat-core-rust}
|
|
||||||
export SSHTARGET=${SSHTARGET-ci@b1.delta.chat}
|
|
||||||
|
|
||||||
export BUILDDIR=ci_builds/$REPONAME/$BRANCH/${CIRCLE_JOB:?jobname}/${CIRCLE_BUILD_NUM:?circle-build-number}
|
SSHTARGET=${SSHTARGET-ci@b1.delta.chat}
|
||||||
|
BUILDDIR=ci_builds/$BUILD_ID
|
||||||
|
|
||||||
echo "--- Copying files to $SSHTARGET:$BUILDDIR"
|
echo "--- Copying files to $SSHTARGET:$BUILDDIR"
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ rsync --delete --files-from=.rsynclist -az ./ "$SSHTARGET:$BUILDDIR"
|
|||||||
|
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
echo "--- Running $CIRCLE_JOB remotely"
|
echo "--- Running Python tests remotely"
|
||||||
|
|
||||||
ssh $SSHTARGET <<_HERE
|
ssh $SSHTARGET <<_HERE
|
||||||
set +x -e
|
set +x -e
|
||||||
|
|||||||
@@ -1,20 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export BRANCH=${CIRCLE_BRANCH:-master}
|
BUILD_ID=${1:?specify build ID}
|
||||||
export REPONAME=${CIRCLE_PROJECT_REPONAME:-deltachat-core-rust}
|
|
||||||
export SSHTARGET=${SSHTARGET-ci@b1.delta.chat}
|
|
||||||
|
|
||||||
export BUILDDIR=ci_builds/$REPONAME/$BRANCH/${CIRCLE_JOB:?jobname}/${CIRCLE_BUILD_NUM:?circle-build-number}
|
SSHTARGET=${SSHTARGET-ci@b1.delta.chat}
|
||||||
|
BUILDDIR=ci_builds/$BUILD_ID
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "--- Copying files to $SSHTARGET:$BUILDDIR"
|
echo "--- Copying files to $SSHTARGET:$BUILDDIR"
|
||||||
|
|
||||||
ssh -oBatchMode=yes -oStrictHostKeyChecking=no $SSHTARGET mkdir -p "$BUILDDIR"
|
ssh -oBatchMode=yes -oStrictHostKeyChecking=no $SSHTARGET mkdir -p "$BUILDDIR"
|
||||||
git ls-files >.rsynclist
|
git ls-files >.rsynclist
|
||||||
rsync --delete --files-from=.rsynclist -az ./ "$SSHTARGET:$BUILDDIR"
|
rsync --delete --files-from=.rsynclist -az ./ "$SSHTARGET:$BUILDDIR"
|
||||||
|
|
||||||
echo "--- Running $CIRCLE_JOB remotely"
|
echo "--- Running Rust tests remotely"
|
||||||
|
|
||||||
ssh $SSHTARGET <<_HERE
|
ssh $SSHTARGET <<_HERE
|
||||||
set +x -e
|
set +x -e
|
||||||
|
|||||||
Reference in New Issue
Block a user