-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
27 lines (24 loc) · 1.02 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pipeline:
build:
image: golang
secrets: [ ARTIFACTORY_PASSWORD, ARTIFACTORY_USER, ARTIFACTORY_URL, REPOSITORY_KEY ]
commands:
- echo $GOPATH
- go get -u golang.org/x/vgo
- export vgo=$GOPATH/bin/vgo
- cd hello
# Download the JFrog CLI
- curl -fL https://getcli.jfrog.io | sh
- ./jfrog rt config --url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASSWORD
- ./jfrog rt c show
# Chnage the repository name in the configuration.yml to the the REPOSITORY_KEY .
- sed -i 's,REPOSITORY_KEY,'"$REPOSITORY_KEY"',g' ../configuration.yml
# Run the go command with the CLI
- ./jfrog rt go build --no-registry
- ls -ll $GOPATH/src/mod
- ./jfrog rt go build go
- ./jfrog rt gp go-local v1.10.0 --build-name=Drone-GO-Demo --build-number=1.10.0
# Collect the environment variables with bce command
- ./jfrog rt bce Drone-GO-Demo 1.10.0
# Publish the build with bp command
- ./jfrog rt bp Drone-GO-Demo 1.10.0