mirror of
https://github.com/openziti/zrok.git
synced 2025-02-23 21:51:27 +01:00
Merge pull request #298 from openziti/v0.3.6-backport-container
V0.3.6 backport container fixes
This commit is contained in:
commit
ddeb130ad2
6
.github/workflows/ci-build.yml
vendored
6
.github/workflows/ci-build.yml
vendored
@ -91,12 +91,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Set Up Container Image Tags for zrok CLI Container
|
- name: Set Up Container Image Tags for zrok CLI Container
|
||||||
env:
|
env:
|
||||||
RELEASE_REPO: openziti/zrok
|
ZROK_CONTAINER_IMAGE_REPO: ${{ vars.ZROK_CONTAINER_IMAGE_REPO || 'openziti/zrok' }}
|
||||||
ZROK_VERSION: ${{ steps.slug.outputs.branch_tag }}
|
ZROK_CONTAINER_IMAGE_TAG: ${{ steps.slug.outputs.branch_tag }}
|
||||||
id: tagprep_cli
|
id: tagprep_cli
|
||||||
run: |
|
run: |
|
||||||
DOCKER_TAGS=""
|
DOCKER_TAGS=""
|
||||||
DOCKER_TAGS="${RELEASE_REPO}:${ZROK_VERSION}"
|
DOCKER_TAGS="${ZROK_CONTAINER_IMAGE_REPO}:${ZROK_CONTAINER_IMAGE_TAG}"
|
||||||
echo "DEBUG: DOCKER_TAGS=${DOCKER_TAGS}"
|
echo "DEBUG: DOCKER_TAGS=${DOCKER_TAGS}"
|
||||||
echo DOCKER_TAGS="${DOCKER_TAGS}" >> $GITHUB_OUTPUT
|
echo DOCKER_TAGS="${DOCKER_TAGS}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# this builds docker.io/openziti/zrok
|
# this builds docker.io/openziti/zrok
|
||||||
FROM registry.access.redhat.com/ubi8/ubi-minimal
|
FROM docker.io/openziti/ziti-cli:0.27.9
|
||||||
# This build stage grabs artifacts that are copied into the final image.
|
# This build stage grabs artifacts that are copied into the final image.
|
||||||
# It uses the same base as the final image to maximize docker cache hits.
|
# It uses the same base as the final image to maximize docker cache hits.
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ LABEL name="openziti/zrok" \
|
|||||||
USER root
|
USER root
|
||||||
|
|
||||||
### add licenses to this directory
|
### add licenses to this directory
|
||||||
RUN mkdir -m0755 /licenses
|
RUN mkdir -p -m0755 /licenses
|
||||||
COPY ./LICENSE /licenses/apache.txt
|
COPY ./LICENSE /licenses/apache.txt
|
||||||
|
|
||||||
RUN mkdir -p /usr/local/bin
|
RUN mkdir -p /usr/local/bin
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"regexp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (zrd *ZrokDir) Client() (*rest_client_zrok.Zrok, error) {
|
func (zrd *ZrokDir) Client() (*rest_client_zrok.Zrok, error) {
|
||||||
@ -27,7 +27,10 @@ func (zrd *ZrokDir) Client() (*rest_client_zrok.Zrok, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "error getting version from api endpoint '%v': %v", apiEndpoint, err)
|
return nil, errors.Wrapf(err, "error getting version from api endpoint '%v': %v", apiEndpoint, err)
|
||||||
}
|
}
|
||||||
if !strings.HasPrefix(string(v.Payload), build.Series) {
|
// allow reported version string to be optionally prefixed with
|
||||||
|
// "refs/heads/" or "refs/tags/"
|
||||||
|
re := regexp.MustCompile(`^(refs/(heads|tags)/)?` + build.Series)
|
||||||
|
if ! re.MatchString(string(v.Payload)) {
|
||||||
return nil, errors.Errorf("expected a '%v' version, received: '%v'", build.Series, v.Payload)
|
return nil, errors.Errorf("expected a '%v' version, received: '%v'", build.Series, v.Payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user