-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRONE_ and CI_ variable references must convert to a Harness expressi…
…ons (#118) * drone and ci variables references convert to harness expressions --------- Co-authored-by: Jim Sheldon <jim.sheldon@gmail.com>
- Loading branch information
1 parent
c1069a6
commit adea84d
Showing
4 changed files
with
207 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: default | ||
type: docker | ||
kind: pipeline | ||
|
||
steps: | ||
- name: example | ||
image: busybox | ||
commands: | ||
- echo this is build number $DRONE_BUILD_NUMBER | ||
- echo commit author is $DRONE_COMMIT_AUTHOR | ||
- echo branch is $DRONE_BRANCH | ||
- echo this is pull request number $DRONE_PULL_REQUEST | ||
- echo repo name is $DRONE_REPO_NAME | ||
|
||
- name: publish | ||
image: plugins/docker | ||
settings: | ||
repo: gcr.io/example/repo | ||
tags: | ||
- 1.0.${DRONE_BUILD_NUMBER} | ||
- ${DRONE_BRANCH}-${DRONE_COMMIT_SHA} | ||
|
||
- name: notify | ||
image: plugins/slack | ||
settings: | ||
channel: builds | ||
message: Build $DRONE_BUILD_NUMBER completed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: default | ||
options: {} | ||
stages: | ||
- name: default | ||
spec: | ||
clone: {} | ||
runtime: | ||
spec: {} | ||
type: machine | ||
steps: | ||
- name: example | ||
spec: | ||
image: busybox | ||
run: |- | ||
echo this is build number <+pipeline.sequenceId> | ||
echo commit author is <+codebase.gitUserId> | ||
echo branch is <+codebase.branch> | ||
echo this is pull request number <+codebase.prNumber> | ||
echo repo name is <+<+codebase.repoUrl>.substring(<+codebase.repoUrl>.lastIndexOf('/') + 1)> | ||
type: script | ||
- name: publish | ||
spec: | ||
image: plugins/docker | ||
with: | ||
repo: gcr.io/example/repo | ||
tags: | ||
- 1.0.<+pipeline.sequenceId> | ||
- <+codebase.branch>-<+codebase.commitSha> | ||
type: plugin | ||
- name: notify | ||
spec: | ||
image: plugins/slack | ||
with: | ||
channel: builds | ||
message: Build <+pipeline.sequenceId> completed | ||
type: plugin | ||
type: ci | ||
version: 1 |