Compare commits
4
Commits
v0.0.29
...
8f8929a655
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f8929a655 | ||
|
|
b15552a89d | ||
|
|
20d557ed9b | ||
|
|
58ab5b34be |
@@ -40,7 +40,7 @@ jobs:
|
|||||||
images: jcabillot/awscli
|
images: jcabillot/awscli
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=${{ steps.get-latest-tag.outputs.tag }}-latest,enable=${{ steps.get-latest-tag.outputs.tag != '' }}
|
type=raw,value=${{ steps.get-latest-tag.outputs.tag }}-latest,enable=${{ steps.get-latest-tag.outputs.tag != '' }}
|
||||||
- uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
type=ref,event=tag
|
type=ref,event=tag
|
||||||
type=ref,event=tag,suffix=-latest
|
type=ref,event=tag,suffix=-latest
|
||||||
- uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
image: "docker:latest"
|
|
||||||
|
|
||||||
services:
|
|
||||||
- "docker:dind"
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- "docker login -u \"$CI_REGISTRY_USER\" -p \"$CI_REGISTRY_PASSWORD\" $CI_REGISTRY"
|
|
||||||
|
|
||||||
build-master:
|
|
||||||
stage: "build"
|
|
||||||
script:
|
|
||||||
- "docker build --pull -t \"$CI_REGISTRY_IMAGE\" ."
|
|
||||||
- "docker push \"$CI_REGISTRY_IMAGE\""
|
|
||||||
only:
|
|
||||||
- "master"
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: "build"
|
|
||||||
script:
|
|
||||||
- "docker build --pull -t \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\" ."
|
|
||||||
- "docker push \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\""
|
|
||||||
except:
|
|
||||||
- "master"
|
|
||||||
|
|
||||||
deploy-github:
|
|
||||||
stage: "deploy"
|
|
||||||
before_script:
|
|
||||||
- "docker login -u \"$GITHUB_USER\" -p \"$GITHUB_PASSWORD\""
|
|
||||||
- "docker login -u \"$CI_REGISTRY_USER\" -p \"$CI_REGISTRY_PASSWORD\" $CI_REGISTRY"
|
|
||||||
script:
|
|
||||||
- "docker pull \"$CI_REGISTRY_IMAGE\""
|
|
||||||
- "docker tag \"$CI_REGISTRY_IMAGE\" \"$GITHUB_USER/$GITHUB_PROJECT\""
|
|
||||||
- "docker push \"$GITHUB_USER/$GITHUB_PROJECT\""
|
|
||||||
only:
|
|
||||||
- "master"
|
|
||||||
Vendored
-38
@@ -1,38 +0,0 @@
|
|||||||
pipeline {
|
|
||||||
environment {
|
|
||||||
registry = 'https://registry.hub.docker.com'
|
|
||||||
registryCredential = 'dockerhub_jcabillot'
|
|
||||||
dockerImage = 'jcabillot/awscli'
|
|
||||||
}
|
|
||||||
|
|
||||||
agent any
|
|
||||||
|
|
||||||
triggers {
|
|
||||||
cron('@midnight')
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage('Clone repository') {
|
|
||||||
steps{
|
|
||||||
checkout scm
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build image') {
|
|
||||||
steps{
|
|
||||||
sh 'docker build --force-rm=true --no-cache=true --pull -t ${dockerImage} .'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Deploy Image') {
|
|
||||||
steps{
|
|
||||||
script {
|
|
||||||
withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
|
|
||||||
sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}'
|
|
||||||
sh 'docker push ${dockerImage}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user