Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

step: ip-ranges is not working in afterscript

Ioannis Karydis
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!
August 6, 2024

just an example:

 

options:
runtime:
cloud:
atlassian-ip-ranges: true
definitions:
common_script_items:
- &install_aws_cli apt update && apt install -y curl unzip && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.9.20.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install

steps:
- step: &deploy-any
name: 'Deploy Any'
size: 4x
service:
- docker
image: node:18-bullseye
script:
- *install_aws_cli
after-script:
- *install_aws_cli
the aws cli cannot be downloaded in after-script but it works in the script section.

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2024

Hi Ioannis,

I have been unable to reproduce this on my end with an example configuration below:

options:
runtime:
cloud:
atlassian-ip-ranges: true

image: atlassian/default-image:4


pipelines:

custom:

testip:
- step:
name: 'test'
size: 4x
script:
- curl http://checkip.amazonaws.com/
after-script:
- curl http://checkip.amazonaws.com/

Are you able to add that curl command above to your script prior to the install_aws_cli command and let me know which build IP addresses are recorded there? 

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events