Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Step Issuer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
smallstep
Step Issuer
Commits
30def653
Commit
30def653
authored
3 years ago
by
Carl Tashian
Browse files
Options
Downloads
Patches
Plain Diff
GoReleaser WIP
parent
fb88b227
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.github/workflows/release.yml
+41
-0
41 additions, 0 deletions
.github/workflows/release.yml
.goreleaser.yml
+39
-0
39 additions, 0 deletions
.goreleaser.yml
Dockerfile
+1
-2
1 addition, 2 deletions
Dockerfile
Makefile
+1
-64
1 addition, 64 deletions
Makefile
with
82 additions
and
66 deletions
.github/workflows/release.yml
0 → 100644
+
41
−
0
View file @
30def653
name
:
Create Release & Upload Assets
on
:
push
:
tags
:
-
'
v*'
# Push events matching v*, ie, v1.0, v0.85-rc3
jobs
:
goreleaser
:
name
:
Build and publish a release with GoReleaser
runs-on
:
ubuntu-20.04
needs
:
create_release
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
with
:
fetch-depth
:
0
-
name
:
Set up Go
uses
:
actions/setup-go@v2
with
:
go-version
:
1.17
-
name
:
Configure Go
id
:
configure_go
run
:
|
PATH=$PATH:/usr/local/go/bin:/home/admin/go/bin
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v1
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
-
name
:
Run GoReleaser
uses
:
goreleaser/goreleaser-action@v2
with
:
version
:
latest
args
:
release --rm-dist
This diff is collapsed.
Click to expand it.
.goreleaser.yml
0 → 100644
+
39
−
0
View file @
30def653
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
builds
:
-
env
:
-
CGO_ENABLED=0
goos
:
-
linux
binary
:
manager
dockers
:
-
goarch
:
amd64
use
:
buildx
build_flag_templates
:
-
"
--platform=linux/amd64"
image_templates
:
-
"
docker.io/smallstep/step-issuer:latest-amd64"
-
"
docker.io/smallstep/step-issuer:{{
.RawVersion
}}-amd64"
-
goarch
:
arm64
use
:
buildx
build_flag_templates
:
-
"
--platform=linux/arm64"
image_templates
:
-
"
docker.io/smallstep/step-issuer:latest-arm64"
-
"
docker.io/smallstep/step-issuer:{{
.RawVersion
}}-arm64"
docker_manifests
:
-
name_template
:
"
smallstep/step-issuer:{{
.RawVersion
}}"
image_templates
:
-
"
docker.io/smallstep/step-issuer:{{
.RawVersion
}}-arm64"
-
"
docker.io/smallstep/step-issuer:{{
.RawVersion
}}-amd64"
checksum
:
name_template
:
'
checksums.txt'
snapshot
:
name_template
:
"
{{
incpatch
.Version
}}-next"
changelog
:
sort
:
asc
This diff is collapsed.
Click to expand it.
Dockerfile
+
1
−
2
View file @
30def653
# Use distroless as minimal base image to package the manager binary
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM
gcr.io/distroless/static:latest
FROM
gcr.io/distroless/static:latest
ARG
BINPATH="docker/bin/manager"
WORKDIR
/
WORKDIR
/
COPY
$BINPATH .
COPY
manager manager
ENTRYPOINT
["/manager"]
ENTRYPOINT
["/manager"]
This diff is collapsed.
Click to expand it.
Makefile
+
1
−
64
View file @
30def653
...
@@ -154,74 +154,11 @@ endif
...
@@ -154,74 +154,11 @@ endif
.PHONY
:
clean
.PHONY
:
clean
#################################################
# Docker
#################################################
DOCKER_OUTPUT
=
$(
OUTPUT_ROOT
)
docker/
DOCKER_MAKE
=
V
=
$V
GOOS_OVERRIDE
=
'GOOS=linux GOARCH=amd64'
PREFIX
=
$(
1
)
make
$(
1
)
bin/
$(
2
)
DOCKER_BUILD
=
$Q
docker build
-t
$(
IMG
)
-f
$(
2
)
--build-arg
BINPATH
=
$(
DOCKER_OUTPUT
)
bin/
$(
1
)
.
docker
:
docker-make Dockerfile
$(
call DOCKER_BUILD,manager,Dockerfile
)
docker-make
:
$Q
mkdir
-p
$(
DOCKER_OUTPUT
)
$(
call DOCKER_MAKE,
$(
DOCKER_OUTPUT
)
,manager
)
.PHONY
:
docker docker-make
# Make sure to run a local registry
# docker run -d -p 5000:5000 --restart=always --name registry registry:2
docker-dev
:
docker
$Q
docker tag
${
IMG
}
localhost:5000/
${
IMG
}
$Q
docker push localhost:5000/
${
IMG
}
.PHONY
:
docker-dev
#################################################
# Releasing Docker Images
#################################################
DOCKER_TAG
=
docker tag smallstep/
$(
1
)
:latest smallstep/
$(
1
)
:
$(
2
)
DOCKER_PUSH
=
docker push smallstep/
$(
1
)
:
$(
2
)
docker-tag
:
$(
call DOCKER_TAG,step-issuer,
$(
VERSION
))
docker-push-tag
:
docker-tag
$(
call DOCKER_PUSH,step-issuer,
$(
VERSION
))
docker-push-tag-latest
:
$(
call DOCKER_PUSH,step-issuer,latest
)
# Rely on DOCKER_USERNAME and DOCKER_PASSWORD being set inside the CI or
# equivalent environment
docker-login
:
$Q
docker login
-u
=
"
$(
DOCKER_USERNAME
)
"
-p
=
"
$(
DOCKER_PASSWORD
)
"
.PHONY
:
docker-login docker-tag docker-push-tag docker-push-tag-latest
#################################################
# Targets for pushing the docker images
#################################################
# For all builds we build the docker container
docker-master
:
docker
# For all builds with a release candidate tag
docker-release-candidate
:
docker-master docker-login docker-push-tag
# For all builds with a release tag
docker-release
:
docker-release-candidate docker-push-tag-latest
.PHONY
:
docker-master docker-release-candidate docker-release
#################################################
#################################################
# Targets for creating step artifacts
# Targets for creating step artifacts
#################################################
#################################################
# This command is called by travis directly *after* a successful build
# This command is called by travis directly *after* a successful build
artifacts
:
docker-$(PUSHTYPE)
artifacts
:
.PHONY
:
artifacts
.PHONY
:
artifacts
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment