Tuesday, October 4, 2022

How to call pipeline using curl command

 

curl -X POST \
--fail \
-F token=<tokengenerated> \
-F "ref=master" \
-F "variables[TEST_SETUP]=true" \
-F "variables[REGION]=us-west-1" \
-F "variables[GCLOUD_REGION]=us-west1" \
-F "variables[CLOUD_PLATFORM]=gcp" \
-F "variables[ROLE_ARN]=arn:aws:iam::<accountIDaws>:role/OrganizationAccountAccessRole" \
-F "variables[PREVIOUS_JOB_ID]=2882634455" \
-F "variables[PROFILE]=default-gcp" \
-F "variables[RUN_DESTROY]=true" \
https://gitlab.com/api/v4/projects/<projectID>/trigger/pipeline


curl -X POST \
--fail \
-F token=<tokengenerated> \
-F "ref=no_config_gcp" \
-F "variables[TEST_SETUP]=true" \
-F "variables[AWS_REGION]=us-west-1" \
-F "variables[GCLOUD_REGION]=us-west1" \
-F "variables[CLOUD_PLATFORM]=gcp" \
-F "variables[ROLE_ARN]=arn:aws:iam::<accountIDaws>:role/OrganizationAccountAccessRole" \
-F "variables[PROFILE]=default-gcp" \
-F "variables[RUN_SETUP]=true" \
-F "variables[RUN_DESTROY]=true" \
-F "variables[BUILD_RPM]=true" \
-F "variables[DEPLOY_CLUSTER]=true" \
-F "variables[TEARDOWN]=true" \
https://gitlab.com/api/v4/projects/<projectID>/trigger/pipeline


ssh -i ssh_key.pem projectname@34.83.42.232

https://gitlab.com/projectnamen/reponame/-/pipelines/613539746
2883749573


curl -X POST \
--fail \
-F token=<tokengenerated> \
-F "ref=move_artifacts" \
-F "variables[TEST_SETUP]=true" \
-F "variables[AWS_REGION]=us-west-1" \
-F "variables[GCLOUD_REGION]=us-west1" \
-F "variables[CLOUD_PLATFORM]=gcp" \
-F "variables[ROLE_ARN]=arn:aws:iam::<accountIDaws>:role/OrganizationAccountAccessRole" \
-F "variables[PREVIOUS_JOB_ID]=2883749573" \
-F "variables[PROFILE]=default-gcp" \
-F "variables[RUN_DESTROY]=true" \
-F "variables[BUILD_RPM]=true" \
-F "variables[DEPLOY_CLUSTER]=true" \
https://gitlab.com/api/v4/projects/<projectID>/trigger/pipeline

https://gitlab.com/projectnamen/reponame/-/pipelines/613865150

curl -X POST \
--fail \
-F token=<tokengenerated> \
-F "ref=use_previous_artifacts" \
-F "variables[BUILD_RPM]=true" \
-F "variables[CONNECT_ADMIN_SERVER]=true" \
-F "variables[GCLOUD_REGION]=us-west1" \
-F "variables[CLOUD_PLATFORM]=gcp" \
-F "variables[ROLE_ARN]=arn:aws:iam::<accountIDaws>:role/OrganizationAccountAccessRole" \
-F "variables[PREVIOUS_JOB_ID]=2882634455" \
-F "variables[PROFILE]=default-gcp" \
-F "variables[DEPLOY_CLUSTER]=true" \
https://gitlab.com/api/v4/projects/<projectID>/trigger/pipeline

curl -X POST \
--fail \
-F token=<tokengenerated> \
-F "ref=use_previous_artifacts" \
-F "variables[BUILD_RPM]=true" \
-F "variables[CONNECT_ADMIN_SERVER]=true" \
-F "variables[CLOUD_PLATFORM]=aws" \
-F "variables[ROLE_ARN]=arn:aws:iam::<accountIDaws>:role/OrganizationAccountAccessRole" \
-F "variables[PREVIOUS_JOB_ID]=2892261858" \
-F "variables[DEPLOY_CLUSTER]=true" \
-F "variables[RUN_TESTS]=true" \
-F "variables[MAKE_TARGET]=estimate" \
https://gitlab.com/api/v4/projects/<projectID>/trigger/pipeline

curl -X POST \
--fail \
-F token=<tokengenerated> \
-F "ref=use_previous_artifacts" \
-F "variables[CONNECT_ADMIN_SERVER]=true" \
-F "variables[CLOUD_PLATFORM]=aws" \
-F "variables[PREVIOUS_JOB_ID]=2892261858" \
-F "variables[RUN_TESTS]=true" \
-F "variables[MAKE_TARGET]=estimate" \
https://gitlab.com/api/v4/projects/<projectID>/trigger/pipeline

No comments:

Post a Comment