6
6
- dev
7
7
tags :
8
8
- ' *'
9
+
9
10
env :
10
11
debian_version : debian8
11
12
@@ -14,31 +15,24 @@ jobs:
14
15
15
16
runs-on : ubuntu-latest
16
17
17
- container :
18
- image : navitia/${{env.debian_version}}_dev
19
- volumes :
20
- # Mount so we can delete files from docker and free up space (>20GB)
21
- - /usr/share/dotnet:/usr/share/dotnet
22
- - /usr/local/lib/android:/usr/local/lib/android
23
-
24
-
25
18
steps :
26
19
- name : Free up space
27
20
run : |
28
- rm -rf /usr/share/dotnet/*
29
- rm -rf /usr/local/lib/android/*
21
+ sudo rm -rf /usr/share/dotnet/*
22
+ sudo rm -rf /usr/local/lib/android/*
30
23
echo "Free space:"
31
24
df -h
32
25
33
26
- name : Install dependencies
34
27
run : |
35
- apt update && apt install -y --force-yes zip httpie dh-python
28
+ sudo apt update && sudo apt install -y --force-yes zip httpie
36
29
37
30
- name : Checkout core_team_ci_tools
38
31
uses : actions/checkout@v3
39
32
with :
40
- path : core_team_ci_tools
41
33
repository : ' hove-io/core_team_ci_tools'
34
+ path : core_team_ci_tools
35
+ token : ${{ secrets.access_token_github }}
42
36
43
37
- name : Setup core_team_ci_tools python environment
44
38
run : |
51
45
-o hove-io \
52
46
-r mimirsbrunn \
53
47
-t ${{secrets.access_token_github}} \
54
- -w release .yml \
48
+ -w release7 .yml \
55
49
-a $mimirsbrunn_package \
56
50
--output-dir .
57
51
unzip -qo $mimirsbrunn_package
@@ -74,36 +68,38 @@ jobs:
74
68
run : |
75
69
wget http://prdownloads.sourceforge.net/libkeepalive/libkeepalive-0.3.tar.gz
76
70
77
- - name : Restore ccache
78
- uses :
hendrikmuhs/[email protected]
79
- with :
80
- key : ${{env.debian_version}-package
81
- max-size : 2000M
82
- save : ${{ github.event_name == 'push' }}
83
-
84
71
- name : Checkout navitia
85
72
uses : actions/checkout@v3
86
73
with :
87
74
submodules : recursive
88
75
path : navitia
89
76
fetch-depth : 0
90
77
91
- - name : Build navitia packages
92
- working-directory : navitia
93
- # Will build navitia-*.deb packages in folder ../
78
+ - name : Restore ccache
79
+ uses :
hendrikmuhs/[email protected]
80
+ with :
81
+ key : build_dockers
82
+ max-size : 2000M
83
+
84
+ - name : Create master docker
94
85
run : |
95
- DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b
86
+ docker build -f navitia/docker/${{env.debian_version}}/Dockerfile-master -t navitia/master .
87
+
88
+ - name : Build packages in master docker
89
+ # Will build navitia-*.deb packages in current folder
90
+ run : |
91
+ docker run -v `pwd`:/build/ -w /navitia/ navitia/master
96
92
97
93
98
94
# see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
99
- - name : Choose dev navitia tag
95
+ - name : Choose dev tag
100
96
if : github.event_name == 'push' && github.ref == 'refs/heads/dev'
101
97
run : |
102
98
echo "building version dev"
103
99
echo "navitia_tag=dev" >> $GITHUB_ENV
104
100
echo "aws_branch=dev" >> $GITHUB_ENV
105
101
106
- - name : Choose release navitia tag
102
+ - name : Choose release tag
107
103
if : startsWith(github.ref, 'refs/tags/')
108
104
run : |
109
105
cd navitia
@@ -114,15 +110,13 @@ jobs:
114
110
115
111
- name : Create dockers images and push them
116
112
run : |
117
- docker build -f navitia/docker/${{env.debian_version}}/Dockerfile-master -t navitia/master .
118
-
119
113
components='jormungandr kraken tyr-beat tyr-worker tyr-web instances-configurator mock-kraken eitri'
120
114
for component in $components; do
121
115
echo "********* Building $component ***************"
122
116
docker build -t navitia/$component:${{env.navitia_tag}} -f navitia/docker/${{env.debian_version}}/Dockerfile-${component} .
123
117
124
- # add latest tag if navitia_tag != dev
125
- if [[ "${{env.navitia_tag }}" ! = "dev " ]]; then
118
+ # add latest tag if we are making a release
119
+ if [[ "${{env.aws_branch }}" = "release " ]]; then
126
120
docker tag navitia/$component:${{env.navitia_tag}} navitia/$component:latest
127
121
fi
128
122
done
@@ -173,4 +167,4 @@ jobs:
173
167
- name : success notification on navitia core team
174
168
if : success()
175
169
run : |
176
- echo '{"text":":octopus: Github Actions: build_dockers succeeded. New navitia ${{env.navitia_tag}} image available.' | http --json POST ${{secrets.SLACK_NAVITIA_CORE_TEAM_URL}}
170
+ echo '{"text":":octopus: Github Actions: build_dockers succeeded. New navitia ${{env.navitia_tag}} images available.' | http --json POST ${{secrets.SLACK_NAVITIA_CORE_TEAM_URL}}
0 commit comments