Skip to content

Commit

Permalink
release :: deploy pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: XQUARE GitOps Bot <[email protected]>
  • Loading branch information
xquare-admin committed Nov 13, 2024
1 parent b3483ae commit b15c881
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions pipelines/prod/founderz/founderz-prod-pipeline.gocd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# Source: gocd/templates/pipeline.yaml
format_version: 11
pipelines:
build-founderz-prod:
group: xquare
environment_variables:

label_template: "${git[:7]}"
materials:
git:
git: https://github.com/teamFOUNDERZ/FOUNDERZ-2024-front-end
shallow_clone: false
auto_update: true
branch: main
stages:
- build:
jobs:
build:
elastic_profile_id: founderz-prod-agent-profile
artifacts:
- build:
source: build_result.env
destination: artifacts
tasks:
- exec:
command: /bin/bash
arguments:
- -c
- |
curl -o template.json https://raw.githubusercontent.com/team-xquare/xquare-gitops-repo-v2/main/pipelines/prod/founderz/template.json
curl -o docker_build.sh https://raw.githubusercontent.com/team-xquare/xquare-gitops-repo-v2/main/script/docker_build.sh
curl -o Dockerfile https://raw.githubusercontent.com/team-xquare/xquare-gitops-repo-v2/main/pipelines/prod/founderz/Dockerfile
chmod +x docker_build.sh
./docker_build.sh prod founderz "$(cat template.json)"
- deploy:
jobs:
deploy:
elastic_profile_id: deploy-agent-profile
tasks:
- fetch:
run_if: any
artifact_origin: gocd
stage: build
job: build
is_file: yes
source: artifacts/build_result.env
destination: environment
- exec:
command: /bin/bash
arguments:
- -c
- |
cat environment/build_result.env
source environment/build_result.env
curl -o resource_deploy.sh https://raw.githubusercontent.com/team-xquare/xquare-gitops-repo-v2/main/script/resource_deploy.sh
chmod +x resource_deploy.sh
SANITIZED_NAME=$(echo founderz | sed 's/-/_/g')
RESOURCE_VAR_NAME="${SANITIZED_NAME}_REPOSITORY"
./resource_deploy.sh founderz prod ${!RESOURCE_VAR_NAME}

0 comments on commit b15c881

Please sign in to comment.