Skip to content

Auto DevOps deployment to GKE fails due to missing Production stage in the pipeline

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Step 8 at https://docs.gitlab.com/topics/autodevops/cloud_deployments/auto_devops_with_gke/ fails due to missing Production stage in the pipeline

Steps to reproduce

Run all the steps at https://docs.gitlab.com/topics/autodevops/cloud_deployments/auto_devops_with_gke/

Example Project

N/A - I use private project

What is the current bug behavior?

If you use Ruby on Rails template at step 3, you get a build error at step 8. If you instead use Spring template at step 3, you dont get the Production stage in the pipeline at stage 8, which means the app doesn't get deployed to GKE.

What is the expected correct behavior?

If you use Ruby on Rails template at step 3, you DONT get a build error at step 8. If you instead use Spring template at step 3, you should see the Production stage in the pipeline at stage 8, which means the app gets deployed to GKE.

Relevant logs and/or screenshots

ROR build log:

[0KRunning with gitlab-runner 17.10.0~pre.41.g5c23fd8e (5c23fd8e)[0;m
[0K  on blue-3.saas-linux-small-amd64.runners-manager.gitlab.com/default zxwgkjAP, system ID: s_d5d3abbdfd0a[0;m
[0K[36;1mResolving secrets[0;m[0;m
section_start:1742594904:prepare_executor
[0K[0K[36;1mPreparing the "docker+machine" executor[0;m[0;m
[0KUsing Docker executor with image registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v4.3.0 ...[0;m
[0KStarting service docker:20.10.12-dind...[0;m
[0KPulling docker image docker:20.10.12-dind ...[0;m
[0KUsing docker image sha256:1a42336ff683d7dadd320ea6fe9d93a5b101474346302d23f96c9b4546cb414d for docker:20.10.12-dind with digest docker@sha256:6f2ae4a5fd85ccf85cdd829057a34ace894d25d544e5e4d9f2e7109297fedf8d ...[0;m
[0KWaiting for services to be up and running (timeout 30 seconds)...[0;m
[0KAuthenticating with credentials from job payload (GitLab Registry)[0;m
[0KPulling docker image registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v4.3.0 ...[0;m
[0KUsing docker image sha256:9c40ffac990ddad9fbf65fa2b58f51f1a38c618e362ac254e35f18833750348e for registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v4.3.0 with digest registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image@sha256:f572a48601163a35b0a157586c549ead73e6d6b1eb31f9b4eaddeb2521f86631 ...[0;m
section_end:1742594922:prepare_executor
[0Ksection_start:1742594922:prepare_script
[0K[0K[36;1mPreparing environment[0;m[0;m
Running on runner-zxwgkjap-project-68251682-concurrent-0 via runner-zxwgkjap-s-l-s-amd64-1742594831-e1e62646...
section_end:1742594926:prepare_script
[0Ksection_start:1742594926:get_sources
[0K[0K[36;1mGetting source from Git repository[0;m[0;m
[32;1mFetching changes with git depth set to 20...[0;m
Initialized empty Git repository in /builds/SRS/POC/ror-gke-deploy/.git/
[32;1mCreated fresh repository.[0;m
[32;1mChecking out 9420118c as detached HEAD (ref is master)...[0;m

[32;1mSkipping Git submodules setup[0;m
[32;1m$ git remote set-url origin "${CI_REPOSITORY_URL}"[0;m
section_end:1742594927:get_sources
[0Ksection_start:1742594927:step_script
[0K[0K[36;1mExecuting "step_script" stage of the job script[0;m[0;m
[0KUsing docker image sha256:9c40ffac990ddad9fbf65fa2b58f51f1a38c618e362ac254e35f18833750348e for registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v4.3.0 with digest registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image@sha256:f572a48601163a35b0a157586c549ead73e6d6b1eb31f9b4eaddeb2521f86631 ...[0;m
[32;1m$ if [[ -z "$CI_COMMIT_TAG" ]]; then # collapsed multi-line command[0;m
[32;1m$ /build/build.sh[0;m
Logging in to GitLab Container Registry with CI credentials...
Login Succeeded

Logging in to GitLab Dependency proxy with CI credentials...

Login Succeeded
Building Cloud Native Buildpack-based application with builder heroku/builder:22...
22: Pulling from heroku/builder
8f84a9f2102e: Pulling fs layer
6df1e6516108: Pulling fs layer
65c6e732b933: Pulling fs layer
5563b276e05d: Pulling fs layer
182afb1fe5dc: Pulling fs layer
75a087e6ed4c: Pulling fs layer
50b7885af6d7: Pulling fs layer
b879ee5d6bee: Pulling fs layer
7f8062a5a1ab: Pulling fs layer
3cf0eafef73c: Pulling fs layer
c28294f7e141: Pulling fs layer
9ad7bfa4ca19: Pulling fs layer
3625c5cf8092: Pulling fs layer
4db23a429387: Pulling fs layer
faeacaaec23c: Pulling fs layer
89f39bc6a0d1: Pulling fs layer
0b24904a4012: Pulling fs layer
2a36e9686338: Pulling fs layer
0af0c4f49dd1: Pulling fs layer
95ebb6632550: Pulling fs layer
47d0341fa76b: Pulling fs layer
cde48b6d2be4: Pulling fs layer
13a905829552: Pulling fs layer
4cb86498f28a: Pulling fs layer
0090bd01ff8f: Pulling fs layer
783a694bd0a1: Pulling fs layer
14e14bea70b0: Pulling fs layer
d9bfbbffe9b4: Pulling fs layer
ae0518e0ea1b: Pulling fs layer
bddf3080fdd9: Pulling fs layer
4f4fb700ef54: Pulling fs layer
5563b276e05d: Waiting
182afb1fe5dc: Waiting
75a087e6ed4c: Waiting
50b7885af6d7: Waiting
b879ee5d6bee: Waiting
7f8062a5a1ab: Waiting
3cf0eafef73c: Waiting
c28294f7e141: Waiting
9ad7bfa4ca19: Waiting
3625c5cf8092: Waiting
4db23a429387: Waiting
faeacaaec23c: Waiting
89f39bc6a0d1: Waiting
0b24904a4012: Waiting
2a36e9686338: Waiting
0af0c4f49dd1: Waiting
95ebb6632550: Waiting
47d0341fa76b: Waiting
cde48b6d2be4: Waiting
13a905829552: Waiting
4cb86498f28a: Waiting
0090bd01ff8f: Waiting
783a694bd0a1: Waiting
14e14bea70b0: Waiting
d9bfbbffe9b4: Waiting
ae0518e0ea1b: Waiting
bddf3080fdd9: Waiting
4f4fb700ef54: Waiting
8f84a9f2102e: Verifying Checksum
8f84a9f2102e: Download complete
5563b276e05d: Verifying Checksum
5563b276e05d: Download complete
182afb1fe5dc: Verifying Checksum
182afb1fe5dc: Download complete
65c6e732b933: Verifying Checksum
65c6e732b933: Download complete
75a087e6ed4c: Verifying Checksum
75a087e6ed4c: Download complete
50b7885af6d7: Verifying Checksum
50b7885af6d7: Download complete
b879ee5d6bee: Verifying Checksum
b879ee5d6bee: Download complete
7f8062a5a1ab: Verifying Checksum
7f8062a5a1ab: Download complete
3cf0eafef73c: Verifying Checksum
3cf0eafef73c: Download complete
c28294f7e141: Verifying Checksum
c28294f7e141: Download complete
9ad7bfa4ca19: Verifying Checksum
9ad7bfa4ca19: Download complete
3625c5cf8092: Verifying Checksum
3625c5cf8092: Download complete
8f84a9f2102e: Pull complete
4db23a429387: Download complete
faeacaaec23c: Verifying Checksum
faeacaaec23c: Download complete
0b24904a4012: Verifying Checksum
0b24904a4012: Download complete
89f39bc6a0d1: Verifying Checksum
89f39bc6a0d1: Download complete
0af0c4f49dd1: Verifying Checksum
0af0c4f49dd1: Download complete
2a36e9686338: Verifying Checksum
2a36e9686338: Download complete
6df1e6516108: Verifying Checksum
6df1e6516108: Download complete
47d0341fa76b: Verifying Checksum
47d0341fa76b: Download complete
95ebb6632550: Verifying Checksum
95ebb6632550: Download complete
cde48b6d2be4: Verifying Checksum
cde48b6d2be4: Download complete
13a905829552: Verifying Checksum
13a905829552: Download complete
4cb86498f28a: Verifying Checksum
4cb86498f28a: Download complete
783a694bd0a1: Verifying Checksum
783a694bd0a1: Download complete
0090bd01ff8f: Verifying Checksum
0090bd01ff8f: Download complete
14e14bea70b0: Verifying Checksum
14e14bea70b0: Download complete
d9bfbbffe9b4: Verifying Checksum
d9bfbbffe9b4: Download complete
ae0518e0ea1b: Verifying Checksum
ae0518e0ea1b: Download complete
bddf3080fdd9: Verifying Checksum
bddf3080fdd9: Download complete
4f4fb700ef54: Verifying Checksum
4f4fb700ef54: Download complete
6df1e6516108: Pull complete
65c6e732b933: Pull complete
5563b276e05d: Pull complete
182afb1fe5dc: Pull complete
75a087e6ed4c: Pull complete
50b7885af6d7: Pull complete
b879ee5d6bee: Pull complete
7f8062a5a1ab: Pull complete
3cf0eafef73c: Pull complete
c28294f7e141: Pull complete
9ad7bfa4ca19: Pull complete
3625c5cf8092: Pull complete
4db23a429387: Pull complete
faeacaaec23c: Pull complete
89f39bc6a0d1: Pull complete
0b24904a4012: Pull complete
2a36e9686338: Pull complete
0af0c4f49dd1: Pull complete
95ebb6632550: Pull complete
47d0341fa76b: Pull complete
cde48b6d2be4: Pull complete
13a905829552: Pull complete
4cb86498f28a: Pull complete
0090bd01ff8f: Pull complete
783a694bd0a1: Pull complete
14e14bea70b0: Pull complete
d9bfbbffe9b4: Pull complete
ae0518e0ea1b: Pull complete
bddf3080fdd9: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:142b8dfd287524726daf64ba597ffefb7320720fefaf36443af2b5062dbdc73e
Status: Downloaded newer image for heroku/builder:22
22-cnb: Pulling from heroku/heroku
8f84a9f2102e: Already exists
6df1e6516108: Already exists
76d3b52a0f12: Pulling fs layer
76d3b52a0f12: Verifying Checksum
76d3b52a0f12: Download complete
76d3b52a0f12: Pull complete
Digest: sha256:4a956725121c56bb1b56997b74dc3bb45faf0161b914258088d68c5a56d8124f
Status: Downloaded newer image for heroku/heroku:22-cnb
Warning: PACK_VOLUME_KEY is unset; set this environment variable to a secret value to avoid creating a new volume cache on every build
===> ANALYZING
Image with name "tmp-cnb-image-9488496323" not found
===> DETECTING
3 of 6 buildpacks participating
heroku/nodejs-engine 3.5.1
heroku/nodejs-yarn   3.5.1
heroku/ruby          7.0.0
===> RESTORING
===> BUILDING

# Heroku Node.js Engine

- Checking Node.js version
  - Node.js version not specified, using `22.x`
  - Resolved Node.js version: `22.14.0`
- Installing Node.js distribution
  - Downloading Node.js `22.14.0 (linux-amd64)` from https://nodejs.org/download/release/v22.14.0/node-v22.14.0-linux-x64.tar.gz .... (1.3s)
  - Verifying checksum
  - Extracting Node.js `22.14.0 (linux-amd64)`
  - Installing Node.js `22.14.0 (linux-amd64)` ... (< 0.1s)
- Done (finished in < 0.1s)

# Heroku Node.js Yarn

- Detecting yarn CLI version to install
  - No yarn engine range detected in package.json, using default (1.22.x)
  - Resolved yarn CLI version: 1.22.22
- Installing yarn CLI
  - Downloading yarn 1.22.22 ... (0.2s)
  - Extracting yarn 1.22.22
  - Installing yarn 1.22.22
- Yarn CLI operating in yarn 1.22.22 mode.
- Setting up yarn dependency cache
  - Running `yarn config set cache-folder /layers/heroku_nodejs-yarn/deps/cache`

      yarn config v1.22.22
      success Set "cache-folder" to "/layers/heroku_nodejs-yarn/deps/cache".
      Done in 0.03s.

  - Done (0.2s)
- Installing dependencies
  - Running `yarn install "--production=false" --frozen-lockfile`

      yarn install v1.22.22
      [1/4] Resolving packages...
      [2/4] Fetching packages...
      [3/4] Linking dependencies...
      [4/4] Building fresh packages...
      Done in 14.08s.

  - Done (14.2s)
- Running scripts
  - No build scripts found
- Done (finished in 15.2s)

## Heroku Ruby Buildpack

- Metrics agent
  - Skipping install (`barnes` gem not found)
- Ruby version `3.0.4` from `Gemfile.lock`
  - Installing ... (Error)
- Debug info
  - Download error: https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com/heroku-22/ruby-3.0.4.tgz: status code 404

! Error installing Ruby
!
! Could not install the detected Ruby version. Ensure that you're using a supported
! ruby version and try again.
!
! Supported ruby versions:
! https://devcenter.heroku.com/articles/ruby-support#ruby-versions

ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
section_end:1742594979:step_script
[0Ksection_start:1742594979:upload_artifacts_on_failure
[0K[0K[36;1mUploading artifacts for failed job[0;m[0;m
[32;1mUploading artifacts...[0;m
[0;33mWARNING: gl-auto-build-variables.env: no matching files. Ensure that the artifact path is relative to the working directory (/builds/SRS/POC/ror-gke-deploy)[0;m 
[31;1mERROR: No files to upload                         [0;m 
section_end:1742594980:upload_artifacts_on_failure
[0Ksection_start:1742594980:cleanup_file_variables
[0K[0K[36;1mCleaning up project directory and file based variables[0;m[0;m
section_end:1742594980:cleanup_file_variables
[0K[31;1mERROR: Job failed: exit code 1
[0;m
Edited by 🤖 GitLab Bot 🤖