Skip to content

Commit 29d8df5

Browse files
authored
Push images on self hosted machine (#2799)
* push images on self hosted machine * update * update * update * update * test install.sh * fix go mirrors * clean up * add clean up * update clean up script
1 parent fe9da69 commit 29d8df5

File tree

3 files changed

+33
-15
lines changed

3 files changed

+33
-15
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ jobs:
8181
source build/env/bin/activate
8282
bash scripts/test/workflow.sh
8383
# bash scripts/travis/upload_codecov.sh
84-
push:
85-
runs-on: ubuntu-latest
84+
push-images:
85+
runs-on: [self-hosted, linux]
8686
needs: [test-mysql, test-hive-java, test-workflow]
8787
steps:
88-
- uses: actions/checkout@v2
88+
- uses: actions/checkout@v1
8989
- uses: olegtarasov/get-tag@v2
9090
id: tagName
9191
- if: ${{ github.event_name == 'schedule' }}
@@ -96,16 +96,6 @@ jobs:
9696
run: echo "::set-env name=TRAVIS_BRANCH::${{ github.head_ref }}"
9797
- if: ${{ github.event_name == 'push' }}
9898
run: echo "::set-env name=TRAVIS_BRANCH::${GITHUB_REF##*/}"
99-
- name: release latest linux client binary
100-
env:
101-
TRAVIS_OS_NAME: linux
102-
QINIU_AK: ${{ secrets.QINIU_AK }}
103-
QINIU_SK: ${{ secrets.QINIU_SK }}
104-
run: |
105-
export TRAVIS_BUILD_DIR=${{ github.workspace }}
106-
export TRAVIS_TAG=${{ steps.tagName.outputs.tag }}
107-
export TRAVIS_PULL_REQUEST=${{ github.event.number }}
108-
bash scripts/travis/deploy_client.sh
10999
- name: push server images
110100
env:
111101
DOCKER_USERNAME: "typhoon1986"
@@ -119,6 +109,31 @@ jobs:
119109
export FIND_FASTED_MIRROR=false
120110
export TRAVIS_BUILD_STAGE_NAME=Deploy
121111
bash scripts/travis/deploy_docker.sh
112+
linux-client:
113+
runs-on: ubuntu-latest
114+
needs: [test-mysql, test-hive-java, test-workflow]
115+
steps:
116+
- uses: actions/checkout@v2
117+
- uses: olegtarasov/get-tag@v2
118+
id: tagName
119+
- if: ${{ github.event_name == 'schedule' }}
120+
run: |
121+
echo "::set-env name=TRAVIS_EVENT_TYPE::cron"
122+
echo "::set-env name=TRAVIS_BRANCH::${GITHUB_REF##*/}"
123+
- if: ${{ github.event_name == 'pull_request' }}
124+
run: echo "::set-env name=TRAVIS_BRANCH::${{ github.head_ref }}"
125+
- if: ${{ github.event_name == 'push' }}
126+
run: echo "::set-env name=TRAVIS_BRANCH::${GITHUB_REF##*/}"
127+
- name: release latest linux client binary
128+
env:
129+
TRAVIS_OS_NAME: linux
130+
QINIU_AK: ${{ secrets.QINIU_AK }}
131+
QINIU_SK: ${{ secrets.QINIU_SK }}
132+
run: |
133+
export TRAVIS_BUILD_DIR=${{ github.workspace }}
134+
export TRAVIS_TAG=${{ steps.tagName.outputs.tag }}
135+
export TRAVIS_PULL_REQUEST=${{ github.event.number }}
136+
bash scripts/travis/deploy_client.sh
122137
# TODO(typhoonzero): remove travis envs when we have moved to github actions completely
123138
macos-client:
124139
runs-on: macos-latest

docker/dev/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
set -e
16+
set -ex
1717

1818
if [ "$FIND_FASTED_MIRROR" == "true" ]; then
1919
# shellcheck disable=SC1091
@@ -74,7 +74,7 @@ rm -rf "$HOME"/.cache/pip/*
7474

7575

7676
echo "Install Go compiler ..."
77-
GO_MIRROR_0="http://mirrors.ustc.edu.cn/golang/go1.13.4.linux-amd64.tar.gz"
77+
GO_MIRROR_0="https://studygolang.com/dl/golang/go1.13.4.linux-amd64.tar.gz"
7878
GO_MIRROR_1="https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz"
7979
axel --quiet --output go.tar.gz $GO_MIRROR_0 $GO_MIRROR_1
8080
tar -C /usr/local -xzf go.tar.gz

scripts/travis/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,6 @@ build_sqlflow_image mysql
7070
build_sqlflow_image jupyter
7171
build_sqlflow_image step
7272
build_sqlflow_image modelzooserver
73+
74+
echo "Clean up root permission $TRAVIS_BUILD_DIR/build ..."
75+
docker run --rm -v "$TRAVIS_BUILD_DIR":/work sqlflow:ci rm -rf /work/build /work/java /work/python

0 commit comments

Comments
 (0)