fx build fix
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
.env.version
|
.env.version
|
||||||
|
*.pb.go
|
||||||
|
*.pb.gw.go
|
||||||
|
|||||||
@@ -6,12 +6,14 @@ matrix:
|
|||||||
FX_DEPLOY_TARGET: ingestor
|
FX_DEPLOY_TARGET: ingestor
|
||||||
FX_MONGO_SECRET_PATH: sendico/db
|
FX_MONGO_SECRET_PATH: sendico/db
|
||||||
FX_NEEDS_NATS: "false"
|
FX_NEEDS_NATS: "false"
|
||||||
|
FX_ENV: prod
|
||||||
- FX_PIPELINE: fx_oracle
|
- FX_PIPELINE: fx_oracle
|
||||||
FX_IMAGE_PATH: fx/oracle
|
FX_IMAGE_PATH: fx/oracle
|
||||||
FX_DOCKERFILE: ci/prod/compose/fx_oracle.dockerfile
|
FX_DOCKERFILE: ci/prod/compose/fx_oracle.dockerfile
|
||||||
FX_DEPLOY_TARGET: oracle
|
FX_DEPLOY_TARGET: oracle
|
||||||
FX_MONGO_SECRET_PATH: sendico/db
|
FX_MONGO_SECRET_PATH: sendico/db
|
||||||
FX_NEEDS_NATS: "true"
|
FX_NEEDS_NATS: "true"
|
||||||
|
FX_ENV: prod
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
@@ -31,6 +33,19 @@ steps:
|
|||||||
- printf "GIT_REV=%s\nBUILD_BRANCH=%s\nAPP_V=%s\nBUILD_DATE=%s\nBUILD_USER=%s\n" \
|
- printf "GIT_REV=%s\nBUILD_BRANCH=%s\nAPP_V=%s\nBUILD_DATE=%s\nBUILD_USER=%s\n" \
|
||||||
"$GIT_REV" "$BUILD_BRANCH" "$APP_V" "$BUILD_DATE" "$BUILD_USER" | tee .env.version
|
"$GIT_REV" "$BUILD_BRANCH" "$APP_V" "$BUILD_DATE" "$BUILD_USER" | tee .env.version
|
||||||
|
|
||||||
|
- name: proto
|
||||||
|
image: golang:1.22
|
||||||
|
depends_on: [ version ]
|
||||||
|
commands:
|
||||||
|
- set -euo pipefail
|
||||||
|
- apt-get update >/dev/null
|
||||||
|
- DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends protobuf-compiler >/dev/null
|
||||||
|
- rm -rf /var/lib/apt/lists/*
|
||||||
|
- go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.1
|
||||||
|
- go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.0
|
||||||
|
- export PATH="$(go env GOPATH)/bin:$PATH"
|
||||||
|
- bash ci/scripts/proto/generate.sh
|
||||||
|
|
||||||
- name: secrets
|
- name: secrets
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
depends_on: [ version ]
|
depends_on: [ version ]
|
||||||
@@ -51,9 +66,9 @@ steps:
|
|||||||
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
depends_on: [ secrets ]
|
depends_on: [ proto, secrets ]
|
||||||
commands:
|
commands:
|
||||||
- sh ci/pipelines/fx/build.sh
|
- sh ci/scripts/fx/build-image.sh
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
@@ -67,4 +82,4 @@ steps:
|
|||||||
- apk add --no-cache bash openssh-client rsync coreutils curl sed python3
|
- apk add --no-cache bash openssh-client rsync coreutils curl sed python3
|
||||||
- mkdir -p /root/.ssh
|
- mkdir -p /root/.ssh
|
||||||
- install -m 600 secrets/SSH_KEY /root/.ssh/id_rsa
|
- install -m 600 secrets/SSH_KEY /root/.ssh/id_rsa
|
||||||
- sh ci/pipelines/fx/deploy.sh
|
- sh ci/scripts/fx/deploy.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user