Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1aa38a094 | ||
|
|
dde2e29976 | ||
|
|
902b11b227 | ||
|
|
f2e4956564 | ||
|
|
baa71cd658 | ||
|
|
570df505c2 |
@@ -10,7 +10,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: hadolint/hadolint-action@2a66e89f53d0771bb131a7fa31f3136336094aa6 # v3.4.0
|
||||
- uses: hadolint/hadolint-action@06be81baf89a55ffd0e24b8f04a4185738dd3387 # v3.5.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
images: jcabillot/phpapache
|
||||
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:
|
||||
context: .
|
||||
push: true
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: hadolint/hadolint-action@2a66e89f53d0771bb131a7fa31f3136336094aa6 # v3.4.0
|
||||
- uses: hadolint/hadolint-action@06be81baf89a55ffd0e24b8f04a4185738dd3387 # v3.5.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: hadolint/hadolint-action@2a66e89f53d0771bb131a7fa31f3136336094aa6 # v3.4.0
|
||||
- uses: hadolint/hadolint-action@06be81baf89a55ffd0e24b8f04a4185738dd3387 # v3.5.0
|
||||
continue-on-error: true
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: hadolint/hadolint-action@2a66e89f53d0771bb131a7fa31f3136336094aa6 # v3.4.0
|
||||
- uses: hadolint/hadolint-action@06be81baf89a55ffd0e24b8f04a4185738dd3387 # v3.5.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
tags: |
|
||||
type=ref,event=tag
|
||||
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:
|
||||
context: .
|
||||
push: true
|
||||
|
||||
@@ -1,33 +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-master-arm64:
|
||||
stage: build
|
||||
tags:
|
||||
- arm64
|
||||
script:
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE:arm64" .
|
||||
- docker push "$CI_REGISTRY_IMAGE:arm64"
|
||||
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
|
||||
Vendored
-38
@@ -1,38 +0,0 @@
|
||||
pipeline {
|
||||
environment {
|
||||
registry = 'https://registry.hub.docker.com'
|
||||
registryCredential = 'dockerhub_jcabillot'
|
||||
dockerImage = 'jcabillot/phpapache'
|
||||
}
|
||||
|
||||
agent any
|
||||
|
||||
triggers {
|
||||
cron('@midnight')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Clone repository') {
|
||||
steps{
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build image') {
|
||||
steps{
|
||||
sh 'docker build --force-rm --no-cache --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