[release] v 0.3.4 - fix arm (trying smtg else)
This commit is contained in:
parent
2bcc488f23
commit
7ca2a793e3
|
@ -58,6 +58,65 @@ jobs:
|
|||
name: Build and publish dockerfiles
|
||||
command: sh docker.sh
|
||||
|
||||
buildarm:
|
||||
machine: # executor type
|
||||
image: ubuntu-2004:202010-01 # # recommended linux image - includes Ubuntu 20.04, docker 19.03.13, docker-compose 1.27.4
|
||||
resource_class: arm.medium
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run:
|
||||
name: install dependencies
|
||||
command: sudo apt-get install bash curl
|
||||
|
||||
- run:
|
||||
name: download Go
|
||||
command: wget https://golang.org/dl/go1.20.2.linux-amd64.tar.gz
|
||||
|
||||
- run:
|
||||
name: install Go
|
||||
command: sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
|
||||
|
||||
- run:
|
||||
name: set Go path
|
||||
command: echo 'export PATH=$PATH:/usr/local/go/bin' >> $BASH_ENV
|
||||
|
||||
- run: |
|
||||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
|
||||
echo ' [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
|
||||
|
||||
- run: |
|
||||
node -v
|
||||
|
||||
- run: |
|
||||
nvm install v16
|
||||
node -v
|
||||
nvm alias default v16
|
||||
|
||||
- run: |
|
||||
node -v
|
||||
|
||||
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: npm install
|
||||
|
||||
- run:
|
||||
name: Download GeoLite2-Country database
|
||||
command: |
|
||||
curl -s -L "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=$MAX_TOKEN&suffix=tar.gz" -o GeoLite2-Country.tar.gz
|
||||
tar -xzf GeoLite2-Country.tar.gz --strip-components 1 --wildcards "*.mmdb"
|
||||
|
||||
- run:
|
||||
name: Build UI
|
||||
command: npm run client-build
|
||||
|
||||
- run:
|
||||
name: Build and publish dockerfiles
|
||||
command: sh docker arm.sh
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-all:
|
||||
|
@ -68,3 +127,9 @@ workflows:
|
|||
only:
|
||||
- master
|
||||
- unstable
|
||||
- buildarm:
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- unstable
|
25
docker arm.sh
Normal file
25
docker arm.sh
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=$(npm pkg get version | tr -d \")
|
||||
LATEST="latest"
|
||||
|
||||
# if branch is unstable in git for circle ci
|
||||
if [ -n "$CIRCLE_BRANCH" ]; then
|
||||
if [ "$CIRCLE_BRANCH" != "master" ]; then
|
||||
LATEST="$LATEST-$CIRCLE_BRANCH"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Pushing azukaar/cosmos-server:$VERSION and azukaar/cosmos-server:$LATEST"
|
||||
|
||||
sh build arm64.sh
|
||||
|
||||
docker build \
|
||||
-t azukaar/cosmos-server:$VERSION-arm64 \
|
||||
-t azukaar/cosmos-server:$LATEST-arm64 \
|
||||
-f dockerfile.arm64 \
|
||||
--platform linux/arm64 \
|
||||
.
|
||||
|
||||
docker push azukaar/cosmos-server:$VERSION-arm64
|
||||
docker push azukaar/cosmos-server:$LATEST-arm64
|
11
docker.sh
11
docker.sh
|
@ -19,16 +19,5 @@ docker build \
|
|||
-t azukaar/cosmos-server:$LATEST \
|
||||
.
|
||||
|
||||
sh build arm64.sh
|
||||
|
||||
docker build \
|
||||
-t azukaar/cosmos-server:$VERSION-arm64 \
|
||||
-t azukaar/cosmos-server:$LATEST-arm64 \
|
||||
-f dockerfile.arm64 \
|
||||
--platform linux/arm64 \
|
||||
.
|
||||
|
||||
docker push azukaar/cosmos-server:$VERSION
|
||||
docker push azukaar/cosmos-server:$LATEST
|
||||
docker push azukaar/cosmos-server:$VERSION-arm64
|
||||
docker push azukaar/cosmos-server:$LATEST-arm64
|
Loading…
Reference in a new issue