The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

submodule files are not available for pipeline after git submodule update executed successfully

Mykhail Martsyniuk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 25, 2020

Hello, community!

 

In a nutshell i have a following test pipeline that drives me crazy:

image: atlassian/default-image:2

pipelines:
default:
- step:
name: 'Init submodule'
script:
- git submodule update --init --recursive
- git submodule status
- step:
name: 'Do something with submodule'
script:
- ls test-lib -al
- step:
name: 'do just clone'
script:
- git clone git@bitbucket.org:mykha/submobule-test-lib.git
- ls submobule-test-lib/*

 What im facing is that first step is executed correctly and has an output like:

+ git submodule update --init --recursive
Submodule 'test-lib' (git@bitbucket.org:mykha/submobule-test-lib.git) registered for path 'test-lib'

Cloning into 'test-lib'...

Warning: Permanently added the RSA host key for IP address '104.192.141.1' to the list of known hosts.

Submodule path 'test-lib': checked out '15755730500ea84a78ef065621ed899f550df6cb'

The commit hash is valid and submodule has some files pushed on it..

But the 2nd step returns empty list of files.

At the same time if i do just a git clone of the same submodule repo (at step 3) it works just fine.  My assumption is that all ssh keys and repo access are just fine.. the problem happens with submodule file tree only.

Am i doing something wrong? Does anyone faced something similar?

 

Update: actually this is how steps are defined in bitbucket pipelines. Submodules are not fetched automatically for each step. My bad =(

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events