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
  • 3362 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
April 24, 2025

--no-publish is likely fine for your use case. You're sending the incorrect auth for that namespace as indicated in the error: 

 

401 (Unauthorized) --> 
 › "The supplied authentication is invalid"

 

I'd recommend checking that you're using the correct namespace auth token for staging. 


Hey @parussel , 

 

I cross checked the Auth value from the credentials file I downloaded from stage workspace. It seem to match correctly. 

 

But the way we have configured the secrets is as below. Can you please review if probably this needs an update?

 

 

.env-stage





AIO_runtime_auth=<auth-value>

AIO_runtime_namespace=<stage-namespace>

AIO_runtime_apihost=https://adobeioruntime.net

SERVICE_API_KEY= <key>

auth-stage

<auth-value>

 

Should the auth-stage secret be configured as key value pair or it should be stored as just the value like we have done for bindings config to work.

 

@tmj @vishal33