Auto DevOps test job fails on simple project (unable to select buildpack)
Summary
(Summarize the bug encountered concisely)
Steps to reproduce
I have a very simple hello world project at https://gitlab.com/jlenny/product_walkthrough_1. I enabled Auto DevOps and the first pipeline failed with the following error:
$ if [ -z ${KUBERNETES_PORT+x} ]; then # collapsed multi-line command
$ export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:5432/${POSTGRES_DB}"
$ cp -R . /tmp/app
$ /bin/herokuish buildpack test
-----> Unable to select a buildpack
Example Project
https://gitlab.com/jlenny/product_walkthrough_1
What is the current bug behavior?
Test job fails
What is the expected correct behavior?
Test job passes, or at least doesn't run if it's dependent on having a k8s cluster
Relevant logs and/or screenshots
$ if [ -z ${KUBERNETES_PORT+x} ]; then # collapsed multi-line command
$ export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:5432/${POSTGRES_DB}"
$ cp -R . /tmp/app
$ /bin/herokuish buildpack test
-----> Unable to select a buildpack
Output of checks
This bug happens on GitLab.com
Possible fixes
Use language detection rules like the parent template, but change the top two rules to
- - if: '$BUILDPACK_URL || $AUTO_DEVOPS_EXPLICITLY_ENABLED == "1"'
- - exists:
- - Dockerfile
+ - if: '$BUILDPACK_URL'
Edited by Hordur Freyr Yngvason