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 Oct 4, 2024
1 parent aea3d6e commit 55c22e9
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions pipelines/stag/nod-test/nod-test-stag-pipeline.gocd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
# Source: gocd/templates/deploy.yaml
format_version: 11
pipelines:
build-nod-test-stag:
group: xquare
environment_variables:

label_template: "${git[:7]}"
materials:
git:
git: https://github.com/team-xquare/node-test
shallow_clone: false
auto_update: true
branch: develop
stages:
- build:
jobs:
build:
resources:
- build
artifacts:
- build:
source: build_result.env
destination: artifacts
tasks:
- exec:
command: /bin/bash
arguments:
- -c
- |
curl -o runtime_setting_and_build.sh https://raw.githubusercontent.com/team-xquare/xquare-gitops-repo-v2/main/script/runtime_setting_and_build.sh
curl -o template.json https://raw.githubusercontent.com/team-xquare/xquare-gitops-repo-v2/main/pipelines/stag/nod-test/template.json
chmod +x runtime_setting_and_build.sh
./runtime_setting_and_build.sh 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/stag/nod-test/Dockerfile
chmod +x docker_build.sh
./docker_build.sh stag nod-test
- 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 nod-test | sed 's/-/_/g')
RESOURCE_VAR_NAME="${SANITIZED_NAME}_REPOSITORY"
./resource_deploy.sh nod-test stag ${!RESOURCE_VAR_NAME}

0 comments on commit 55c22e9

Please sign in to comment.