Skip to content
Snippets Groups Projects
Commit 9dd991f0 authored by Griefed's avatar Griefed :joystick:
Browse files

no message

parent 2e43edc6
No related branches found
No related tags found
No related merge requests found
# https://github.com/jonashackt/gitlab-ci-stack#configure-gitlab-runner-with-shell-executor
# https://github.com/jonashackt/gitlab-ci-shell-example
stages: stages:
- readme - readme
- build - test
- publish - publish
- cleanup
image: docker:19.03.8 before_script:
- docker info
- ls -ahl && ls -ahl *
readme: readme:
stage: readme stage: readme
image: alpine:3.12 tags:
- shell
script: script:
- apk add gettext - apk add gettext
- source .gitlab/.readme_variables - source .gitlab/.readme_variables
...@@ -30,20 +37,32 @@ readme: ...@@ -30,20 +37,32 @@ readme:
- echo "" - echo ""
- echo "" - echo ""
- envsubst < .gitlab/readme_template | less - envsubst < .gitlab/readme_template | less
- envsubst < .gitlab/readme_template > /home/gitlab-runner/READMEs/$CI_PROJECT_NAME/README.md
- echo "" - echo ""
- echo ""
build: test_1:
stage: build stage: test
tags:
- shell
script: script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE:latest || true - docker build --tag $CI_REGISTRY_IMAGE:arm .
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:latest . - docker push $CI_REGISTRY_IMAGE:arm
- docker push $CI_REGISTRY_IMAGE:latest
publish: publish_1:
stage: publish stage: publish
tags:
- shell
script: script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY
- docker build --tag $DOCKER_USER/$DOCKER_REPO:arm . - docker build --tag $DOCKER_USER/$DOCKER_REPO:arm .
- docker push $DOCKER_USER/$DOCKER_REPO:arm - docker push $DOCKER_USER/$DOCKER_REPO:arm
- docker system prune --all --force - docker system prune --all --force
cleanup:
stage: cleanup
tags:
- shell
script:
- rm -rf * .dockerignore .github .gitignore .gitlab
- ls -ahl
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment