This repository has been archived by the owner on Jun 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
90 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
version: 2.1 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/buildpack-deps:latest | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- run: | ||
name: Build Docker image | ||
command: | | ||
docker build --target builder -t letsencrypt-inwx-builder . | ||
docker build -t kegato/letsencrypt-inwx:latest . | ||
- run: | ||
name: Extract Artifacts | ||
command: | | ||
mkdir artifacts | ||
docker save -o image.tar kegato/letsencrypt-inwx:latest | ||
docker create --name builder letsencrypt-inwx-builder | ||
docker cp builder:/home/rust/src/target/x86_64-unknown-linux-musl/release/letsencrypt-inwx . | ||
docker cp builder:/home/rust/src/target/x86_64-unknown-linux-musl/debian . | ||
mv debian/*.deb artifacts/letsencrypt-inwx.deb | ||
zip artifacts/letsencrypt-inwx.zip letsencrypt-inwx | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ./artifacts | ||
- ./image.tar | ||
|
||
publish-docker-image: | ||
docker: | ||
- image: circleci/buildpack-deps:latest | ||
steps: | ||
- attach_workspace: | ||
at: ./workspace | ||
- setup_remote_docker | ||
- run: | ||
name: Load archived Docker image | ||
command: docker load -i ./workspace/image.tar | ||
- run: | ||
name: Publish Docker Image to Docker Hub | ||
command: | | ||
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | ||
docker push kegato/letsencrypt-inwx:latest | ||
publish-github-release: | ||
docker: | ||
- image: circleci/golang:latest | ||
steps: | ||
- attach_workspace: | ||
at: ./workspace | ||
- run: | ||
name: "Publish Release on GitHub" | ||
command: | | ||
go get github.com/tcnksm/ghr | ||
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./workspace/artifacts/ | ||
publish-crate: | ||
docker: | ||
- image: circleci/rust:latest | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Publish crate to crates.io" | ||
command: | | ||
cargo login ${CRATES_IO_TOKEN} | ||
cargo publish | ||
workflows: | ||
version: 2 | ||
main: | ||
jobs: | ||
- build | ||
- publish-docker-image: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
only: /^[0-9]+\.[0-9]+\.[0-9]+$/ | ||
- publish-github-release: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
only: /^[0-9]+\.[0-9]+\.[0-9]+$/ | ||
- publish-crate: | ||
filters: | ||
tags: | ||
only: /^[0-9]+\.[0-9]+\.[0-9]+$/ |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/.vscode | ||
/.git | ||
/.gitignore | ||
/.travis-yml | ||
/.circleci | ||
/target | ||
/LICENSE.txt | ||
/README.md | ||
|
This file was deleted.
Oops, something went wrong.
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