forked from apache/kvrocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (75 loc) · 4.42 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
language: cpp
os: linux
dist: focal
services:
- docker
jobs:
include:
- stage: build
arch: amd64
script:
- |
set -ex
export TZ=Asia/Shanghai
IMAGE_NAME="kvrocks/kvrocks"
IMAGE_TAG="nightly-$(date -d @$(git show -s --format=%ct $TRAVIS_COMMIT) "+%Y%m%d")-${TRAVIS_COMMIT:0:7}-$TRAVIS_CPU_ARCH"
echo building $IMAGE_NAME:$IMAGE_TAG
docker build -t $IMAGE_NAME:$IMAGE_TAG .
if [[ "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_BRANCH" == "unstable" ]]; then
echo pushing $IMAGE_NAME:$IMAGE_TAG
docker login -u $DOCKERHUB_USER -p $DOCKERHUB_TOKEN
docker push $IMAGE_NAME:$IMAGE_TAG
docker logout
fi
- arch: arm64
script:
- |
set -ex
export TZ=Asia/Shanghai
IMAGE_NAME="kvrocks/kvrocks"
IMAGE_TAG="nightly-$(date -d @$(git show -s --format=%ct $TRAVIS_COMMIT) "+%Y%m%d")-${TRAVIS_COMMIT:0:7}-$TRAVIS_CPU_ARCH"
echo building $IMAGE_NAME:$IMAGE_TAG
docker build -t $IMAGE_NAME:$IMAGE_TAG .
if [[ "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_BRANCH" == "unstable" ]]; then
echo pushing $IMAGE_NAME:$IMAGE_TAG
docker login -u $DOCKERHUB_USER -p $DOCKERHUB_TOKEN
docker push $IMAGE_NAME:$IMAGE_TAG
docker logout
fi
- stage: push
script:
- |
set -ex
export TZ=Asia/Shanghai
if [[ "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_BRANCH" == "unstable" ]]; then
IMAGE_NAME="kvrocks/kvrocks"
IMAGE_TAG="nightly-$(date -d @$(git show -s --format=%ct $TRAVIS_COMMIT) "+%Y%m%d")-${TRAVIS_COMMIT:0:7}"
echo pushing $IMAGE_NAME:$IMAGE_TAG
docker login -u $DOCKERHUB_USER -p $DOCKERHUB_TOKEN
docker manifest create $IMAGE_NAME:$IMAGE_TAG --amend $IMAGE_NAME:$IMAGE_TAG-amd64 --amend $IMAGE_NAME:$IMAGE_TAG-arm64
docker manifest inspect $IMAGE_NAME:$IMAGE_TAG
docker manifest push $IMAGE_NAME:$IMAGE_TAG
docker manifest create $IMAGE_NAME:nightly --amend $IMAGE_NAME:$IMAGE_TAG-amd64 --amend $IMAGE_NAME:$IMAGE_TAG-arm64
docker manifest push $IMAGE_NAME:nightly
docker logout
fi
env:
global:
- secure: a3Arhq40+YpulNRwAUAHTMwfKuc6kJqPFkP/2fex5UwkkGeeeBTmOTT9Y4BSXr1z2SAjS6HGSZ3fzC+2uz0JDX67F9Ssk8XzJiXlPkqu/xcQI+YVHxnW+xBCAdcJ/zO/vcPOzIh2fvUOzQRC0JDDYtmVFNdI0XnYf5thtcZBZGobVS3D2yXW8BsFMeH0mWeYzhWFdzt8tcQUU+abPWKrAZljNFk93Nxal5xadtYrMkM4C4OsGqeLz96HOObU9jcnFJVokLP4zUxt+uohLd2RIeec4E/IhJE0DCtvxdN/pF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