You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-08-08 22:36:41 +02:00
gitlab ci testing nested variables
This commit is contained in:
@ -3,6 +3,10 @@ image: geeksaccelerator/docker-library:golang1.12-docker
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
variables:
|
||||
NO_BUILD: 'true'
|
||||
NO_DEPLOY: 'true'
|
||||
|
||||
before_script:
|
||||
- 'cd ./tools/devops && make install && cd ../../'
|
||||
- 'cd ./tools/schema && make install && cd ../../'
|
||||
@ -109,12 +113,12 @@ cache:
|
||||
HOST_NAMES: 'www.eproc.tech, api.eproc.tech'
|
||||
S3_BUCKET_PRIVATE: 'saas-starter-kit-private'
|
||||
S3_BUCKET_PUBLIC: 'saas-starter-kit-public'
|
||||
NO_BUILD: 0
|
||||
NO_DEPLOY: 1
|
||||
AWS_USE_ROLE: 1
|
||||
AWS_USE_ROLE: 'true'
|
||||
webapi:build:dev:
|
||||
<<: *deploy_dev_webapi_tmpl
|
||||
stage: build:dev
|
||||
variables:
|
||||
NO_BUILD: 'false'
|
||||
only:
|
||||
- master
|
||||
- dev
|
||||
@ -122,6 +126,8 @@ webapi:build:dev:
|
||||
webapi:deploy:dev:
|
||||
<<: *deploy_dev_webapi_tmpl
|
||||
stage: deploy:dev
|
||||
variables:
|
||||
NO_DEPLOY: 'false'
|
||||
dependencies:
|
||||
- 'webapi:build:dev'
|
||||
# - 'db:migrate:dev'
|
||||
|
@ -1558,6 +1558,22 @@ func ServiceDeploy(log *log.Logger, req *serviceDeployRequest) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure cache nodes are set after updating parameters.
|
||||
if len(cacheCluster.CacheNodes) == 0 {
|
||||
// Find Elastic Cache cluster given Id.
|
||||
descRes, err := svc.DescribeCacheClusters(&elasticache.DescribeCacheClustersInput{
|
||||
CacheClusterId: req.CacheCluster.CacheClusterId,
|
||||
ShowCacheNodeInfo: aws.Bool(true),
|
||||
})
|
||||
if err != nil {
|
||||
if aerr, ok := err.(awserr.Error); !ok || aerr.Code() != elasticache.ErrCodeCacheClusterNotFoundFault {
|
||||
return errors.Wrapf(err, "Failed to describe cache cluster '%s'", *req.CacheCluster.CacheClusterId)
|
||||
}
|
||||
} else if len(descRes.CacheClusters) > 0 {
|
||||
cacheCluster = descRes.CacheClusters[0]
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("\t%s\tDone setting up Cache Cluster '%s' successfully.\n", tests.Success, *cacheCluster.CacheClusterId)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user