-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (38 loc) · 1.59 KB
/
anyway.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
name: anyway CI
on:
push:
paths:
- '.github/workflows/anyway.yml'
- 'apps/anyway/**'
workflow_dispatch:
jobs:
anyway:
runs-on: ubuntu-22.04
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VAULT_CLI_VERSION: "1.10.4"
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
# python3 vault/create_policy.py readonly
# python3 vault/create_approle.py terraform_readonly readonly
VAULT_ROLE_ID: ${{ secrets.VAULT_ROLE_ID }}
VAULT_SECRET_ID: ${{ secrets.VAULT_SECRET_ID }}
CI: "true"
run: |
echo "Step 1: Installing CI tools" &&\
curl -s https://raw.githubusercontent.com/OriHoch/uumpa-ci-toolbox/65a0704332e63d51f63981dbb25cd83682dc4078/bin/github_actions_install.sh \
| bash -s 4ed9d7055f0aa9629de1291fe0f42e154709b0b6 OriHoch/uumpa-ci-toolbox &&\
echo "Step 2: Self-checkout" &&\
uci github actions self-checkout --config-user-name "dfc-iac-anyway-ci" &&\
echo "Step 3: Installing Vault CLI" &&\
uci vault install --version $VAULT_CLI_VERSION &&\
echo "Step 4: Installing Python dependencies" &&\
pip install -r requirements.txt &&\
echo "Step 5: Logging in to Vault" &&\
export VAULT_TOKEN="$(uci vault approle-login $VAULT_ROLE_ID $VAULT_SECRET_ID)" &&\
#echo "Step 6: Creating Selenium data folder" &&\
#bin/apps.py create_selenium_data_folder &&\
echo "Step 7: Deploying app" &&\
bin/apps.py deploy_app anyway &&\
echo "Step 8: Checking Docker Compose status" &&\
bin/apps.py compose anyway ps