Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature release 0.3.1 #6

Merged
merged 8 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.1] - 2023-10-15
### Added
* The version command

### Changed
* The target container registry to icr global

### Removed
* Now the test relies only to the standard tool

### Fixed


## [0.3.0] - 2023-10-15
### Added
* Minimal support for GitHub actions
Expand Down Expand Up @@ -83,7 +96,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed


[Unreleased]: https://github.com/jjuarez/simple-prober/compare/0.3.0...HEAD
[Unreleased]: https://github.com/jjuarez/simple-prober/compare/0.3.1...HEAD
[0.3.1]: https://github.com/jjuarez/simple-prober/compare/0.3.0...0.3.1
[0.3.0]: https://github.com/jjuarez/simple-prober/compare/0.2.2...0.3.0
[0.2.2]: https://github.com/jjuarez/simple-prober/compare/0.2.1...0.2.2
[0.2.1]: https://github.com/jjuarez/simple-prober/compare/0.2.0...0.2.1
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ FROM alpine:3.18.4 AS runtime
ARG UID=1001

COPY --from=builder --chown=1001:1001 /build/dist/simple-prober /usr/local/bin/simple-prober
WORKDIR /app
RUN mkdir -p config
USER ${UID}
VOLUME /endpoints.yaml
CMD [ "simple-prober", "check", "--config", "/endpoints.yaml", "--timeout", "5", "--loglevel", "debug" ]
VOLUME config/endpoints.yaml
CMD [ "simple-prober", "check", "--config", "config/endpoints.yaml", "--timeout", "5", "--loglevel", "debug" ]
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
GOARCH := $(shell go env GOARCH)
GOOS := $(shell go env GOOS)
GO := $(GOBIN)/go
GOTEST ?= $(shell command -v gotest 2>/dev/null)
GOLINT ?= $(shell command -v golangci-lint 2>/dev/null)
EXECUTABLE ?= dist/simple-prober
#EXECUTABLE ?= dist/simple-prober-$(GOOS)_$(GOARCH)

DOCKER_REGISTRY ?= docker.io
DOCKER_REGISTRY_NAMESPACE ?= jjuarez
DOCKER_REGISTRY ?= icr.io
DOCKER_REGISTRY_NAMESPACE ?= qc-production-ext-images
DOCKER_SERVICE_NAME ?= simple-prober
DOCKER_IMAGE := $(DOCKER_REGISTRY)/$(DOCKER_REGISTRY_NAMESPACE)/$(DOCKER_SERVICE_NAME)
DOCKER_TARGET ?= runtime
Expand Down Expand Up @@ -57,17 +56,12 @@ endif

.PHONY: test
test: ## Unit tests
ifdef GOTEST
@$(GOTEST) -v ./...
else
@$(GO) test -v ./...
endif

.PHONY: docker/login
docker/login:
$(call assert-set,DOCKER_USERNAME)
$(call assert-set,DOCKER_TOKEN)
@echo $(DOCKER_TOKEN)|docker login --username $(DOCKER_USERNAME) --password-stdin $(DOCKER_REGISTRY)
.PHONY: icr.io/login
icr.io/login:
$(call assert-set,IBMCLOUD_API_KEY)
@echo $(IBMCLOUD_API_KEY)|docker login --username iamapikey --password-stdin $(DOCKER_REGISTRY)

.PHONY: docker/build
docker/build: ## Makes the Docker build and takes care of the remote cache by target
Expand Down
6 changes: 3 additions & 3 deletions ci/deployment/k8s/chart/simple-prober/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ cron:
concurrencyPolicy: Replace

image:
repository: docker.io
namespace: jjuarez
name: simple-prober
pullPolicy: Always
repository: icr.io
namespace: qc-production-ext-images
name: simple-prober
tag: latest

imagePullSecrets: []
Expand Down
6 changes: 3 additions & 3 deletions ci/deployment/k8s/chart/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ cron:
scheduledExpression: "0 * * * *"

image:
repository: us.icr.io
pullPolicy: Always
repository: icr.io
namespace: qc-production-ext-images
name: simple-prober
pullPolicy: Always
tag: 0.3.0
tag: latest

imagePullSecrets:
- name: all-icr-io
12 changes: 3 additions & 9 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ import (
"github.com/spf13/cobra"
)

var (
// Version ...
Version string = "v0.0.0+unknown"
)

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "simple-prober",
Version: Version,
Short: "simple-prober - a really simple TPC tester",
Long: `This utility will allow you to test several TCP endpoints provided by a configuration file.`,
Use: "simple-prober",
Short: "simple-prober - a really simple TPC tester",
Long: `This utility will allow you to test several TCP endpoints provided by a configuration file.`,
Run: func(cmd *cobra.Command, arg []string) {
},
}
Expand Down
27 changes: 27 additions & 0 deletions cmd/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Package cmd This is only the root command, a placeholder.
package cmd

import (
"fmt"

"github.com/spf13/cobra"
)

var (
// Version ...
Version string = "v0.0.0+unknown"
)

// versionCmd shows the tool version
var versionCmd = &cobra.Command{
Use: "version",
Version: Version,
Short: "Shows the tool version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("version: %s\n", Version)
},
}

func init() {
rootCmd.AddCommand(versionCmd)
}
1 change: 1 addition & 0 deletions internal/codes/codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const (

// ReadError ...
ReadError Code = 1001

// UnmarshalError ...
UnmarshalError Code = 1002

Expand Down