Skip to content
Snippets Groups Projects
Verified Commit f31f25d3 authored by Tóth Miklós Tibor's avatar Tóth Miklós Tibor :shrug:
Browse files

CI magic

parent a21ccac6
No related branches found
No related tags found
No related merge requests found
Pipeline #7796 failed
...@@ -2,6 +2,9 @@ image: golang:alpine ...@@ -2,6 +2,9 @@ image: golang:alpine
variables: variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
GOPATH: $CI_PROJECT_DIR/.go
GOCACHE: $CI_PROJECT_DIR/.cache
stages: stages:
- build - build
...@@ -14,21 +17,24 @@ go: ...@@ -14,21 +17,24 @@ go:
- apk add build-base make git - apk add build-base make git
- cd plab - cd plab
- make - make
cache:
paths:
- .go
- .cache
artifacts: artifacts:
paths: paths:
- plab/out/plab - plab/out/plab
Build: Build:
tags:
- podman-in-podman
stage: docker stage: docker
image: image: quay.io/podman/stable
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ "" ]
script: script:
- TAG=latest - TAG=latest
- "[[ ! \"${CI_COMMIT_REF_NAME:-master}\" = \"master\" ]] && TAG=\"$CI_COMMIT_REF_NAME\"" - "[[ ! \"${CI_COMMIT_REF_NAME:-master}\" = \"master\" ]] && TAG=\"$CI_COMMIT_REF_NAME\""
- mkdir -p /kaniko/.docker - podman login --username $REGISTRY_USER --password $REGISTRY_PASSWORD docker.io
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - podman build -t "projlab/projlab:$TAG" .
- echo /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination "projlab/projlab:$TAG" - podman push "projlab/projlab:$TAG"
- /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination "projlab/projlab:$TAG"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment