| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- stages:
- - build
- - deploy
- variables:
- GIT_SSL_NO_VERIFY: 'true'
- GIT_STRATEGY: clone
- #############
- # Build App #
- #############
- build:
- stage: build
- when: manual
- image: ubuntu:latest
- artifacts:
- expire_in: 1 day
- paths:
- - aktivisda-core/dist
- variables:
- PUBLIC_PATH: $ROOT_URL
- script:
- - echo "building app for any push on any branch or for release tags..."
- - apt-get update
- - apt-get install -y software-properties-common
- - add-apt-repository ppa:inkscape.dev/stable
- - apt install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
- - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- - sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- - apt-get update
- - apt-get install -y google-chrome-stable
- - apt-get install -y git
- - apt-get install -y nodejs
- - apt-get install -y npm
- - git clone --depth 1 https://framagit.org/aktivisda/aktivisda.git -b $(python3 -c "import json; x = json.load(open('local/localconfig.json', 'r')); print(x['aktivisda']['ref'] if 'aktivisda' in x else 'main')") aktivisda-core
- - npm install
- - npm run build:aktivisda
- - npm run build:backtivisda
- only:
- - main
- tags:
- - docker
- - localhost
- ##########
- # Deploy #
- ##########
- deploy-server:
- stage: deploy
- image: debian:10
- before_script:
- script:
- - apt-get update
- - apt-get install -y lftp
- - lftp -e "set ssl:verify-certificate no;set sftp:auto-confirm yes;open sftp://$FTP_HOST -p $FTP_PORT; user $FTP_USER $FTP_PASSWORD; mirror --reverse --verbose --delete aktivisda-core/dist/aktivisda $REMOTE_DIR;exit"
- - lftp -e "set ssl:verify-certificate no;set sftp:auto-confirm yes;open sftp://$FTP_HOST -p $FTP_PORT; user $FTP_USER $FTP_PASSWORD; mirror --reverse --verbose --delete aktivisda-core/dist/backtivisda $REMOTE_DIR/backtivisda;exit"
- only:
- - main
- when: manual
- tags:
- - docker
- needs: ['build']
- dependencies: ['build']
|