Skip to content

Commit 4721a39

Browse files
committed
Auto-generating pipelines for editors/assets
1 parent 2cc0a61 commit 4721a39

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.gitlab-ci.yml

+16
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,22 @@ test:php:modules:
9595
tags:
9696
- docker
9797

98+
deployEditorsBundle:
99+
image: node:8.6.0
100+
stage: deploy
101+
script:
102+
- bash ci/deploy-editors-bundle.sh
103+
tags:
104+
- docker
105+
106+
deployAssetsBundle:
107+
image: node:8.6.0
108+
stage: deploy
109+
script:
110+
- bash ci/deploy-assets-bundle.sh
111+
tags:
112+
- docker
113+
98114
deploying:
99115
image: wpbakery/ci-wordpress-npm
100116
stage: deploy

ci/deploy-assets-bundle.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
output=$(git log --name-only HEAD~1..HEAD public/sources/assetsLibrary)
4+
5+
if [ -z "$output" ]
6+
then
7+
exit 0
8+
else
9+
echo "curl -X GET -H 'Content-type: application/json' \"$CI_HUB_GROUP_TEST_DOMAIN/api/inner/bundle/create?key=$CI_HUB_GROUP_ELEMENTS_BUILD_KEY&bundle=assets&version=latest&name=Assets\""
10+
curl -X GET -H 'Content-type: application/json' "$CI_HUB_GROUP_TEST_DOMAIN/api/inner/bundle/create?key=$CI_HUB_GROUP_ELEMENTS_BUILD_KEY&bundle=assets&version=latest&name=Assets"
11+
fi

ci/deploy-editors-bundle.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
output=$(git log --name-only HEAD~1..HEAD public/editor public/sources/attributes public/sources/css public/sources/fonts public/sources/images public/sources/less)
4+
5+
if [ -z "$output" ]
6+
then
7+
exit 0
8+
else
9+
echo "curl -X GET -H 'Content-type: application/json' \"$CI_HUB_GROUP_TEST_DOMAIN/api/inner/bundle/create?key=$CI_HUB_GROUP_ELEMENTS_BUILD_KEY&bundle=editors/editors&version=latest&name=Editors\""
10+
curl -X GET -H 'Content-type: application/json' "$CI_HUB_GROUP_TEST_DOMAIN/api/inner/bundle/create?key=$CI_HUB_GROUP_ELEMENTS_BUILD_KEY&bundle=editors/editors&version=latest&name=Editors"
11+
fi

0 commit comments

Comments
 (0)