Forums

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

'git' not found in pipeline

Daeyeon Joo
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!
March 8, 2019

I have working pipeline configuration and it is working for many projects.

But today I have created new one and configured like below:

 

image: node:9.11.1-alpine

options:
docker: true

pipelines:
branches:
develop:
- step:
caches:
- node
script: # Modify the commands below to build your repository.
# You must commit the Gradle wrapper to your repository
# https://docs.gradle.org/current/userguide/gradle_wrapper.html
- apt-get update && apt-get install -y unzip git
- export TAG=$(git tag --contains $BITBUCKET_COMMIT)

 

But It seed to be not working.

export TAG=$(git tag --contains $BITBUCKET_COMMIT)

export TAG=$(git tag --contains $BITBUCKET_COMMIT)/opt/atlassian/pipelines/agent/tmp/shellScript1396312809883348351.sh: line 4: git: not found

 

What is the problem?

Please let me know :)

 

 

1 answer

0 votes
davina
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 16, 2019

Hi @Daeyeon Joo 

Since you are using an alpine image, you need to use the appropriate commands.

Try

apk update && apk add git

or 

apk update && apk upgrade && apk add --no-cache git

If you don't need to use an alpine image you can also switch to using the default pipelines image which has node and git already installed.

 

Hope this helps!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, forge, forge learning path, atlassian learning, cloud app development, forge app development, build forge apps, atlassian certification, developer training, jira app development, confluence app development, automation, ui frameworks

Turn Ideas into Atlassian Apps 📱

From setup to deployment—this learning path shows you how to build your first app using Forge. Learn the essentials, streamline workflows, and bring custom solutions to life across Jira, Confluence, and more.

Start Learning
AUG Leaders

Atlassian Community Events