-
Notifications
You must be signed in to change notification settings - Fork 3
155 lines (129 loc) · 4.51 KB
/
release.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Production Build
on:
push:
# Publish semver tags as releases.
tags: [ 'release/*' ]
jobs:
consumer-gateway:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build consumer_gateway
run: |
ls -la
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh)
cd consumer_gateway
ARGS='--no-cache' exec bash build_production.sh
- name: Push consumer_gateway
run: |
ls -la
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh)
cd consumer_gateway
ARGS='--no-cache' exec bash push_production.sh
skipper-proxy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build skipper_proxy
run: |
ls -la
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh)
cd skipper_proxy
ARGS='--no-cache' exec bash build_production.sh
- name: Push skipper_proxy
run: |
ls -la
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh)
cd skipper_proxy
ARGS='--no-cache' exec bash push_production.sh
skipper:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Print environment variables
run: |
printenv
# build this here (without pushing, so the integration tests work)
- name: Build skipper_proxy
run: |
ls -la
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh)
cd skipper_proxy
ARGS='--no-cache' exec bash build_production.sh
- name: Setup Devenv
run: |
bash setup_devenv.sh
- name: "Run Setup for CI"
run: |
cd skipper
exec python3 build.py setup
- name: "Build Skipper"
run: |
export SKIPPER_DOCKER_IMAGE="ghcr.io/neuroforgede/nfcompose-skipper:2.1.0-beta"
export SKIPPER_PROXY_DOCKER_IMAGE="ghcr.io/neuroforgede/nfcompose-skipper-proxy:2.1.0-beta"
cd skipper
exec python3 build.py \
build \
--imageName ghcr.io/neuroforgede/nfcompose-skipper \
--buildBase
- name: "Run client Tests"
run: |
export NFCOMPOSE_SETUP_SKIP_PULL="yes"
export COMPOSE_PROJECT_NAME="ci_test_unit_tests"
export SKIPPER_DOCKER_IMAGE="ghcr.io/neuroforgede/nfcompose-skipper:2.1.0-beta"
export SKIPPER_PROXY_DOCKER_IMAGE="ghcr.io/neuroforgede/nfcompose-skipper-proxy:2.1.0-beta"
cd client
bash ci_test.sh || exit 1
- name: Push skipper_proxy
run: |
ls -la
export BUILD_NF_COMPOSE_DOCKER_TAG=$(bash version.sh)
cd skipper_proxy
ARGS='--no-cache' exec bash push_production.sh
- name: "Build client source release"
run: |
cd client
python3 -m venv venv
source venv/bin/activate
(bash install_dev_dependencies.sh && python3 setup.py sdist) || exit 1
mv dist/compose_client-2.1.0*.tar.gz dist/compose_client-2.1.0-beta.tar.gz
- name: "zip deploy/local folder"
run: |
cd deploy/local
zip -r deploy-local-2.1.0-beta.zip ./
- name: "zip deploy/production folder"
run: |
cd deploy/production/docker-compose
zip -r deploy-production-docker-compose-2.1.0-beta.zip ./
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./client/dist/compose_client-2.1.0-beta.tar.gz
deploy/local/deploy-local-2.1.0-beta.zip
deploy/production/docker-compose/deploy-production-docker-compose-2.1.0-beta.zip