mirror of
https://github.com/drone/drone-git.git
synced 2026-06-16 14:50:26 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56e4928d73 | |||
| 70fe2c5f68 | |||
| f006eebba3 | |||
| 937b910001 | |||
| 6647ff2107 | |||
| a0b9eebc4f | |||
| e82207b591 | |||
| 21eadbab5b | |||
| b3e3302ecf |
@@ -1,5 +1,5 @@
|
|||||||
FROM alpine:3.12
|
FROM alpine:3.13
|
||||||
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli
|
||||||
|
|
||||||
ADD posix/* /usr/local/bin/
|
ADD posix/* /usr/local/bin/
|
||||||
ENTRYPOINT ["/usr/local/bin/clone"]
|
ENTRYPOINT ["/usr/local/bin/clone"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM arm32v6/alpine:3.12
|
FROM arm32v6/alpine:3.13
|
||||||
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
||||||
|
|
||||||
ADD posix/* /usr/local/bin/
|
ADD posix/* /usr/local/bin/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM arm32v6/alpine:3.12
|
FROM arm32v6/alpine:3.13
|
||||||
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
||||||
|
|
||||||
ADD posix/* /usr/local/bin/
|
ADD posix/* /usr/local/bin/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM arm64v8/alpine:3.12
|
FROM arm64v8/alpine:3.13
|
||||||
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
||||||
|
|
||||||
ADD posix/* /usr/local/bin/
|
ADD posix/* /usr/local/bin/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM arm32v6/alpine:3.12
|
FROM arm32v6/alpine:3.13
|
||||||
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
||||||
|
|
||||||
ADD posix/* /usr/local/bin/
|
ADD posix/* /usr/local/bin/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM arm64v8/alpine:3.12
|
FROM arm64v8/alpine:3.13
|
||||||
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl
|
||||||
|
|
||||||
ADD posix/* /usr/local/bin/
|
ADD posix/* /usr/local/bin/
|
||||||
|
|||||||
+12
@@ -29,6 +29,18 @@ if [[ ! -z "${DRONE_SSH_KEY}" ]]; then
|
|||||||
ssh-keyscan -H ${DRONE_NETRC_MACHINE} > /etc/ssh/ssh_known_hosts 2> /dev/null
|
ssh-keyscan -H ${DRONE_NETRC_MACHINE} > /etc/ssh/ssh_known_hosts 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# AWS codecommit support using AWS access key & secret key
|
||||||
|
# Refer: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-unixes.html
|
||||||
|
|
||||||
|
if [[ ! -z "$DRONE_AWS_ACCESS_KEY" ]]; then
|
||||||
|
aws configure set aws_access_key_id $DRONE_AWS_ACCESS_KEY
|
||||||
|
aws configure set aws_secret_access_key $DRONE_AWS_SECRET_KEY
|
||||||
|
aws configure set default.region $DRONE_AWS_REGION
|
||||||
|
|
||||||
|
git config --global credential.helper '!aws codecommit credential-helper $@'
|
||||||
|
git config --global credential.UseHttpPath true
|
||||||
|
fi
|
||||||
|
|
||||||
# configure git global behavior and parameters via the
|
# configure git global behavior and parameters via the
|
||||||
# following environment variables:
|
# following environment variables:
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -166,7 +166,7 @@ func TestPullRequest(t *testing.T) {
|
|||||||
cmd.Dir = local
|
cmd.Dir = local
|
||||||
cmd.Env = []string{
|
cmd.Env = []string{
|
||||||
fmt.Sprintf("DRONE_COMMIT_REF=%s", "refs/pull/14596/head"),
|
fmt.Sprintf("DRONE_COMMIT_REF=%s", "refs/pull/14596/head"),
|
||||||
fmt.Sprintf("DRONE_COMMIT_BRANCH=%s", "master"),
|
fmt.Sprintf("DRONE_COMMIT_BRANCH=%s", "main"),
|
||||||
fmt.Sprintf("DRONE_COMMIT_SHA=%s", "26923a8f37933ccc23943de0d4ebd53908268582"),
|
fmt.Sprintf("DRONE_COMMIT_SHA=%s", "26923a8f37933ccc23943de0d4ebd53908268582"),
|
||||||
fmt.Sprintf("DRONE_WORKSPACE=%s", local),
|
fmt.Sprintf("DRONE_WORKSPACE=%s", local),
|
||||||
fmt.Sprintf("DRONE_REMOTE_URL=%s", remote),
|
fmt.Sprintf("DRONE_REMOTE_URL=%s", remote),
|
||||||
@@ -195,7 +195,7 @@ func TestPullRequest(t *testing.T) {
|
|||||||
t.Errorf("Want commit %s, got %s", want, got)
|
t.Errorf("Want commit %s, got %s", want, got)
|
||||||
}
|
}
|
||||||
|
|
||||||
if want, got := "master", branch; got != want {
|
if want, got := "main", branch; got != want {
|
||||||
t.Errorf("Want branch %s, got %s", want, got)
|
t.Errorf("Want branch %s, got %s", want, got)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user