Custom CI/CD Pipeline for Asset Compute Worker Using Bitbucket | Community
Skip to main content
Level 3
February 27, 2025
Question

Custom CI/CD Pipeline for Asset Compute Worker Using Bitbucket

  • February 27, 2025
  • 2 replies
  • 3361 views

Hi,  

We have written code for asset manipulation using Asset Compute Worker in App Builder and want to deploy the code to a higher environment using Bitbucket. Can you please guide me on how to achieve this using Bitbucket?

 

Request you to please help me with the deployment process.

Thanks,

@EstebanBustamante 
@arunpatidar 
@Harwinder-singh 
@sravs 
@abhishekanand_
@tmj 

2 replies

sarav_prakash
Community Advisor
Community Advisor
March 8, 2025

Hi @vishal33 ,

Adobe provided excellent documentation to setup CI-CD pipeline using github actions

https://developer.adobe.com/app-builder/docs/resources/ci-cd/requirements/

You can refer to my this reply. But this works only for Github.

 

We cant directly trigger Github actions from Bitbucket. Should try some workarounds

  1. Setup github repo. Trigger sync from Bitbucket into github. And then run the adobe provided github actions to deploy to AppBuilder.
  2. Install Bitbucket Post webhook plugin. The plugin will trigger github actions. But this once again requires sync of code from Bitbucket into Github
  3. Reinvent the wheel. Refer to adobe deploy script. And rewrite the yaml to work from Bitbucket pipelines. afaik no direct adobe documentation for Bitbucket pipeline. But steps involved would as below. 
    1. Checkout code
    2. Install node, npm i
    3. install adobe/aio-cli-setup-action,  adobe/aio-apps-action
    4. setup secrets as env variables
    5. Finally run `aio app deploy`. If required add --force-build, verbose, --no-action, whatever required flags.  

Sounds you ll need to reinvent with option3 to rewrite the github actions yaml into bitbucket pipeline. I have not done this. But I have written as Jenkins job to perform above steps in above order to checkout code from TFS and deploy onto AppBuilder. All the best!

Vishal33Author
Level 3
March 12, 2025

Thank you for your reply @sarav_prakash 

Actually, we are exploring both options bitbucket pipelines and Jenkins job
I have one question related to Jenkins job

If the .env file contains (

AIO_RUNTIME_NAMESPACE,AIO_RUNTIME_AUTH) then what is the need of separately configuring the file for auth and then what is the actual content of that AIO_RUNTIME_AUTH file?


Also, why we need to set the AIO_RUNTIME_NAMESPACE

again, in the shell command section if it is already present in the .env file?

please find the attached screenshot

Request you to please help me with the deployment process.
Thanks & Regards,

Vishal Jain

tmj
Adobe Employee
Adobe Employee
March 10, 2025

@vishal33 this video is a few years old but I think it should still prove to be a useful reference: https://www.youtube.com/watch?v=lbB2jl2rQZM&ab_channel=AdobeDevelopers

 

Vishal33Author
Level 3
April 3, 2025

Hi @tmj 
we have followed the steps given in this video regarding Jenkins setup.
Below is our Bash File

#!/bin/bash source ~/.bashrc echo $ENV_FILE_CONTENTS > .env cp .aio-stage .aio npm i export AIO_runtime_namespace=13xxx-xxxxassetcompute-stage aio app deploy

Error
/tmp/jenkins2065956486425470096.sh: line 9: aio: command not found

and when we change the bash file with

#!/bin/bash source ~/.bashrc echo $ENV_FILE_CONTENTS > .env cp .aio-stage .aio npm install -g @adobe/aio-cli npm i export AIO_runtime_namespace=13xxx-xxxxassetcompute-stage aio app deploy


Error
The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user

Request you to please help me with the deployment process.

Thanks & Regards,

Vishal Jain

Level 2
May 27, 2025

No that looks like the config.json file you downloaded from the Dev Console - Could you confirm? 

 

1. Go to your project directory

2. Copy the config.json file in that directory

3. Run aio app use config.json

4. This should generate the right .aio and .env files which you can use


Hey @tmj , 

 

Yes I downloaded the config JSON from developer console workspace specific configurations. Refer screenshot below. 

I followed the steps you suggested and it created the .aio and .env file. 

 

I noticed that below variables were not present in the manually created .env file as compared to generated file. Rest of the values are correct. 

I will try configuring this new file in Jenkins and see if that helps. 

 

Thanks,

Amit