Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Setup-Manager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Dmytro Bogatov
Setup-Manager
Commits
f0a470e9
Verified
Commit
f0a470e9
authored
Apr 16, 2019
by
Dmytro Bogatov
💕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CI deploy.
parent
737dd517
Pipeline
#4093
passed with stage
in 4 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
10 deletions
+19
-10
.gitlab-ci.yml
.gitlab-ci.yml
+2
-1
infra/script.sh
infra/script.sh
+3
-0
infra/token-proxy/token.conf
infra/token-proxy/token.conf
+4
-0
infra/upgrade-service.sh
infra/upgrade-service.sh
+10
-9
No files found.
.gitlab-ci.yml
View file @
f0a470e9
...
...
@@ -24,8 +24,9 @@ deploy-latest:
-
touch .secret.sh
-
./build-services.sh
-
rm ./services/namespace.yaml
-
SERVER=$(curl -s https://$TOKEN@token.dbogatov.org/server | tr -d '[:space:]')
-
TOKEN=$(curl -s https://$TOKEN@token.dbogatov.org | tr -d '[:space:]')
-
kubectl --
token=$TOKEN --server=https://k8sapi.dbogatov.org
apply -R -f ./services/
-
kubectl --
insecure-skip-tls-verify=true --token=$TOKEN --server=$SERVER
apply -R -f ./services/
tags
:
-
docker
only
:
...
...
infra/script.sh
View file @
f0a470e9
...
...
@@ -141,12 +141,15 @@ printf "\n\n"
### upgrade proxy
SERVER
=
$(
kubectl
$KEBEFILE
config view
-o
jsonpath
=
'{.clusters[0].cluster.server}'
)
cd
token-proxy
rm
-rf
./dist
mkdir
./dist
cp
Dockerfile token.conf ./dist
cd
./dist
sed
-i
-e
"s#__TOKEN__#
$DASHBOARD_TOKEN
#g"
token.conf
sed
-i
-e
"s#__SERVER__#
$SERVER
#g"
token.conf
docker build
-t
registry.dbogatov.org/dbogatov/proxy-registry
.
docker push registry.dbogatov.org/dbogatov/proxy-registry
cd
$CWD
...
...
infra/token-proxy/token.conf
View file @
f0a470e9
...
...
@@ -5,4 +5,8 @@ server {
location
/ {
return
200
"__TOKEN__"
;
}
location
/
server
{
return
200
"__SERVER__"
;
}
}
infra/upgrade-service.sh
View file @
f0a470e9
...
...
@@ -10,21 +10,22 @@ CWD=$(pwd)
usage
()
{
echo
"Usage:
$0
[-s <string>]"
1>&2
;
exit
1
;
}
KEBEFILE
=
"--kubeconfig=
${
CWD
}
/kubeconfig.yaml"
SERVICE
=
""
while
getopts
"s:"
o
;
do
case
"
${
o
}
"
in
s
)
SERVICE
=
${
OPTARG
}
;;
*
)
usage
;;
esac
case
"
${
o
}
"
in
s
)
SERVICE
=
${
OPTARG
}
;;
*
)
usage
;;
esac
done
shift
$((
OPTIND-1
))
source
./build-services.sh
$SERVICE
kubectl apply
-R
-f
./services/
$SERVICE
kubectl
$KEBEFILE
apply
-R
-f
./services/
$SERVICE
echo
"Done!"
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