What is the difference between artifacts and artefacts?

232    Asked by DavidWHITE in Devops , Asked on May 29, 2024

I am a DevOps engineer in a software development company that is expanding its operations internationally. However, the other members are confused between two terminologies which are “artifacts” vs “artifact” in my DevOps documentation for expanding things. 

Answered by Crowny Hasegawa

 In the context of DevOps, here are the differences between artifact and artefacts Given:-

Artifact (American English)

The artifact is an American term that refers to any byproduct produced during the software development process. It can include compiled code, libraries, documentation, binary executables, and any other files that can be generated as part of the process of building.

Artefacts (British English)

The artefacts are a British terminology that has the same meaning as the artifact. It also refers to the output or product of the development process such as build outputs and the compiled binary.

Therefore, both terms are used to describe the same concept which is called the byproduct of the software development process. The difference is only regional in terms of spelling preference. When you are working in International teams then it is very important to standardize one spelling to avoid confusion.

Here is an example given which would demonstrate how you can handle the artifact in a DevOps context by using a common CI/CD tool like Jenkins. The script would demonstrate how you can build a project, archive the build artifacts, and also how you can deploy them to a particular remote server. We will use the term “artifact” as it is kind commonly use in the context of CI/CD tools:-

Pipeline {
    Agent any
    Environment {
        // Define any environment variables here
        REMOTE_USER = ‘your_remote_user’
        REMOTE_HOST = ‘your_remote_host’
        REMOTE_PATH = ‘/path/to/deploy’
    }
    Stages {
        Stage(‘Checkout’) {
            Steps {
                // Checkout the source code from version control
                Git ‘https://github.com/your-repo/your-project.git’
            }
        }
        Stage(‘Build’) {
            Steps {
                // Build your project (e.g., using Maven)
                Sh ‘mvn clean package’
            }
        }
        Stage(‘Archive Artifacts’) {
            Steps {
                // Archive the build artifacts
                archiveArtifacts artifacts: ‘**/target/*.jar’, allowEmptyArchive: true
            }
        }
        Stage(‘Deploy’) {
            Steps {
                Script {
                    // Define the artifact path
                    Def artifactPath = findFiles(glob: ‘**/target/*.jar’)[0].path
                    // Deploy the artifact to the remote server
                    Sh “””
                    Scp ${artifactPath} ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}
                    “””
                }
            }
        }
    }
    Post {
        Always {
            // Clean up workspace after the pipeline runs
            cleanWs()
        }
    }
}


Your Answer

Interviews

Parent Categories