Skip to content

Commit

Permalink
Merge build and deploy to fix deploy problems (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
steffengraber authored Feb 9, 2024
1 parent af1db99 commit 796054f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
16 changes: 5 additions & 11 deletions ci-templates/000_3.6.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,21 @@ Build_36:
rules:
- when: always
script:
# Build
- docker pull nest/nest-simulator:3.6 || true
- docker build
--cache-from nest/nest-simulator:3.6
--tag nest/nest-simulator:3.6
./src/3.6
# Simple test
# Test
- docker run -i --rm nest/nest-simulator:3.6 bash /opt/test-nest.sh
tags:
- shell-runner

Deploy_36:
stage: deploy
needs: ["Build_36"]
rules:
- when: on_success
script:
- echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin
# Deploy
- echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin
- docker push nest/nest-simulator:3.6
- docker tag nest/nest-simulator:3.6 $DOCKER_REGISTRY_IMAGE:3.6
- docker push $DOCKER_REGISTRY_IMAGE:3.6
- docker logout $DOCKERHUB_REGISTRY
- docker logout $DOCKER_REGISTRY
tags:
- shell-runner

14 changes: 4 additions & 10 deletions ci-templates/000_dev.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,18 @@ Build_Dev:
rules:
- when: always
script:
# Build
- docker pull push nest/nest-simulator:dev || true
- docker build
--cache-from nest/nest-simulator:dev
--tag nest/nest-simulator:dev
./src/dev
# Simple test
# Test
- docker run -i --rm nest/nest-simulator:dev bash /opt/test-nest.sh
tags:
- shell-runner

Deploy_Dev:
stage: deploy
needs: ["Build_Dev"]
rules:
- when: on_success
script:
# Deploy
- echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin
- docker push nest/nest-simulator:dev
- docker logout $DOCKERHUB_REGISTRY
tags:
- shell-runner

0 comments on commit 796054f

Please sign in to comment.