Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
maap-workspaces
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Administrator
maap-workspaces
Commits
d949e79f
Commit
d949e79f
authored
1 year ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
Update generate-deploy-stages.sh
parent
34cfc7b1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#1762
failed with stages
in 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generate-deploy-stages.sh
+17
-12
17 additions, 12 deletions
generate-deploy-stages.sh
with
17 additions
and
12 deletions
generate-deploy-stages.sh
+
17
−
12
View file @
d949e79f
...
@@ -2,18 +2,23 @@
...
@@ -2,18 +2,23 @@
set
-e
set
-e
basedir
=
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
basedir
=
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
cat
$TRIGGER_PAYLOAD
| python3
-c
"import sys, json; print(json.loads(json.load(sys.stdin)['payload'])['ref'])"
|
grep
"-uat"
cat
$TRIGGER_PAYLOAD
cat
$TRIGGER_PAYLOAD
| python3
-c
"import sys, json; print(json.loads(json.load(sys.stdin)['payload'])['ref'])"
|
grep
"uat"
TAG
=
$(
!!
)
TAG
=
$(
!!
)
git clone
--single-branch
--branch
${
TAG
}
https://github.com/MAAP-Project/maap-workspaces.git
touch
deploy.yml
pushd
maap-workspaces
if
[
-z
"
${
TAG
}
"
]
;
then
find base_images
-type
d
-depth
1
>
${
basedir
}
/images.txt
git clone
--single-branch
--branch
${
TAG
}
https://github.com/MAAP-Project/maap-workspaces.git
cat
${
basedir
}
/images.txt
pushd
maap-workspaces
template
=
"
${
basedir
}
/deploy.yml.tmpl"
find base_images
-type
d
-depth
1
>
${
basedir
}
/images.txt
cat
${
basedir
}
/images.txt |
while
read
image
cat
${
basedir
}
/images.txt
do
template
=
"
${
basedir
}
/deploy.yml.tmpl"
export
BASE_IMAGE_TYPE
=
$(
basename
${
image
}
)
cat
${
basedir
}
/images.txt |
while
read
image
export
TAG
=
${
TAG
}
do
cat
${
template
}
|
CI_JOB_TOKEN
=
'$CI_JOB_TOKEN'
CI_REGISTRY
=
'$CI_REGISTRY'
envsubst
>>
deploy.yml
export
BASE_IMAGE_TYPE
=
$(
basename
${
image
}
)
done
export
TAG
=
${
TAG
}
cat
${
template
}
|
CI_JOB_TOKEN
=
'$CI_JOB_TOKEN'
CI_REGISTRY
=
'$CI_REGISTRY'
envsubst
>>
deploy.yml
done
fi
echo
"Generate stages.yaml"
echo
"Generate stages.yaml"
cat
deploy.yml
||
true
cat
deploy.yml
||
true
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment