-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat/passport-image
- Loading branch information
Showing
6 changed files
with
124 additions
and
90 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 |
---|---|---|
|
@@ -10,29 +10,29 @@ env: | |
|
||
jobs: | ||
converge: | ||
name: Converge | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
name: Skaffold Build To Github | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install werf | ||
uses: werf/actions/[email protected] | ||
|
||
- name: Log in to registry | ||
# This is where you will update the personal access token to GITHUB_TOKEN | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
|
||
- name: Run echo | ||
run: | | ||
werf version | ||
docker version | ||
echo $GITHUB_REPOSITORY | ||
echo $GITHUB_SHA | ||
- name: Run Build | ||
run: | | ||
. $(werf ci-env github --as-file) | ||
werf export service --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA | ||
- name: Cache layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: "${{ github.workspace }}/.skaffold/cache" | ||
key: skaffold-${{ hashFiles('**/cache') }} | ||
restore-keys: | | ||
skaffold- | ||
- name: Run Skaffold pipeline as command | ||
uses: hiberbee/github-action-skaffold@latest | ||
id: build | ||
with: | ||
command: build --tag ${{ github.sha }} | ||
repository: ghcr.io/${{ github.repository_owner }} |
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 |
---|---|---|
|
@@ -10,29 +10,29 @@ env: | |
|
||
jobs: | ||
converge: | ||
name: Converge | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
name: Skaffold Build To Github | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install werf | ||
uses: werf/actions/[email protected] | ||
|
||
- name: Log in to registry | ||
# This is where you will update the personal access token to GITHUB_TOKEN | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
|
||
- name: Run echo | ||
run: | | ||
werf version | ||
docker version | ||
echo $GITHUB_REPOSITORY | ||
echo $GITHUB_REF_NAME | ||
- name: Run Build | ||
run: | | ||
. $(werf ci-env github --as-file) | ||
werf export service --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME | ||
- name: Cache layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: "${{ github.workspace }}/.skaffold/cache" | ||
key: skaffold-${{ hashFiles('**/cache') }} | ||
restore-keys: | | ||
skaffold- | ||
- name: Run Skaffold pipeline as command | ||
uses: hiberbee/github-action-skaffold@latest | ||
id: build | ||
with: | ||
command: build --tag ${{ github.ref_name }} | ||
repository: ghcr.io/${{ github.repository_owner }} |
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,17 +1,24 @@ | ||
FROM golang:1.20-alpine as buildbase | ||
FROM golang:1.22.2-alpine as buildbase | ||
|
||
RUN apk add git build-base | ||
ARG CI_JOB_TOKEN | ||
|
||
RUN apk add git build-base ca-certificates | ||
WORKDIR /go/src/github.com/rarimo/geo-forms-svc | ||
COPY vendor . | ||
COPY . . | ||
|
||
RUN GOOS=linux go build -o /usr/local/bin/geo-forms-svc /go/src/github.com/rarimo/geo-forms-svc | ||
RUN git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com".insteadOf https://gitlab.com | ||
RUN git config --global url."https://${CI_JOB_TOKEN}@github.com/".insteadOf https://github.com/ | ||
RUN go env -w GOPRIVATE=github.com/*,gitlab.com/* | ||
|
||
RUN go mod tidy && go mod vendor | ||
RUN CGO_ENABLED=1 GO111MODULE=on GOOS=linux go build -o /usr/local/bin/geo-forms-svc /go/src/github.com/rarimo/geo-forms-svc | ||
|
||
FROM alpine:3.9 | ||
FROM scratch | ||
COPY --from=alpine:3.9 /bin/sh /bin/sh | ||
COPY --from=alpine:3.9 /usr /usr | ||
COPY --from=alpine:3.9 /lib /lib | ||
|
||
COPY --from=buildbase /usr/local/bin/geo-forms-svc /usr/local/bin/geo-forms-svc | ||
RUN apk add --no-cache ca-certificates | ||
COPY --from=buildbase /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
|
||
ENTRYPOINT ["geo-forms-svc"] | ||
ENTRYPOINT ["geo-forms-svc"] |
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,76 @@ | ||
apiVersion: skaffold/v2beta28 | ||
kind: Config | ||
build: | ||
artifacts: | ||
- image: geo-forms-svc # Change it on your own repo-name | ||
docker: | ||
buildArgs: | ||
CI_JOB_TOKEN: "{{.CI_JOB_TOKEN}}" | ||
|
||
|
||
# Uncomment the following lines if you want to deploy your application | ||
# profiles: | ||
# - name: dev | ||
# deploy: | ||
# helm: | ||
# releases: | ||
# - name: backend # Change it on your own repo-name | ||
# setValueTemplates: | ||
# image.repository: "{{.IMAGE_REPO_backend}}" | ||
# image.tag: "{{.IMAGE_TAG_backend}}" | ||
# namespace: dev # Change it on your own namespace | ||
# createNamespace: true | ||
# chartPath: ./backend # Change it on your own path to helm chart | ||
# valuesFiles: | ||
# - ./backend/values.yaml # Change it on your own path to helm chart values.yaml file | ||
# skipBuildDependencies: true | ||
# flags: | ||
# upgrade: | ||
# - -i | ||
# portForward: | ||
# - resourceType: deployment | ||
# resourceName: backend # Change it on your own name in Chart.yaml | ||
# port: 8000 | ||
# localPort: 8000 | ||
|
||
# - name: stage | ||
# patches: | ||
# - op: remove | ||
# path: /build | ||
# deploy: | ||
# helm: | ||
# releases: | ||
# - name: backend # Change it on your own repo-name | ||
# setValueTemplates: | ||
# image.repository: "{{.SKAFFOLD_DEFAULT_REPO}}/{{.GITHUB_REPOSITORY}}" | ||
# image.tag: "{{.GITHUB_SHA}}" | ||
# namespace: stage # Change it on your own namespace | ||
# createNamespace: true | ||
# chartPath: ./backend # Change it on your own path to helm chart | ||
# valuesFiles: | ||
# - ./backend/values.yaml # Change it on your own path to helm chart values.yaml file | ||
# skipBuildDependencies: true | ||
# flags: | ||
# upgrade: | ||
# - -i | ||
|
||
# - name: prod | ||
# patches: | ||
# - op: remove | ||
# path: /build | ||
# deploy: | ||
# helm: | ||
# releases: | ||
# - name: backend # Change it on your own repo-name | ||
# setValueTemplates: | ||
# image.repository: "{{.SKAFFOLD_DEFAULT_REPO}}/{{.GITHUB_REPOSITORY}}" | ||
# image.tag: "{{.GITHUB_REF_NAME}}" | ||
# namespace: prod # Change it on your own namespace | ||
# createNamespace: true | ||
# chartPath: ./backend # Change it on your own path to helm chart | ||
# valuesFiles: | ||
# - ./backend/values.yaml # Change it on your own path to helm chart values.yaml file | ||
# skipBuildDependencies: true | ||
# flags: | ||
# upgrade: | ||
# - -i |
This file was deleted.
Oops, something went wrong.