This seems like the same exact issue as Build/workflow not triggered when tag is pushed that was solved. I’m not able to see what I’m doing different than the solution.
With the following set up I cannot get the job to build no matter what the tag is or the regex.
job:
filters:
tags:
only: <regex>
branches:
ignore: /.*/
When I give a tag for instance 0.0.1-Tquinla92TypescriptReduxUtils, 0.0.1-developerHubHeadless, or 0.0.1-Tquinlan92MaterialCoreUi none of the corresponding jobs (Tquinla92TypescriptReduxUtils, developerHubHeadless, Tquinlan92MaterialCoreUi) run.
My goal is to only run those jobs when the tag matches the regex and it’s on the master build. I’m hoping the if statements I have set up in the jobs will check the branch correctly as it seems like it’s not possible to do via the filters based on what I’ve read. Though I’ve seen numerous people run into the problem I’m having now using a different regex, but I’ve checked my simple regex through a regex testers and those tags should match the filters
Here’s my config
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
defaults: &defaults
docker:
- image: circleci/node:8
jobs:
build:
<<: *defaults
steps:
- checkout
- run: sudo npm i -g npm
- run: cd developer-hub-ui && npm ci && npm run build
- run: cd tquinlan92-material-core-ui && npm ci && npm run build && npm test
- run: cd tquinlan92-material-core-ui-demo && npm ci && npm run build && npm test
deployTquinla92TypescriptReduxUtils:
<<: *defaults
steps:
- checkout
- run:
name: Publish tquinlan92-typescript-redux-utils
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > tquinlan92-material-core-ui/.npmrc
cd tquinlan92-typescript-redux-utils && npm publish
fi
deployDeveloperHubHeadless:
<<: *defaults
steps:
- checkout
- run:
name: Publish developer-hub-headless
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > tquinlan92-material-core-ui/.npmrc
cd developer-hub-headless && npm publish
fi
deployTquinlan92MaterialCoreUi:
<<: *defaults
steps:
- checkout
- run:
name: Publish tquinlan92-material-core-ui
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > tquinlan92-material-core-ui/.npmrc
cd tquinlan92-material-core-ui && npm publish
fi
workflows:
version: 2
build_and_deploy:
jobs:
- build:
filters:
tags:
only: /.*/
- deployTquinla92TypescriptReduxUtils:
requires:
- build
filters:
tags:
only: /-Tquinla92TypescriptReduxUtils$/
branches:
ignore: /.*/
- deployDeveloperHubHeadless:
requires:
- build
filters:
tags:
only: /-developerHubHeadless$/
branches:
ignore: /.*/
- deployTquinlan92MaterialCoreUi:
requires:
- build
filters:
tags:
only: /-Tquinlan92MaterialCoreUi$/
branches:
ignore: /.*/
With the above set up if I do a tag of 0.0.1-Tquinla92TypescriptReduxUtils, 0.0.1-developerHubHeadless, or 0.0.1-Tquinlan92MaterialCoreUi none of the deploy jobs run still. I would hope tagging a master commit as 0.0.1-Tquinla92TypescriptReduxUtils
would trigger the deployTquinla92TypescriptReduxUtils
job