mirror of
https://github.com/drone-plugins/drone-manifest.git
synced 2026-06-16 14:49:38 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 79f04ad380 | |||
| 1534739ff3 | |||
| 360ce58823 | |||
| 40b2fb9008 | |||
| 5608ff1c49 |
+10
-10
@@ -26,11 +26,11 @@ build_script:
|
||||
}
|
||||
|
||||
docker pull microsoft/nanoserver:10.0.14393.1593
|
||||
docker build -f Dockerfile.windows -t plugins/manifest:windows .
|
||||
docker build -f Dockerfile.windows -t plugins/manifest:windows-amd64 .
|
||||
|
||||
test_script:
|
||||
- ps: |
|
||||
docker run --rm plugins/manifest:windows --version
|
||||
docker run --rm plugins/manifest:windows-amd64 --version
|
||||
|
||||
deploy_script:
|
||||
- ps: |
|
||||
@@ -44,19 +44,19 @@ deploy_script:
|
||||
if ( $env:APPVEYOR_REPO_TAG -eq 'true' ) {
|
||||
$major,$minor,$patch = $env:APPVEYOR_REPO_TAG_NAME.substring(1).split('.')
|
||||
|
||||
docker push plugins/manifest:windows
|
||||
docker push plugins/manifest:windows-amd64
|
||||
|
||||
docker tag plugins/manifest:windows plugins/manifest:$major.$minor.$patch-windows
|
||||
docker push plugins/manifest:$major.$minor.$patch-windows
|
||||
docker tag plugins/manifest:windows-amd64 plugins/manifest:$major.$minor.$patch-windows-amd64
|
||||
docker push plugins/manifest:$major.$minor.$patch-windows-amd64
|
||||
|
||||
docker tag plugins/manifest:windows plugins/manifest:$major.$minor-windows
|
||||
docker push plugins/manifest:$major.$minor-windows
|
||||
docker tag plugins/manifest:windows-amd64 plugins/manifest:$major.$minor-windows-amd64
|
||||
docker push plugins/manifest:$major.$minor-windows-amd64
|
||||
|
||||
docker tag plugins/manifest:windows plugins/manifest:$major-windows
|
||||
docker push plugins/manifest:$major-windows
|
||||
docker tag plugins/manifest:windows-amd64 plugins/manifest:$major-windows-amd64
|
||||
docker push plugins/manifest:$major-windows-amd64
|
||||
} else {
|
||||
if ( $env:APPVEYOR_REPO_BRANCH -eq 'master' ) {
|
||||
docker push plugins/manifest:windows
|
||||
docker push plugins/manifest:windows-amd64
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-31
@@ -45,6 +45,22 @@ pipeline:
|
||||
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-manifest
|
||||
fi
|
||||
|
||||
build_linux_arm64:
|
||||
image: golang:1.9
|
||||
pull: true
|
||||
group: build
|
||||
environment:
|
||||
- GOOS=linux
|
||||
- GOARCH=arm64
|
||||
- CGO_ENABLED=0
|
||||
commands:
|
||||
- |
|
||||
if test "${DRONE_TAG}" = ""; then
|
||||
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-manifest
|
||||
else
|
||||
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-manifest
|
||||
fi
|
||||
|
||||
build_linux_arm:
|
||||
image: golang:1.9
|
||||
pull: true
|
||||
@@ -62,22 +78,6 @@ pipeline:
|
||||
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-manifest
|
||||
fi
|
||||
|
||||
build_linux_arm64:
|
||||
image: golang:1.9
|
||||
pull: true
|
||||
group: build
|
||||
environment:
|
||||
- GOOS=linux
|
||||
- GOARCH=arm64
|
||||
- CGO_ENABLED=0
|
||||
commands:
|
||||
- |
|
||||
if test "${DRONE_TAG}" = ""; then
|
||||
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-manifest
|
||||
else
|
||||
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-manifest
|
||||
fi
|
||||
|
||||
publish_linux_amd64:
|
||||
image: plugins/docker:17.05
|
||||
pull: true
|
||||
@@ -85,7 +85,7 @@ pipeline:
|
||||
group: docker
|
||||
repo: plugins/manifest
|
||||
auto_tag: true
|
||||
auto_tag_suffix: amd64
|
||||
auto_tag_suffix: linux-amd64
|
||||
dockerfile: Dockerfile
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
@@ -97,23 +97,11 @@ pipeline:
|
||||
group: docker
|
||||
repo: plugins/manifest
|
||||
auto_tag: true
|
||||
auto_tag_suffix: i386
|
||||
auto_tag_suffix: linux-i386
|
||||
dockerfile: Dockerfile.i386
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
|
||||
publish_linux_arm:
|
||||
image: plugins/docker:17.05
|
||||
pull: true
|
||||
secrets: [ docker_username, docker_password ]
|
||||
group: docker
|
||||
repo: plugins/manifest
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm
|
||||
dockerfile: Dockerfile.arm
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
|
||||
publish_linux_arm64:
|
||||
image: plugins/docker:17.05
|
||||
pull: true
|
||||
@@ -121,11 +109,23 @@ pipeline:
|
||||
group: docker
|
||||
repo: plugins/manifest
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm64
|
||||
auto_tag_suffix: linux-arm64
|
||||
dockerfile: Dockerfile.arm64
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
|
||||
publish_linux_arm:
|
||||
image: plugins/docker:17.05
|
||||
pull: true
|
||||
secrets: [ docker_username, docker_password ]
|
||||
group: docker
|
||||
repo: plugins/manifest
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm
|
||||
dockerfile: Dockerfile.arm
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
|
||||
manifests:
|
||||
image: plugins/manifest:1
|
||||
pull: true
|
||||
|
||||
+1
-4
@@ -1,10 +1,7 @@
|
||||
FROM alpine:3.6 as base
|
||||
|
||||
ENV MANIFEST_VERSION 0.7.0
|
||||
ENV MANIFEST_URL https://github.com/estesp/manifest-tool/releases/download/v${MANIFEST_VERSION}/manifest-tool-linux-amd64
|
||||
|
||||
RUN apk add --no-cache curl && \
|
||||
curl -sSLo /bin/manifest-tool ${MANIFEST_URL} && \
|
||||
curl -sSLo /bin/manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-linux-amd64 && \
|
||||
chmod +x /bin/manifest-tool
|
||||
|
||||
FROM plugins/base:multiarch
|
||||
|
||||
+3
-4
@@ -1,10 +1,7 @@
|
||||
FROM alpine:3.6 as base
|
||||
|
||||
ENV MANIFEST_VERSION 0.7.0
|
||||
ENV MANIFEST_URL https://github.com/estesp/manifest-tool/releases/download/v${MANIFEST_VERSION}/manifest-tool-linux-armv7
|
||||
|
||||
RUN apk add --no-cache curl && \
|
||||
curl -sSLo /bin/manifest-tool ${MANIFEST_URL} && \
|
||||
curl -sSLo /bin/manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-linux-armv7 && \
|
||||
chmod +x /bin/manifest-tool
|
||||
|
||||
FROM plugins/base:multiarch
|
||||
@@ -14,5 +11,7 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
|
||||
org.label-schema.vendor="Drone.IO Community" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
COPY --from=base /bin/manifest-tool /bin/
|
||||
|
||||
ADD release/linux/arm/drone-manifest /bin/
|
||||
ENTRYPOINT ["/bin/drone-manifest"]
|
||||
|
||||
+3
-4
@@ -1,10 +1,7 @@
|
||||
FROM alpine:3.6 as base
|
||||
|
||||
ENV MANIFEST_VERSION 0.7.0
|
||||
ENV MANIFEST_URL https://github.com/estesp/manifest-tool/releases/download/v${MANIFEST_VERSION}/manifest-tool-linux-arm64
|
||||
|
||||
RUN apk add --no-cache curl && \
|
||||
curl -sSLo /bin/manifest-tool ${MANIFEST_URL} && \
|
||||
curl -sSLo /bin/manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-linux-arm64 && \
|
||||
chmod +x /bin/manifest-tool
|
||||
|
||||
FROM plugins/base:multiarch
|
||||
@@ -14,5 +11,7 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
|
||||
org.label-schema.vendor="Drone.IO Community" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
COPY --from=base /bin/manifest-tool /bin/
|
||||
|
||||
ADD release/linux/arm64/drone-manifest /bin/
|
||||
ENTRYPOINT ["/bin/drone-manifest"]
|
||||
|
||||
+3
-4
@@ -1,10 +1,7 @@
|
||||
FROM alpine:3.6 as base
|
||||
|
||||
ENV MANIFEST_VERSION 0.7.0
|
||||
ENV MANIFEST_URL https://github.com/estesp/manifest-tool/releases/download/v${MANIFEST_VERSION}/manifest-tool-linux-386
|
||||
|
||||
RUN apk add --no-cache curl && \
|
||||
curl -sSLo /bin/manifest-tool ${MANIFEST_URL} && \
|
||||
curl -sSLo /bin/manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-linux-386 && \
|
||||
chmod +x /bin/manifest-tool
|
||||
|
||||
FROM plugins/base:multiarch
|
||||
@@ -14,5 +11,7 @@ LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
|
||||
org.label-schema.vendor="Drone.IO Community" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
COPY --from=base /bin/manifest-tool /bin/
|
||||
|
||||
ADD release/linux/i386/drone-manifest /bin/
|
||||
ENTRYPOINT ["/bin/drone-manifest"]
|
||||
|
||||
+6
-8
@@ -1,16 +1,14 @@
|
||||
# escape=`
|
||||
FROM microsoft/nanoserver:10.0.14393.1593
|
||||
|
||||
ENV MANIFEST_VERSION 0.7.0
|
||||
ENV MANIFEST_URL https://github.com/estesp/manifest-tool/releases/download/v${MANIFEST_VERSION}/manifest-tool-windows-amd64.exe
|
||||
|
||||
RUN powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; `
|
||||
Invoke-WebRequest -Uri $env:MANIFEST_URL -OutFile "C:\Windows\System32\manifest-tool.exe"
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
|
||||
org.label-schema.name="Drone Manifest" `
|
||||
org.label-schema.vendor="Drone.IO Community" `
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ADD drone-manifest.exe /drone-manifest.exe
|
||||
ENTRYPOINT [ "\\drone-manifest.exe" ]
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
|
||||
RUN Invoke-WebRequest 'https://github.com/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-windows-amd64.exe' -OutFile 'c:\Windows\System32\manifest-tool.exe';
|
||||
|
||||
ADD drone-manifest.exe c:\drone-manifest.exe
|
||||
ENTRYPOINT [ "c:\\drone-manifest.exe" ]
|
||||
|
||||
@@ -33,5 +33,7 @@ docker run --rm \
|
||||
-e PLUGIN_PLATFORMS=linux/amd64,linux/arm,linux/arm64 \
|
||||
-e PLUGIN_TEMPLATE=organization/project-ARCH:1.0.0 \
|
||||
-e PLUGIN_TARGET=organization/project:1.0.0 \
|
||||
-v $(pwd):$(pwd) \
|
||||
-w $(pwd) \
|
||||
plugins/manifest
|
||||
```
|
||||
|
||||
+5
-5
@@ -7,27 +7,27 @@ tags:
|
||||
{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}amd64
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
-
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}i386
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-i386
|
||||
platform:
|
||||
architecture: 386
|
||||
os: linux
|
||||
-
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}arm64
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
-
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}arm
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
-
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows
|
||||
image: plugins/manifest:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: windows
|
||||
|
||||
Reference in New Issue
Block a user