Initial commit

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-08 17:47:05 +03:00
commit cca5cf6781
54 changed files with 28103 additions and 0 deletions

102
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,102 @@
stages:
- build
- test
- release
build:
image: reactnativecommunity/react-native-android
stage: build
cache:
key:
files:
- package-lock.json
paths:
- node_modules
policy: pull
before_script:
- npm install
- npm run postinstall
script:
- npm run build
compile:
image: reactnativecommunity/react-native-android
stage: build
cache:
key:
files:
- package-lock.json
paths:
- node_modules
policy: pull
before_script:
- npm install
- npm run postinstall
script:
- npm run compile
after_script:
- echo "JOB_ID=$CI_JOB_ID" >> job.env
artifacts:
paths:
- android/app/build/outputs/apk/release/app-release.apk
expire_in: 1d
reports:
dotenv: job.env
rules:
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
test:
image: reactnativecommunity/react-native-android
stage: test
cache:
key:
files:
- package-lock.json
paths:
- node_modules
policy: pull
before_script:
- npm install
- npm run postinstall
script:
- npm run test
lint:
image: reactnativecommunity/react-native-android
stage: test
cache:
key:
files:
- package-lock.json
paths:
- node_modules
policy: pull
before_script:
- npm install
- npm run postinstall
script:
- npm run lint
release:
image: registry.gitlab.com/gitlab-org/release-cli
stage: release
needs:
- job: compile
artifacts: true
script:
- echo "Create Release $CI_COMMIT_SHA"
release:
name: "Release $CI_COMMIT_SHORT_SHA"
tag_name: "$CI_COMMIT_SHORT_SHA"
ref: "$CI_COMMIT_SHORT_SHA"
description: "Release $CI_COMMIT_SHORT_SHA"
assets:
links:
- name: "app-release.apk"
url: "https://git.karaolidis.com/karaolidis/terminally-online/-/jobs/$JOB_ID/artifacts/raw/android/app/build/outputs/apk/release/app-release.apk"
rules:
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml