11image : nativecode/node-build:latest
22
33stages :
4- - build
4+ - prepare
5+ - publish
56
67services :
78 - nativecode/node-build:latest
@@ -12,39 +13,30 @@ before_script:
1213 - .citools/setup-git ${BUILD_REPO_BRANCH} ${BUILD_REPO_GIT} ${BUILD_REPO_EMAIL}
1314 - .citools/setup-ssh ${BUILD_REPO_DOMAIN} ${BUILD_REPO_SSHKEY_PATH} ${BUILD_REPO_DOMAIN_SSH}
1415
15- release :
16- stage : build
16+ prepare :
17+ stage : prepare
1718 only :
19+ - develop
1820 - master
21+ script :
22+ - npm ci
23+ - source .ci-env.sh
24+ - npm run build
25+ - npx semantic-release
26+
27+ release :
28+ stage : publish
29+ only :
30+ - tags
1931 script :
2032 - PACKAGE_VERSION=v$(cat package.json | jq -r '.version')
2133 - docker build --rm -t nativecode/plexify . || exit 1
22- - docker tag nativecode/plexify nativecode/plexify:$PACKAGE_VERSION || exit 1
23- - docker push nativecode/plexify:$PACKAGE_VERSION || exit 1
34+ - docker tag nativecode/plexify nativecode/plexify:${PACKAGE_VERSION} || exit 1
2435 - docker tag nativecode/plexify nativecode/plexify:latest || exit 1
36+ - docker push nativecode/plexify:${PACKAGE_VERSION} || exit 1
2537 - docker push nativecode/plexify:latest || exit 1
26- - git tag ${PACKAGE_VERSION}
27- - git push --tags
2838 variables :
29- DOCKER_HOST : tcp://localhost:2375
30- GIT_SUBMODULE_STRATEGY : recursive
3139 DOCKER_DRIVER : overlay2
32- DOCKER_TLS_CERTDIR : " "
33-
34- prerelease :
35- stage : build
36- only :
37- - develop
38- script :
39- - docker build --rm -t nativecode/plexify . || exit 1
40- - docker tag nativecode/plexify nativecode/plexify:next-${CI_COMMIT_SHA:0:8} || exit 1
41- - docker push nativecode/plexify:next-${CI_COMMIT_SHA:0:8} || exit 1
42- - docker tag nativecode/plexify nativecode/plexify:next || exit 1
43- - docker push nativecode/plexify:next || exit 1
44- - git tag ${CI_COMMIT_SHA:0:8}
45- - git push --tags
46- variables :
4740 DOCKER_HOST : tcp://localhost:2375
48- GIT_SUBMODULE_STRATEGY : recursive
49- DOCKER_DRIVER : overlay2
5041 DOCKER_TLS_CERTDIR : " "
42+ GIT_SUBMODULE_STRATEGY : recursive
0 commit comments