Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
velero-plugin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
velero-plugin
Commits
d437d751
Commit
d437d751
authored
Jan 09, 2020
by
haoshuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add build.sh
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
parent
2650f1a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
Dockerfile
+1
-1
build/build.sh
+15
-0
No files found.
Dockerfile
View file @
d437d751
...
@@ -14,6 +14,6 @@
...
@@ -14,6 +14,6 @@
FROM
debian:stretch-slim
FROM
debian:stretch-slim
RUN
mkdir /plugins
RUN
mkdir /plugins
ADD
velero-* /plugins/
ADD
_output/
velero-* /plugins/
USER
nobody:nobody
USER
nobody:nobody
ENTRYPOINT
["/bin/bash", "-c", "cp /plugins/* /target/."]
ENTRYPOINT
["/bin/bash", "-c", "cp /plugins/* /target/."]
build/build.sh
0 → 100755
View file @
d437d751
#!/usr/bin/env bash
set
-e
cd
${
GOPATH
}
/src/github.com/AliyunContainerService/velero-plugin
GIT_SHA
=
`
git rev-parse
--short
HEAD
||
echo
"HEAD"
`
export
GOARCH
=
"amd64"
export
GOOS
=
"linux"
branch
=
"master"
version
=
"v1.2"
commitId
=
$GIT_SHA
buildTime
=
`
date
"+%Y-%m-%d-%H:%M:%S"
`
CGO_ENABLED
=
0 go build
-ldflags
"-X main._BRANCH_='
$branch
' -X main._VERSION_='
$version
-
$commitId
' -X main._BUILDTIME_='
$buildTime
'"
-o
_output/velero-plugin-for-alibabacloud
${
GOPATH
}
/src/github.com/AliyunContainerService/velero-plugin/velero-plugin-for-alibabacloud
docker build
-t
=
registry.cn-hangzhou.aliyuncs.com/acs/velero-plugin-alibabacloud:
$version
-
$GIT_SHA
.
docker push registry.cn-hangzhou.aliyuncs.com/acs/velero-plugin-alibabacloud:
$version
-
$GIT_SHA
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