Update Semaphore configuration

This commit is contained in:
Devin Dice 2022-08-16 22:29:26 +00:00
parent bb3e0031a0
commit 3d3c37cded
3 changed files with 43 additions and 12 deletions

16
.semaphore/pipeline_2.yml Normal file
View File

@ -0,0 +1,16 @@
version: v1.0
name: Pipeline 2
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
blocks:
- name: Tag
task:
jobs:
- name: Tag build as testing
commands:
- '# Login to Dockerhub'
- 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin'
- '# Create a version'
- 'docker push $DOCKER_USERNAME/cloud9-ide-vdi:testing'

16
.semaphore/pipeline_3.yml Normal file
View File

@ -0,0 +1,16 @@
version: v1.0
name: Pipeline 3
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
blocks:
- name: Tagging
task:
jobs:
- name: Tag build with version
commands:
- '# Login to Dockerhub'
- 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin'
- '# Create a version'
- 'docker push $DOCKER_USERNAME/cloud9-ide-vdi:testing'

View File

@ -12,17 +12,16 @@ blocks:
commands: commands:
- checkout - checkout
- git submodule update --init --recursive - git submodule update --init --recursive
- docker build -t cloud9-ide-vdi . - 'docker pull $DOCKER_USERNAME/docker-cloud9:latest || true'
- '# Define Version Numbers' - 'docker build --cache-from=$DOCKER_USERNAME/cloud9-ide-vdi:latest-t $DOCKER_USERNAME/test:latest.'
- DATE=$(date +%y%U)
- 'VERSION="${DATE}"'
- '# Login to Dockerhub'
- 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin'
- '# Create a version'
- 'docker pull $DOCKER_USERNAME/docker-cloud9:$VERSION || true'
- 'docker build --cache-from=$DOCKER_USERNAME/cloud9-ide-vdi:$VERSION -t $DOCKER_USERNAME/cloud9-ide-vdi:$VERSION .'
- 'docker image tag devindice/cloud9-ide-vdi:$VERSION devindice/cloud9-ide-vdi:latest'
- 'docker push $DOCKER_USERNAME/docker-cloud9:$VERSION'
- 'docker push $DOCKER_USERNAME/docker-cloud9:latest'
secrets: secrets:
- name: Dockerhub - name: Dockerhub
promotions:
- name: Deploy Release Candidate
pipeline_file: pipeline_2.yml
auto_promote:
when: branch = 'release' AND result = 'passed'
- name: Deploy Production
pipeline_file: pipeline_3.yml
auto_promote:
when: branch = 'master' AND result = 'passed'