You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build specific app on tag push:
stage: buildimage: gperdomor/nx-kaniko:18.12.0-alpinevariables:
# Nx ContainerINPUT_PUSH: 'true'# To push your image to the registryINPUT_ENGINE: 'kaniko'# Override the engine to use for building the imagebefore_script:
- npm i -f
- NX_HEAD=$CI_COMMIT_SHA
- NX_BASE=${CI_COMMIT_BEFORE_SHA}# Login to registry
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.jsonscript:
# Extract the module name from the tag : "platform/app-name/v1.0.0" => "app-name"
- MODULE_NAME=$(echo $CI_COMMIT_TAG | cut -d'/' -f2)
- MODULE_VERSION=$(echo $CI_COMMIT_TAG | cut -d'/' -f3)
- echo "Building $MODULE_NAME..."
- echo INPUT_TAGS="type=schedule\ntype=ref,event=branch\ntype=ref,event=pr\ntype=sha,prefix=sha-\ntype=raw,value=$MODULE_VERSION" > .env
- npx nx container $MODULE_NAME --parallel=1rules:
- if: '$CI_COMMIT_TAG'
And here is the relevant logs from the CI :
> Removing temp folder /tmp/docker-build-push-HcICka
> NX Unknown tag type attribute: schedule\ntype=ref
Pass --verbose to see the stacktrace.
Help would be appreciated, for now I'll use only one tag for this specific job, but it could be nice if you could point me my mistake 😄
The text was updated successfully, but these errors were encountered:
Hello @gperdomor, I'm opening a new issue concerning input tags because it seems it's still not working as intended when using multiple tags.
I've seen #356 and #764 which led me to https://github.com/gperdomor/nx-tools/blob/main/packages/nx-container/TROUBLESHOOTING.md#inline-execution.
Here is how I implemented in gitlab ci job :
And here is the relevant logs from the CI :
Help would be appreciated, for now I'll use only one tag for this specific job, but it could be nice if you could point me my mistake 😄
The text was updated successfully, but these errors were encountered: