@@ -77,136 +77,12 @@ pipeline {
7777 }
7878 }
7979
80- stage(" Build Docker Images" ) {
81- parallel {
82-
83- stage(" stanc3 multiarch" ) {
84- agent { label ' linux' }
85- when {
86- beforeAgent true
87- allOf {
88- expression { params. buildMultiarch }
89- }
90- }
91- steps{
92- script {
93- cleanCheckout()
94- }
95- sh """
96- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
97- docker buildx create --name stanc3_builder || true
98- docker buildx use stanc3_builder
99- docker buildx inspect --bootstrap
100- echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin
101- cd docker/stanc3/multiarch
102- docker buildx build -t stanorg/stanc3:$multiArchTag --build-arg STANC3_BRANCH=${ params.stanc3_branch} --build-arg STANC3_ORG=${ params.stanc3_org} --platform linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/mips64le,linux/s390x --push .
103- """
104- }
105- }
106-
107- stage(" stanc3 static" ) {
108- agent { label ' linux' }
109- when {
110- beforeAgent true
111- allOf {
112- expression { params. buildStatic }
113- }
114- }
115- steps{
116- script {
117- cleanCheckout()
118- }
119- sh """
120- git clone https://github.com/$stanc3_org /stanc3.git
121- cd stanc3
122- git checkout $stanc3_branch
123- echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin
124- docker build -t stanorg/stanc3:$staticTag -f ../docker/stanc3/static/Dockerfile .
125- docker push stanorg/stanc3:$staticTag
126- """
127- }
128- }
129-
130- stage(" stanc3 debian" ) {
131- agent { label ' linux' }
132- when {
133- beforeAgent true
134- allOf {
135- expression { params. buildDebian }
136- }
137- }
138- steps{
139- script {
140- cleanCheckout()
141- }
142- sh """
143- git clone https://github.com/$stanc3_org /stanc3.git
144- cd stanc3
145- git checkout $stanc3_branch
146- echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin
147- docker build -t stanorg/stanc3:$debianTag -f ../docker/stanc3/debian/Dockerfile .
148- docker push stanorg/stanc3:$debianTag
149- """
150- }
151- }
152-
153- stage(" stanc3 debian-windows" ) {
154- agent { label ' linux' }
155- when {
156- beforeAgent true
157- allOf {
158- expression { params. buildDebian }
159- }
160- }
161- steps{
162- script {
163- cleanCheckout()
164- }
165- sh """
166- git clone https://github.com/$stanc3_org /stanc3.git
167- cd stanc3
168- git checkout $stanc3_branch
169- echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin
170- docker build -t stanorg/stanc3:$debianWindowsTag -f ../docker/stanc3/debian-windows/Dockerfile .
171- docker push stanorg/stanc3:$debianWindowsTag
172- """
173- }
174- }
175-
176- }
177- }
178-
179- stage(" update DockerHub main tags" ) {
180- agent { label ' linux' }
181- when {
182- beforeAgent true
183- expression { params. replaceMainTags }
184- }
185- steps{
186- sh """
187- echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin
188-
189- docker tag stanorg/stanc3:multiarch stanorg/stanc3:$multiArchTag
190- docker push stanorg/stanc3:multiarch
191-
192- docker tag stanorg/stanc3:static stanorg/stanc3:$staticTag
193- docker push stanorg/stanc3:static
194-
195- docker tag stanorg/stanc3:debian stanorg/stanc3:$debianTag
196- docker push stanorg/stanc3:debian
197-
198- docker tag stanorg/stanc3:debian-windows stanorg/stanc3:$debianWindowsTag
199- docker push stanorg/stanc3:debian-windows
200- """
201- }
202- }
203-
20480 stage(" Build docker image" ) {
20581 agent { label ' linux && triqs' }
20682 environment { DOCKER_TOKEN = credentials(' aada4f7b-baa9-49cf-ac97-5490620fce8a' ) }
20783 when {
20884 beforeAgent true
209- expression {
85+ expression {
21086 params. docs_docker_image_tag != " "
21187 }
21288 }
0 commit comments