Cosmos-Server/.circleci/config.yml

151 lines
4.1 KiB
YAML
Raw Permalink Normal View History

2023-03-10 20:59:56 +00:00
version: 2
jobs:
2023-04-10 18:12:08 +00:00
build:
2023-03-10 21:03:20 +00:00
machine: # executor type
2023-08-11 09:46:22 +00:00
image: ubuntu-2204:2023.07.2
2023-03-10 20:59:56 +00:00
steps:
- checkout
2023-08-11 09:28:49 +00:00
- run:
2023-08-11 09:27:59 +00:00
name: Setup docker and buildx
command: docker buildx create --use
2023-08-11 09:26:53 +00:00
2023-03-10 21:03:20 +00:00
- run:
name: install dependencies
command: sudo apt-get install bash curl
2023-05-28 10:44:28 +00:00
- 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
2023-03-10 21:03:20 +00:00
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
2023-05-28 10:44:28 +00:00
- run:
name: Install dependencies
command: npm install
2023-03-12 18:17:28 +00:00
- 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"
2023-08-20 10:36:52 +00:00
- run:
name: Download and Extract ARM Nebula Binary
command: |
curl -LO https://github.com/slackhq/nebula/releases/download/v1.7.2/nebula-linux-arm64.tar.gz
tar -xzvf nebula-linux-arm64.tar.gz
- run:
name: Rename ARM Nebula Binary
command: |
mv nebula nebula-arm
2023-10-22 11:18:24 +00:00
mv nebula-cert nebula-arm-cert
2023-08-20 10:36:52 +00:00
- run:
name: Download and Extract Nebula Binary
command: |
curl -LO https://github.com/slackhq/nebula/releases/download/v1.7.2/nebula-linux-amd64.tar.gz
tar -xzvf nebula-linux-amd64.tar.gz
2023-05-28 10:44:28 +00:00
- run:
name: Build UI
command: npm run client-build
2023-03-10 20:59:56 +00:00
- run:
2023-03-25 20:15:00 +00:00
name: Build and publish dockerfiles
command: sh docker.sh
2023-03-10 20:59:56 +00:00
buildarm:
machine:
image: ubuntu-2004:202101-01
resource_class: arm.medium
steps:
- checkout
- run:
name: install dependencies
command: sudo apt-get install bash curl
2023-05-28 10:44:28 +00:00
- run:
name: download Go
command: wget https://golang.org/dl/go1.20.2.linux-arm64.tar.gz
- run:
name: install Go
command: sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.2.linux-arm64.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
2023-05-28 10:44:28 +00:00
- 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"
2023-05-28 10:44:28 +00:00
- run:
name: Build UI
command: npm run client-build
- run:
name: Build and publish dockerfiles
command: sh docker.arm64.sh
2023-03-10 20:59:56 +00:00
workflows:
version: 2
build-all:
jobs:
- build:
filters:
branches:
only:
- master
- unstable