Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d44b9d81
Commit
d44b9d81
authored
Oct 07, 2020
by
Etienne Baqué
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved provisioning to own template
parent
5bede99d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
app/models/ci_platform_metric.rb
app/models/ci_platform_metric.rb
+1
-1
lib/gitlab/ci/templates/AWS/CF-Provision-and-Deploy-EC2.gitlab-ci.yml
...i/templates/AWS/CF-Provision-and-Deploy-EC2.gitlab-ci.yml
+2
-0
lib/gitlab/ci/templates/Jobs/CF-Provision.gitlab-ci.yml
lib/gitlab/ci/templates/Jobs/CF-Provision.gitlab-ci.yml
+14
-0
lib/gitlab/ci/templates/Jobs/Deploy/EC2.gitlab-ci.yml
lib/gitlab/ci/templates/Jobs/Deploy/EC2.gitlab-ci.yml
+1
-2
No files found.
app/models/ci_platform_metric.rb
View file @
d44b9d81
...
...
@@ -14,7 +14,7 @@ class CiPlatformMetric < ApplicationRecord
numericality:
{
only_integer:
true
,
greater_than:
0
}
CI_VARIABLE_KEY
=
'AUTO_DEVOPS_PLATFORM_TARGET'
ALLOWED_TARGETS
=
%w[ECS FARGATE]
.
freeze
ALLOWED_TARGETS
=
%w[ECS FARGATE
EC2
]
.
freeze
def
self
.
insert_auto_devops_platform_targets!
recorded_at
=
Time
.
zone
.
now
...
...
lib/gitlab/ci/templates/AWS/CF-Provision-and-Deploy-EC2.gitlab-ci.yml
View file @
d44b9d81
stages
:
-
provision
-
review
-
production
...
...
@@ -6,4 +7,5 @@ variables:
AUTO_DEVOPS_PLATFORM_TARGET
:
EC2
include
:
-
template
:
Jobs/CF-Provision.gitlab-ci.yml
-
template
:
Jobs/Deploy/EC2.gitlab-ci.yml
lib/gitlab/ci/templates/Jobs/CF-Provision.gitlab-ci.yml
0 → 100644
View file @
d44b9d81
stages
:
-
provision
cloud_formation
:
image
:
'
registry.gitlab.com/gitlab-org/cloud-deploy/aws-cloudformation:latest'
stage
:
provision
script
:
-
gl-cloudformation create-stack
rules
:
-
if
:
'
($AUTO_DEVOPS_PLATFORM_TARGET
!=
"EC2")
||
($AUTO_DEVOPS_PLATFORM_TARGET
!=
"ECS")'
when
:
never
-
if
:
'
$CI_KUBERNETES_ACTIVE'
when
:
never
-
if
:
'
$CI_COMMIT_TAG
||
$CI_COMMIT_BRANCH'
lib/gitlab/ci/templates/Jobs/Deploy/EC2.gitlab-ci.yml
View file @
d44b9d81
...
...
@@ -3,9 +3,8 @@ stages:
-
production
.push-and-deploy
:
image
:
'
registry.gitlab.com/
ebaque/cloud-deploy/aws
:latest'
image
:
'
registry.gitlab.com/
gitlab-org/cloud-deploy/aws-ec2
:latest'
script
:
-
gl-cloudformation create-stack
-
gl-ec2 push-to-s3
-
gl-ec2 deploy-to-ec2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment